Keine Beschreibung

T_Cus_CustomerBase.cs 8.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  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. /// T_Cus_CustomerBase
  11. /// </summary>
  12. public partial class T_Cus_CustomerBase
  13. {
  14. private readonly CallCenterApi.DAL.T_Cus_CustomerBase dal = new CallCenterApi.DAL.T_Cus_CustomerBase();
  15. public T_Cus_CustomerBase()
  16. { }
  17. #region BasicMethod
  18. /// <summary>
  19. /// 得到最大ID
  20. /// </summary>
  21. public int GetMaxId()
  22. {
  23. return dal.GetMaxId();
  24. }
  25. /// <summary>
  26. /// 是否存在该记录
  27. /// </summary>
  28. public bool Exists(int F_CustomerId)
  29. {
  30. return dal.Exists(F_CustomerId);
  31. }
  32. /// <summary>
  33. /// 增加一条数据
  34. /// </summary>
  35. public string Add(CallCenterApi.Model.T_Cus_CustomerBase model)
  36. {
  37. return dal.Add(model);
  38. }
  39. /// <summary>
  40. /// 更新一条数据
  41. /// </summary>
  42. public bool Update(CallCenterApi.Model.T_Cus_CustomerBase model)
  43. {
  44. return dal.Update(model);
  45. }
  46. /// <summary>
  47. /// 删除一条数据
  48. /// </summary>
  49. public bool Delete(int F_CustomerId)
  50. {
  51. return dal.Delete(F_CustomerId);
  52. }
  53. /// <summary>
  54. /// 删除一条数据
  55. /// </summary>
  56. public bool DeleteList(string F_CustomerIdlist)
  57. {
  58. return dal.DeleteList(F_CustomerIdlist);
  59. }
  60. /// <summary>
  61. /// 得到一个对象实体
  62. /// </summary>
  63. public CallCenterApi.Model.T_Cus_CustomerBase GetModel(string id)
  64. {
  65. return dal.GetModel(id);
  66. }
  67. /// <summary>
  68. /// 得到一个对象实体
  69. /// </summary>
  70. public CallCenterApi.Model.T_Cus_CustomerBase GetModelByTel(string tel)
  71. {
  72. return dal.GetModelByTel(tel);
  73. }
  74. /// <summary>
  75. /// 获得数据列表
  76. /// </summary>
  77. public DataSet GetList(string strWhere)
  78. {
  79. return dal.GetList(strWhere);
  80. }
  81. /// <summary>
  82. /// 获得前几行数据
  83. /// </summary>
  84. public DataSet GetList(int Top, string strWhere, string filedOrder)
  85. {
  86. return dal.GetList(Top, strWhere, filedOrder);
  87. }
  88. /// <summary>
  89. /// 获得数据列表
  90. /// </summary>
  91. public List<CallCenterApi.Model.T_Cus_CustomerBase> GetModelList(string strWhere)
  92. {
  93. DataSet ds = dal.GetList(strWhere);
  94. return DataTableToList(ds.Tables[0]);
  95. }
  96. /// <summary>
  97. /// 获得数据列表
  98. /// </summary>
  99. public List<CallCenterApi.Model.T_Cus_CustomerBase> DataTableToList(DataTable dt)
  100. {
  101. List<CallCenterApi.Model.T_Cus_CustomerBase> modelList = new List<CallCenterApi.Model.T_Cus_CustomerBase>();
  102. int rowsCount = dt.Rows.Count;
  103. if (rowsCount > 0)
  104. {
  105. CallCenterApi.Model.T_Cus_CustomerBase model;
  106. for (int n = 0; n < rowsCount; n++)
  107. {
  108. model = dal.DataRowToModel(dt.Rows[n]);
  109. if (model != null)
  110. {
  111. modelList.Add(model);
  112. }
  113. }
  114. }
  115. return modelList;
  116. }
  117. /// <summary>
  118. /// 获得数据列表
  119. /// </summary>
  120. public DataSet GetAllList()
  121. {
  122. return GetList("");
  123. }
  124. /// <summary>
  125. /// 分页获取数据列表
  126. /// </summary>
  127. public int GetRecordCount(string strWhere)
  128. {
  129. return dal.GetRecordCount(strWhere);
  130. }
  131. /// <summary>
  132. /// 分页获取数据列表
  133. /// </summary>
  134. public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
  135. {
  136. return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
  137. }
  138. /// <summary>
  139. /// 分页获取数据列表
  140. /// </summary>
  141. //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
  142. //{
  143. //return dal.GetList(PageSize,PageIndex,strWhere);
  144. //}
  145. #endregion BasicMethod
  146. #region ExtensionMethod
  147. #endregion ExtensionMethod
  148. //private readonly CallCenterApi.DAL.T_Cus_CustomerBase dal = new CallCenterApi.DAL.T_Cus_CustomerBase();
  149. //public T_Cus_CustomerBase()
  150. //{ }
  151. //#region BasicMethod
  152. ///// <summary>
  153. ///// 得到最大ID
  154. ///// </summary>
  155. //public int GetMaxId()
  156. //{
  157. // return dal.GetMaxId();
  158. //}
  159. ///// <summary>
  160. ///// 是否存在该记录
  161. ///// </summary>
  162. //public bool Exists(int F_CustomerId)
  163. //{
  164. // return dal.Exists(F_CustomerId);
  165. //}
  166. ///// <summary>
  167. ///// 增加一条数据
  168. ///// </summary>
  169. //public int Add(CallCenterApi.Model.T_Cus_CustomerBase model)
  170. //{
  171. // return dal.Add(model);
  172. //}
  173. ///// <summary>
  174. ///// 更新一条数据
  175. ///// </summary>
  176. //public bool Update(CallCenterApi.Model.T_Cus_CustomerBase model)
  177. //{
  178. // return dal.Update(model);
  179. //}
  180. ///// <summary>
  181. ///// 删除一条数据
  182. ///// </summary>
  183. //public bool Delete(int F_CustomerId)
  184. //{
  185. // return dal.Delete(F_CustomerId);
  186. //}
  187. ///// <summary>
  188. ///// 删除一条数据
  189. ///// </summary>
  190. //public bool DeleteList(string F_CustomerIdlist)
  191. //{
  192. // return dal.DeleteList(F_CustomerIdlist);
  193. //}
  194. ///// <summary>
  195. ///// 得到一个对象实体
  196. ///// </summary>
  197. //public CallCenterApi.Model.T_Cus_CustomerBase GetModel(int F_CustomerId)
  198. //{
  199. // return dal.GetModel(F_CustomerId);
  200. //}
  201. ///// <summary>
  202. ///// 获得数据列表
  203. ///// </summary>
  204. //public DataSet GetList(string strWhere)
  205. //{
  206. // return dal.GetList(strWhere);
  207. //}
  208. ///// <summary>
  209. ///// 获得前几行数据
  210. ///// </summary>
  211. //public DataSet GetList(int Top, string strWhere, string filedOrder)
  212. //{
  213. // return dal.GetList(Top, strWhere, filedOrder);
  214. //}
  215. ///// <summary>
  216. ///// 获得数据列表
  217. ///// </summary>
  218. //public List<CallCenterApi.Model.T_Cus_CustomerBase> GetModelList(string strWhere)
  219. //{
  220. // DataSet ds = dal.GetList(strWhere);
  221. // return DataTableToList(ds.Tables[0]);
  222. //}
  223. ///// <summary>
  224. ///// 获得数据列表
  225. ///// </summary>
  226. //public List<CallCenterApi.Model.T_Cus_CustomerBase> DataTableToList(DataTable dt)
  227. //{
  228. // List<CallCenterApi.Model.T_Cus_CustomerBase> modelList = new List<CallCenterApi.Model.T_Cus_CustomerBase>();
  229. // int rowsCount = dt.Rows.Count;
  230. // if (rowsCount > 0)
  231. // {
  232. // CallCenterApi.Model.T_Cus_CustomerBase model;
  233. // for (int n = 0; n < rowsCount; n++)
  234. // {
  235. // model = dal.DataRowToModel(dt.Rows[n]);
  236. // if (model != null)
  237. // {
  238. // modelList.Add(model);
  239. // }
  240. // }
  241. // }
  242. // return modelList;
  243. //}
  244. ///// <summary>
  245. ///// 获得数据列表
  246. ///// </summary>
  247. //public DataSet GetAllList()
  248. //{
  249. // return GetList("");
  250. //}
  251. ///// <summary>
  252. ///// 分页获取数据列表
  253. ///// </summary>
  254. //public int GetRecordCount(string strWhere)
  255. //{
  256. // return dal.GetRecordCount(strWhere);
  257. //}
  258. ///// <summary>
  259. ///// 分页获取数据列表
  260. ///// </summary>
  261. //public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
  262. //{
  263. // return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
  264. //}
  265. ///// <summary>
  266. ///// 分页获取数据列表
  267. ///// </summary>
  268. ////public DataSet GetList(int PageSize,int PageIndex,string strWhere)
  269. ////{
  270. ////return dal.GetList(PageSize,PageIndex,strWhere);
  271. ////}
  272. //#endregion BasicMethod
  273. //#region ExtensionMethod
  274. //#endregion ExtensionMethod
  275. }
  276. }