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

T_Bus_SubmitSuper.cs 6.6KB

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