Нет описания

T_Bus_VisitResultRecords.cs 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace CallCenterApi.BLL
  8. {
  9. /// <summary>
  10. /// 回访结果记录表
  11. /// </summary>
  12. public partial class T_Bus_VisitResultRecords
  13. {
  14. private readonly CallCenterApi.DAL.T_Bus_VisitResultRecords dal = new CallCenterApi.DAL.T_Bus_VisitResultRecords();
  15. public T_Bus_VisitResultRecords()
  16. { }
  17. #region BasicMethod
  18. /// <summary>
  19. /// 增加一条数据
  20. /// </summary>
  21. public int Add(CallCenterApi.Model.T_Bus_VisitResultRecords model)
  22. {
  23. return dal.Add(model);
  24. }
  25. /// <summary>
  26. /// 得到一个对象实体
  27. /// </summary>
  28. public CallCenterApi.Model.T_Bus_VisitResultRecords GetModel(int F_VRRId)
  29. {
  30. return dal.GetModel(F_VRRId);
  31. }
  32. /// <summary>
  33. /// 获得数据列表
  34. /// </summary>
  35. public DataSet GetList(string strWhere)
  36. {
  37. return dal.GetList(strWhere);
  38. }
  39. /// <summary>
  40. /// 获得前几行数据
  41. /// </summary>
  42. public DataSet GetList(int Top, string strWhere, string filedOrder)
  43. {
  44. return dal.GetList(Top, strWhere, filedOrder);
  45. }
  46. /// <summary>
  47. /// 获得数据列表
  48. /// </summary>
  49. public List<CallCenterApi.Model.T_Bus_VisitResultRecords> GetModelList(string strWhere)
  50. {
  51. DataSet ds = dal.GetList(strWhere);
  52. return DataTableToList(ds.Tables[0]);
  53. }
  54. /// <summary>
  55. /// 获得数据列表
  56. /// </summary>
  57. public List<CallCenterApi.Model.T_Bus_VisitResultRecords> DataTableToList(DataTable dt)
  58. {
  59. List<CallCenterApi.Model.T_Bus_VisitResultRecords> modelList = new List<CallCenterApi.Model.T_Bus_VisitResultRecords>();
  60. int rowsCount = dt.Rows.Count;
  61. if (rowsCount > 0)
  62. {
  63. CallCenterApi.Model.T_Bus_VisitResultRecords model;
  64. for (int n = 0; n < rowsCount; n++)
  65. {
  66. model = dal.DataRowToModel(dt.Rows[n]);
  67. if (model != null)
  68. {
  69. modelList.Add(model);
  70. }
  71. }
  72. }
  73. return modelList;
  74. }
  75. /// <summary>
  76. /// 获得数据列表
  77. /// </summary>
  78. public DataSet GetAllList()
  79. {
  80. return GetList("");
  81. }
  82. /// <summary>
  83. /// 分页获取数据列表
  84. /// </summary>
  85. public int GetRecordCount(string strWhere)
  86. {
  87. return dal.GetRecordCount(strWhere);
  88. }
  89. /// <summary>
  90. /// 分页获取数据列表
  91. /// </summary>
  92. public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
  93. {
  94. return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
  95. }
  96. #endregion BasicMethod
  97. #region ExtensionMethod
  98. public int AddInfo(Model.T_Bus_VisitResult model,string user,string guid)
  99. {
  100. Model.T_Bus_VisitResultRecords resmodel = new Model.T_Bus_VisitResultRecords();
  101. resmodel.F_AssignedId = model.F_AssignedId;
  102. resmodel.F_CallRecordId = model.F_CallRecordId;
  103. resmodel.F_CreateTime = model.F_CreateTime;
  104. resmodel.F_CreateUser = model.F_CreateUser;
  105. resmodel.F_DeleteTime = model.F_DeleteTime;
  106. resmodel.F_DeleteUser = model.F_DeleteUser;
  107. resmodel.F_File = model.F_File;
  108. resmodel.F_IsDelete = model.F_IsDelete;
  109. resmodel.F_IsSatisfie = model.F_IsSatisfie;
  110. resmodel.F_LimitTime = model.F_LimitTime;
  111. resmodel.F_Remark = model.F_Remark;
  112. resmodel.F_Result = model.F_Result;
  113. resmodel.F_State = model.F_State;
  114. resmodel.F_Type = model.F_Type;
  115. resmodel.F_VisitUser = model.F_VisitUser;
  116. resmodel.F_VRId = model.F_Id;
  117. resmodel.F_WorkOrderId = model.F_WorkOrderId;
  118. resmodel.F_Guid = guid;
  119. resmodel.F_ReUser = user;
  120. resmodel.F_ReTime = DateTime.Now;
  121. return dal.Add(resmodel);
  122. }
  123. #endregion ExtensionMethod
  124. }
  125. }