三元财务API

T_Cus_CustomerBaseNew.cs 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  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_CustomerBaseNew
  11. /// </summary>
  12. public partial class T_Cus_CustomerBaseNew
  13. {
  14. private readonly CallCenterApi.DAL.T_Cus_CustomerBaseNew dal = new CallCenterApi.DAL.T_Cus_CustomerBaseNew();
  15. public T_Cus_CustomerBaseNew()
  16. { }
  17. #region BasicMethod
  18. /// <summary>
  19. /// 是否存在该记录
  20. /// </summary>
  21. public bool Exists(int F_CustomerId)
  22. {
  23. return dal.Exists(F_CustomerId);
  24. }
  25. /// <summary>
  26. /// 增加一条数据
  27. /// </summary>
  28. public int Add(CallCenterApi.Model.T_Cus_CustomerBaseNew model)
  29. {
  30. return dal.Add(model);
  31. }
  32. /// <summary>
  33. /// 更新一条数据
  34. /// </summary>
  35. public bool Update(CallCenterApi.Model.T_Cus_CustomerBaseNew model)
  36. {
  37. return dal.Update(model);
  38. }
  39. /// <summary>
  40. /// 删除一条数据
  41. /// </summary>
  42. public bool Delete(int F_CustomerId)
  43. {
  44. return dal.Delete(F_CustomerId);
  45. }
  46. /// <summary>
  47. /// 删除一条数据
  48. /// </summary>
  49. public bool DeleteList(string F_CustomerIdlist)
  50. {
  51. return dal.DeleteList(F_CustomerIdlist);
  52. }
  53. /// <summary>
  54. /// 得到一个对象实体
  55. /// </summary>
  56. public CallCenterApi.Model.T_Cus_CustomerBaseNew GetModel(int F_CustomerId)
  57. {
  58. return dal.GetModel(F_CustomerId);
  59. }
  60. /// <summary>
  61. /// 得到一个对象实体
  62. /// </summary>
  63. public CallCenterApi.Model.T_Cus_CustomerBaseNew GetModelcus(string openid)
  64. {
  65. return dal.GetModels(openid);
  66. }
  67. /// <summary>
  68. /// 得到一个对象实体
  69. /// </summary>
  70. public CallCenterApi.Model.T_Cus_CustomerBaseNew GetModelcuscode(string archivecuscode)
  71. {
  72. return dal.GetModelcuscode(archivecuscode);
  73. }
  74. /// <summary>
  75. /// 根据公司名称得到一个对象实体
  76. /// </summary>
  77. public CallCenterApi.Model.T_Cus_CustomerBaseNew GetModelcusName(string company)
  78. {
  79. return dal.GetModelcusName(company);
  80. }
  81. /// <summary>
  82. /// 根据客户编号和微信登录密码得到一个对象实体
  83. /// </summary>
  84. public CallCenterApi.Model.T_Cus_CustomerBaseNew GetModelWx(string cuscode, string wxpower)
  85. {
  86. return dal.GetModelWx(cuscode,wxpower);
  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.T_Cus_CustomerBaseNew> 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.T_Cus_CustomerBaseNew> DataTableToList(DataTable dt)
  114. {
  115. List<CallCenterApi.Model.T_Cus_CustomerBaseNew> modelList = new List<CallCenterApi.Model.T_Cus_CustomerBaseNew>();
  116. int rowsCount = dt.Rows.Count;
  117. if (rowsCount > 0)
  118. {
  119. CallCenterApi.Model.T_Cus_CustomerBaseNew 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. #endregion BasicMethod
  153. #region ExtensionMethod
  154. public CallCenterApi.Model.T_Cus_CustomerBaseNew GetModelByOpenid(string openid)
  155. {
  156. return dal.GetModelByOpenid(openid);
  157. }
  158. public bool UpdatePWD(string ids, string pwd)
  159. {
  160. return dal.UpdatePWD(ids, pwd);
  161. }
  162. #endregion ExtensionMethod
  163. }
  164. }