ContactTask.cs 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using static DataManager.UIConstants;
  7. namespace DataManager
  8. {
  9. public class ContactTask
  10. {
  11. private int userId; // 当前用户,注意:TA未必是任务所分配的用户
  12. private int taskId;
  13. private string companyId;
  14. private string companyShortName;
  15. private DateTime taskDate;
  16. private short taskType;
  17. private sbyte isvalid;
  18. private sbyte priority;
  19. private DateTime? followUpDate;
  20. private sbyte? companyAssetSize;
  21. private int? creatorId;
  22. private string creatorName;
  23. private DateTime? createTime;
  24. private int? updatorId;
  25. private string updaterName;
  26. private DateTime? updateTime;
  27. public ContactTask()
  28. {
  29. }
  30. public ContactTask(int userId, int taskId, string companyId, string companyShortName, DateTime taskDate, short taskType, sbyte isvalid, sbyte priority,
  31. DateTime? followUpDate, sbyte? companyAssetSize, int? creatorId, string creatorName, DateTime? createTime,
  32. int? updatorId, string updaterName, DateTime? updateTime)
  33. {
  34. UserId = userId;
  35. TaskId = taskId;
  36. CompanyId = companyId;
  37. CompanyShortName = companyShortName;
  38. TaskDate = taskDate;
  39. TaskType = taskType;
  40. Isvalid = isvalid;
  41. Priority = priority;
  42. FollowUpDate = followUpDate;
  43. CompanyAssetSize = companyAssetSize;
  44. CreatorId = creatorId;
  45. CreatorName = creatorName;
  46. CreateTime = createTime;
  47. UpdatorId = updatorId;
  48. UpdaterName = updaterName;
  49. UpdateTime = updateTime;
  50. }
  51. public int SaveToSQL(int userId)
  52. {
  53. int task_id = 0;
  54. DataAccess.Set_dm_contact_task(taskId, companyId, taskDate, taskType, Isvalid, Priority, FollowUpDate, userId, out task_id);
  55. return task_id;
  56. }
  57. public int UserId { get => userId; set => userId = value; }
  58. public int TaskId { get => taskId; set => taskId = value; }
  59. public string CompanyId { get => companyId; set => companyId = value; }
  60. public string CompanyShortName { get => companyShortName; set => companyShortName = value; }
  61. public DateTime TaskDate { get => taskDate; set => taskDate = value; }
  62. public short TaskType { get => taskType; set => taskType = value; }
  63. public sbyte Isvalid { get => isvalid; set => isvalid = value; }
  64. public sbyte Priority { get => priority; set => priority = value; }
  65. public DateTime? FollowUpDate { get => followUpDate; set => followUpDate = value; }
  66. public sbyte? CompanyAssetSize { get => companyAssetSize; set => companyAssetSize = value; }
  67. public int? CreatorId { get => creatorId; set => creatorId = value; }
  68. public string CreatorName { get => creatorName; set => creatorName = value; }
  69. public DateTime? CreateTime { get => createTime; set => createTime = value; }
  70. public int? UpdatorId { get => updatorId; set => updatorId = value; }
  71. public string UpdaterName { get => updaterName; set => updaterName = value; }
  72. public DateTime? UpdateTime { get => updateTime; set => updateTime = value; }
  73. }
  74. }