周口郸城医院 DanChengCallCenter_API

SF_TaskDetail.cs 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Data;
  6. namespace CallCenterApi.BLL
  7. {
  8. /// <summary>
  9. /// SF_TaskDetail
  10. /// </summary>
  11. public partial class SF_TaskDetail
  12. {
  13. private readonly CallCenterApi.DAL.SF_TaskDetail dal = new CallCenterApi.DAL.SF_TaskDetail();
  14. public SF_TaskDetail()
  15. { }
  16. #region BasicMethod
  17. /// <summary>
  18. /// 得到最大ID
  19. /// </summary>
  20. public int GetMaxId()
  21. {
  22. return dal.GetMaxId();
  23. }
  24. /// <summary>
  25. /// 是否存在该记录
  26. /// </summary>
  27. public bool Exists(int ID)
  28. {
  29. return dal.Exists(ID);
  30. }
  31. /// <summary>
  32. /// 增加一条数据
  33. /// </summary>
  34. public int Add(CallCenterApi.Model.SF_TaskDetail model)
  35. {
  36. return dal.Add(model);
  37. }
  38. /// <summary>
  39. /// 更新一条数据
  40. /// </summary>
  41. public bool Update(CallCenterApi.Model.SF_TaskDetail model)
  42. {
  43. return dal.Update(model);
  44. }
  45. /// <summary>
  46. /// 删除一条数据
  47. /// </summary>
  48. public bool Delete(int ID)
  49. {
  50. return dal.Delete(ID);
  51. }
  52. /// <summary>
  53. /// 删除一条数据
  54. /// </summary>
  55. public bool DeleteList(string IDlist)
  56. {
  57. return dal.DeleteList(IDlist);
  58. }
  59. /// <summary>
  60. /// 得到一个对象实体
  61. /// </summary>
  62. public CallCenterApi.Model.SF_TaskDetail GetModel(int ID)
  63. {
  64. return dal.GetModel(ID);
  65. }
  66. ///// <summary>
  67. ///// 得到一个对象实体,从缓存中
  68. ///// </summary>
  69. //public CallCenterApi.Model.SF_TaskDetail GetModelByCache(int ID)
  70. //{
  71. // string CacheKey = "SF_TaskDetailModel-" + ID;
  72. // object objModel = Maticsoft.Common.DataCache.GetCache(CacheKey);
  73. // if (objModel == null)
  74. // {
  75. // try
  76. // {
  77. // objModel = dal.GetModel(ID);
  78. // if (objModel != null)
  79. // {
  80. // int ModelCache = Maticsoft.Common.ConfigHelper.GetConfigInt("ModelCache");
  81. // Maticsoft.Common.DataCache.SetCache(CacheKey, objModel, DateTime.Now.AddMinutes(ModelCache), TimeSpan.Zero);
  82. // }
  83. // }
  84. // catch { }
  85. // }
  86. // return (CallCenterApi.Model.SF_TaskDetail)objModel;
  87. //}
  88. /// <summary>
  89. /// 获得数据列表
  90. /// </summary>
  91. public DataSet GetList(string strWhere)
  92. {
  93. return dal.GetList(strWhere);
  94. }
  95. /// <summary>
  96. /// 获得前几行数据
  97. /// </summary>
  98. public DataSet GetList(int Top, string strWhere, string filedOrder)
  99. {
  100. return dal.GetList(Top, strWhere, filedOrder);
  101. }
  102. /// <summary>
  103. /// 获得数据列表
  104. /// </summary>
  105. public List<CallCenterApi.Model.SF_TaskDetail> GetModelList(string strWhere)
  106. {
  107. DataSet ds = dal.GetList(strWhere);
  108. return DataTableToList(ds.Tables[0]);
  109. }
  110. /// <summary>
  111. /// 获得数据列表
  112. /// </summary>
  113. public List<CallCenterApi.Model.SF_TaskDetail> DataTableToList(DataTable dt)
  114. {
  115. List<CallCenterApi.Model.SF_TaskDetail> modelList = new List<CallCenterApi.Model.SF_TaskDetail>();
  116. int rowsCount = dt.Rows.Count;
  117. if (rowsCount > 0)
  118. {
  119. CallCenterApi.Model.SF_TaskDetail model;
  120. for (int n = 0; n < rowsCount; n++)
  121. {
  122. model = dal.DataRowToModel(dt.Rows[n]);
  123. if (model != null)
  124. {
  125. modelList.Add(model);
  126. }
  127. }
  128. }
  129. return modelList;
  130. }
  131. /// <summary>
  132. /// 获得数据列表
  133. /// </summary>
  134. public DataSet GetAllList()
  135. {
  136. return GetList("");
  137. }
  138. /// <summary>
  139. /// 分页获取数据列表
  140. /// </summary>
  141. public int GetRecordCount(string strWhere)
  142. {
  143. return dal.GetRecordCount(strWhere);
  144. }
  145. /// <summary>
  146. /// 分页获取数据列表
  147. /// </summary>
  148. public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
  149. {
  150. return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
  151. }
  152. /// <summary>
  153. /// 分页获取数据列表
  154. /// </summary>
  155. //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
  156. //{
  157. //return dal.GetList(PageSize,PageIndex,strWhere);
  158. //}
  159. #endregion BasicMethod
  160. #region ExtensionMethod
  161. public DataTable GetALLList(string strWhere, string orderby, int startIndex, int endIndex, out int count)
  162. {
  163. return dal.GetALLList(strWhere, orderby, startIndex, endIndex, out count);
  164. }
  165. public CallCenterApi.Model.SF_TaskDetail GetModelByTaskIdAndBingrenzyID(int taskID, string BINGRENZYID) {
  166. return dal.GetModelByTaskIdAndBingrenzyID(taskID, BINGRENZYID);
  167. }
  168. public DataTable GetALLListById(string strWhere, string orderby, int startIndex, int endIndex)
  169. {
  170. return dal.GetALLListById(strWhere, orderby, startIndex, endIndex);
  171. }
  172. #endregion ExtensionMethod
  173. }
  174. }