市长热线演示版

T_Cus_ContactPerson.cs 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. /** 版本信息模板在安装目录下,可自行修改。
  2. * T_Cus_ContactPerson.cs
  3. *
  4. * 功 能: N/A
  5. * 类 名: T_Cus_ContactPerson
  6. *
  7. * Ver 变更日期 负责人 变更内容
  8. * ───────────────────────────────────
  9. * V0.01 2015/3/5 11:17:54 N/A 初版
  10. *
  11. * Copyright (c) 2012 Maticsoft Corporation. All rights reserved.
  12. *┌──────────────────────────────────┐
  13. *│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │
  14. *│ 版权所有:动软卓越(北京)科技有限公司              │
  15. *└──────────────────────────────────┘
  16. */
  17. using System;
  18. using System.Data;
  19. using System.Collections.Generic;
  20. using HySoft.Common;
  21. using HySoft.BaseCallCenter.Model;
  22. namespace HySoft.BaseCallCenter.BLL
  23. {
  24. /// <summary>
  25. /// T_Cus_ContactPerson
  26. /// </summary>
  27. public partial class T_Cus_ContactPerson
  28. {
  29. private readonly HySoft.BaseCallCenter.DAL.T_Cus_ContactPerson dal=new HySoft.BaseCallCenter.DAL.T_Cus_ContactPerson();
  30. public T_Cus_ContactPerson()
  31. {}
  32. #region BasicMethod
  33. /// <summary>
  34. /// 得到最大ID
  35. /// </summary>
  36. public int GetMaxId()
  37. {
  38. return dal.GetMaxId();
  39. }
  40. /// <summary>
  41. /// 是否存在该记录
  42. /// </summary>
  43. public bool Exists(int F_ManId)
  44. {
  45. return dal.Exists(F_ManId);
  46. }
  47. /// <summary>
  48. /// 增加一条数据
  49. /// </summary>
  50. public int Add(HySoft.BaseCallCenter.Model.T_Cus_ContactPerson model)
  51. {
  52. return dal.Add(model);
  53. }
  54. /// <summary>
  55. /// 更新一条数据
  56. /// </summary>
  57. public bool Update(HySoft.BaseCallCenter.Model.T_Cus_ContactPerson model)
  58. {
  59. return dal.Update(model);
  60. }
  61. /// <summary>
  62. /// 删除一条数据
  63. /// </summary>
  64. public bool Delete(int F_ManId)
  65. {
  66. return dal.Delete(F_ManId);
  67. }
  68. /// <summary>
  69. /// 删除一条数据
  70. /// </summary>
  71. public bool DeleteList(string F_ManIdlist )
  72. {
  73. return dal.DeleteList(F_ManIdlist );
  74. }
  75. /// <summary>
  76. /// 得到一个对象实体
  77. /// </summary>
  78. public HySoft.BaseCallCenter.Model.T_Cus_ContactPerson GetModel(int F_ManId)
  79. {
  80. return dal.GetModel(F_ManId);
  81. }
  82. /// <summary>
  83. /// 得到一个对象实体,从缓存中
  84. /// </summary>
  85. //public HySoft.BaseCallCenter.Model.T_Cus_ContactPerson GetModelByCache(int F_ManId)
  86. //{
  87. // string CacheKey = "T_Cus_ContactPersonModel-" + F_ManId;
  88. // object objModel = Maticsoft.Common.DataCache.GetCache(CacheKey);
  89. // if (objModel == null)
  90. // {
  91. // try
  92. // {
  93. // objModel = dal.GetModel(F_ManId);
  94. // if (objModel != null)
  95. // {
  96. // int ModelCache = Maticsoft.Common.ConfigHelper.GetConfigInt("ModelCache");
  97. // Maticsoft.Common.DataCache.SetCache(CacheKey, objModel, DateTime.Now.AddMinutes(ModelCache), TimeSpan.Zero);
  98. // }
  99. // }
  100. // catch{}
  101. // }
  102. // return (HySoft.BaseCallCenter.Model.T_Cus_ContactPerson)objModel;
  103. //}
  104. /// <summary>
  105. /// 获得数据列表
  106. /// </summary>
  107. public DataSet GetList(string strWhere)
  108. {
  109. return dal.GetList(strWhere);
  110. }
  111. /// <summary>
  112. /// 获得前几行数据
  113. /// </summary>
  114. public DataSet GetList(int Top,string strWhere,string filedOrder)
  115. {
  116. return dal.GetList(Top,strWhere,filedOrder);
  117. }
  118. /// <summary>
  119. /// 获得数据列表
  120. /// </summary>
  121. public List<HySoft.BaseCallCenter.Model.T_Cus_ContactPerson> GetModelList(string strWhere)
  122. {
  123. DataSet ds = dal.GetList(strWhere);
  124. return DataTableToList(ds.Tables[0]);
  125. }
  126. /// <summary>
  127. /// 获得数据列表
  128. /// </summary>
  129. public List<HySoft.BaseCallCenter.Model.T_Cus_ContactPerson> DataTableToList(DataTable dt)
  130. {
  131. List<HySoft.BaseCallCenter.Model.T_Cus_ContactPerson> modelList = new List<HySoft.BaseCallCenter.Model.T_Cus_ContactPerson>();
  132. int rowsCount = dt.Rows.Count;
  133. if (rowsCount > 0)
  134. {
  135. HySoft.BaseCallCenter.Model.T_Cus_ContactPerson model;
  136. for (int n = 0; n < rowsCount; n++)
  137. {
  138. model = dal.DataRowToModel(dt.Rows[n]);
  139. if (model != null)
  140. {
  141. modelList.Add(model);
  142. }
  143. }
  144. }
  145. return modelList;
  146. }
  147. /// <summary>
  148. /// 获得数据列表
  149. /// </summary>
  150. public DataSet GetAllList()
  151. {
  152. return GetList("");
  153. }
  154. /// <summary>
  155. /// 分页获取数据列表
  156. /// </summary>
  157. public int GetRecordCount(string strWhere)
  158. {
  159. return dal.GetRecordCount(strWhere);
  160. }
  161. /// <summary>
  162. /// 分页获取数据列表
  163. /// </summary>
  164. public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
  165. {
  166. return dal.GetListByPage( strWhere, orderby, startIndex, endIndex);
  167. }
  168. /// <summary>
  169. /// 分页获取数据列表
  170. /// </summary>
  171. //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
  172. //{
  173. //return dal.GetList(PageSize,PageIndex,strWhere);
  174. //}
  175. #endregion BasicMethod
  176. #region ExtensionMethod
  177. #endregion ExtensionMethod
  178. }
  179. }