Class4.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Formats.Asn1;
  4. using System.Globalization;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Runtime.Serialization;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. using CsvHelper;
  11. using WpfApp1;
  12. namespace WpfApp1.model
  13. {
  14. [DataContract]
  15. public class Worker
  16. {
  17. [DataMember]
  18. public string name { get; set; }
  19. [DataMember]
  20. public string Pos { get; set; }
  21. [DataMember]
  22. public int Age { get; set; }
  23. [DataMember]
  24. public string Sex { get; set; }
  25. [DataMember]
  26. public bool available { get; set; }
  27. [DataMember(Name = "date")]
  28. private string? stringdate { get; set; }
  29. [IgnoreDataMember]
  30. public DateTime? date
  31. {
  32. get
  33. {
  34. return stringdate == null ? null : DateTime.Parse(stringdate);
  35. }
  36. set
  37. {
  38. stringdate = value.ToString();
  39. }
  40. }
  41. }
  42. }