鹤壁市长热线,前端git:http://192.168.1.222:3000/clq1010/CallCenter5.0WebUI.git 中的鹤壁12345分支

T_Bus_RemindRecord.cs 8.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. using System;
  2. using System.Data;
  3. using System.Collections.Generic;
  4. using CallCenterApi.Model;
  5. namespace CallCenterApi.BLL
  6. {
  7. /// <summary>
  8. /// 催办表
  9. /// </summary>
  10. public partial class T_Bus_RemindRecord
  11. {
  12. private readonly CallCenterApi.DAL.T_Bus_RemindRecord dal = new CallCenterApi.DAL.T_Bus_RemindRecord();
  13. public T_Bus_RemindRecord()
  14. { }
  15. #region Method
  16. /// <summary>
  17. /// 是否存在该记录
  18. /// </summary>
  19. public bool Exists(int F_RemindRecId)
  20. {
  21. return dal.Exists(F_RemindRecId);
  22. }
  23. /// <summary>
  24. /// 增加一条数据
  25. /// </summary>
  26. public int Add(CallCenterApi.Model.T_Bus_RemindRecord model)
  27. {
  28. return dal.Add(model);
  29. }
  30. /// <summary>
  31. /// 更新一条数据
  32. /// </summary>
  33. public bool Update(CallCenterApi.Model.T_Bus_RemindRecord model)
  34. {
  35. return dal.Update(model);
  36. }
  37. /// <summary>
  38. /// 删除一条数据
  39. /// </summary>
  40. public bool Delete(int F_RemindRecId)
  41. {
  42. return dal.Delete(F_RemindRecId);
  43. }
  44. /// <summary>
  45. /// 删除一条数据
  46. /// </summary>
  47. public bool DeleteList(string F_RemindRecIdlist)
  48. {
  49. return dal.DeleteList(F_RemindRecIdlist);
  50. }
  51. /// <summary>
  52. /// 得到一个对象实体
  53. /// </summary>
  54. public CallCenterApi.Model.T_Bus_RemindRecord GetModel(int F_RemindRecId)
  55. {
  56. return dal.GetModel(F_RemindRecId);
  57. }
  58. /// <summary>
  59. /// 获得数据列表
  60. /// </summary>
  61. public DataSet GetList(string strWhere)
  62. {
  63. return dal.GetList(strWhere);
  64. }
  65. /// <summary>
  66. /// 获得前几行数据
  67. /// </summary>
  68. public DataSet GetList(int Top, string strWhere, string filedOrder)
  69. {
  70. return dal.GetList(Top, strWhere, filedOrder);
  71. }
  72. /// <summary>
  73. /// 获得数据列表
  74. /// </summary>
  75. public List<CallCenterApi.Model.T_Bus_RemindRecord> GetModelList(string strWhere)
  76. {
  77. DataSet ds = dal.GetList(strWhere);
  78. return DataTableToList(ds.Tables[0]);
  79. }
  80. /// <summary>
  81. /// 获得数据列表
  82. /// </summary>
  83. public List<CallCenterApi.Model.T_Bus_RemindRecord> DataTableToList(DataTable dt)
  84. {
  85. List<CallCenterApi.Model.T_Bus_RemindRecord> modelList = new List<CallCenterApi.Model.T_Bus_RemindRecord>();
  86. int rowsCount = dt.Rows.Count;
  87. if (rowsCount > 0)
  88. {
  89. CallCenterApi.Model.T_Bus_RemindRecord model;
  90. for (int n = 0; n < rowsCount; n++)
  91. {
  92. model = new CallCenterApi.Model.T_Bus_RemindRecord();
  93. if (dt.Rows[n]["F_RemindRecId"] != null && dt.Rows[n]["F_RemindRecId"].ToString() != "")
  94. {
  95. model.F_RemindRecId = int.Parse(dt.Rows[n]["F_RemindRecId"].ToString());
  96. }
  97. if (dt.Rows[n]["F_WorkOrderId"] != null && dt.Rows[n]["F_WorkOrderId"].ToString() != "")
  98. {
  99. model.F_WorkOrderId = dt.Rows[n]["F_WorkOrderId"].ToString();
  100. }
  101. if (dt.Rows[n]["F_DeptName"] != null && dt.Rows[n]["F_DeptName"].ToString() != "")
  102. {
  103. model.F_DeptName = dt.Rows[n]["F_DeptName"].ToString();
  104. }
  105. if (dt.Rows[n]["F_Phone"] != null && dt.Rows[n]["F_Phone"].ToString() != "")
  106. {
  107. model.F_Phone = dt.Rows[n]["F_Phone"].ToString();
  108. }
  109. if (dt.Rows[n]["F_AcceptName"] != null && dt.Rows[n]["F_AcceptName"].ToString() != "")
  110. {
  111. model.F_AcceptName = dt.Rows[n]["F_AcceptName"].ToString();
  112. }
  113. if (dt.Rows[n]["F_RemindName"] != null && dt.Rows[n]["F_RemindName"].ToString() != "")
  114. {
  115. model.F_RemindName = dt.Rows[n]["F_RemindName"].ToString();
  116. }
  117. if (dt.Rows[n]["F_RemindTime"] != null && dt.Rows[n]["F_RemindTime"].ToString() != "")
  118. {
  119. model.F_RemindTime = DateTime.Parse(dt.Rows[n]["F_RemindTime"].ToString());
  120. }
  121. if (dt.Rows[n]["F_CallRecordId"] != null && dt.Rows[n]["F_CallRecordId"].ToString() != "")
  122. {
  123. model.F_CallRecordId = int.Parse(dt.Rows[n]["F_CallRecordId"].ToString());
  124. }
  125. if (dt.Rows[n]["F_RemindType"] != null && dt.Rows[n]["F_RemindType"].ToString() != "")
  126. {
  127. model.F_RemindType = int.Parse(dt.Rows[n]["F_RemindType"].ToString());
  128. }
  129. if (dt.Rows[n]["F_SmsId"] != null && dt.Rows[n]["F_SmsId"].ToString() != "")
  130. {
  131. model.F_SmsId = int.Parse(dt.Rows[n]["F_SmsId"].ToString());
  132. }
  133. if (dt.Rows[n]["F_RemindContent"] != null && dt.Rows[n]["F_RemindContent"].ToString() != "")
  134. {
  135. model.F_RemindContent = dt.Rows[n]["F_RemindContent"].ToString();
  136. }
  137. if (dt.Rows[n]["F_IsRead"] != null && dt.Rows[n]["F_IsRead"].ToString() != "")
  138. {
  139. if ((dt.Rows[n]["F_IsRead"].ToString() == "1") || (dt.Rows[n]["F_IsRead"].ToString().ToLower() == "true"))
  140. {
  141. model.F_IsRead = true;
  142. }
  143. else
  144. {
  145. model.F_IsRead = false;
  146. }
  147. }
  148. if (dt.Rows[n]["F_ReadTime"] != null && dt.Rows[n]["F_ReadTime"].ToString() != "")
  149. {
  150. model.F_ReadTime = DateTime.Parse(dt.Rows[n]["F_ReadTime"].ToString());
  151. }
  152. if (dt.Rows[n]["F_UserCode"] != null && dt.Rows[n]["F_UserCode"].ToString() != "")
  153. {
  154. model.F_UserCode = dt.Rows[n]["F_UserCode"].ToString();
  155. }
  156. if (dt.Rows[n]["F_RemindUserCode"] != null && dt.Rows[n]["F_RemindUserCode"].ToString() != "")
  157. {
  158. model.F_RemindUserCode = dt.Rows[n]["F_RemindUserCode"].ToString();
  159. }
  160. if (dt.Rows[n]["F_Remark"] != null && dt.Rows[n]["F_Remark"].ToString() != "")
  161. {
  162. model.F_Remark = dt.Rows[n]["F_Remark"].ToString();
  163. }
  164. modelList.Add(model);
  165. }
  166. }
  167. return modelList;
  168. }
  169. /// <summary>
  170. /// 获得数据列表
  171. /// </summary>
  172. public DataSet GetAllList()
  173. {
  174. return GetList("");
  175. }
  176. /// <summary>
  177. /// 分页获取数据列表
  178. /// </summary>
  179. public int GetRecordCount(string strWhere)
  180. {
  181. return dal.GetRecordCount(strWhere);
  182. }
  183. /// <summary>
  184. /// 分页获取数据列表
  185. /// </summary>
  186. public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
  187. {
  188. return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
  189. }
  190. /// <summary>
  191. /// 根据条件判断是否存在该记录
  192. /// </summary>
  193. public bool ExistsByCondition(string strWhere)
  194. {
  195. return dal.ExistsByCondition(strWhere);
  196. }
  197. /// <summary>
  198. /// 根据条件查询存在多少记录
  199. /// </summary>
  200. public int GetCountByCondition(string strWhere)
  201. {
  202. return dal.GetCountByCondition(strWhere);
  203. }
  204. /// <summary>
  205. /// 分页获取数据列表
  206. /// </summary>
  207. //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
  208. //{
  209. //return dal.GetList(PageSize,PageIndex,strWhere);
  210. //}
  211. #endregion Method
  212. }
  213. }