市长热线演示版

T_Sys_UserAccount.cs 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. /** 版本信息模板在安装目录下,可自行修改。
  2. * T_Sys_UserAccount.cs
  3. *
  4. * 功 能: N/A
  5. * 类 名: T_Sys_UserAccount
  6. *
  7. * Ver 变更日期 负责人 变更内容
  8. * ───────────────────────────────────
  9. * V0.01 2015/3/10 14:50:40 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_Sys_UserAccount
  26. /// </summary>
  27. public partial class T_Sys_UserAccount
  28. {
  29. private readonly HySoft.BaseCallCenter.DAL.T_Sys_UserAccount dal=new HySoft.BaseCallCenter.DAL.T_Sys_UserAccount();
  30. public T_Sys_UserAccount()
  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_UserId)
  44. {
  45. return dal.Exists(F_UserId);
  46. }
  47. /// <summary>
  48. /// 增加一条数据
  49. /// </summary>
  50. public int Add(HySoft.BaseCallCenter.Model.T_Sys_UserAccount model)
  51. {
  52. return dal.Add(model);
  53. }
  54. /// <summary>
  55. /// 更新一条数据
  56. /// </summary>
  57. public bool Update(HySoft.BaseCallCenter.Model.T_Sys_UserAccount model)
  58. {
  59. return dal.Update(model);
  60. }
  61. /// <summary>
  62. /// 删除一条数据
  63. /// </summary>
  64. public bool Delete(int F_UserId)
  65. {
  66. return dal.Delete(F_UserId);
  67. }
  68. /// <summary>
  69. /// 删除一条数据
  70. /// </summary>
  71. public bool DeleteList(string F_UserIdlist )
  72. {
  73. return dal.DeleteList(F_UserIdlist );
  74. }
  75. /// <summary>
  76. /// 得到一个对象实体
  77. /// </summary>
  78. public HySoft.BaseCallCenter.Model.T_Sys_UserAccount GetModel(int F_UserId)
  79. {
  80. return dal.GetModel(F_UserId);
  81. }
  82. ///// <summary>
  83. ///// 得到一个对象实体,从缓存中
  84. ///// </summary>
  85. //public HySoft.BaseCallCenter.Model.T_Sys_UserAccount GetModelByCache(int F_UserId)
  86. //{
  87. // string CacheKey = "T_Sys_UserAccountModel-" + F_UserId;
  88. // object objModel = Maticsoft.Common.DataCache.GetCache(CacheKey);
  89. // if (objModel == null)
  90. // {
  91. // try
  92. // {
  93. // objModel = dal.GetModel(F_UserId);
  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_Sys_UserAccount)objModel;
  103. //}
  104. /// <summary>
  105. /// 获得数据列表
  106. /// </summary>
  107. public DataSet GetList(string strWhere)
  108. {
  109. return dal.GetList(strWhere);
  110. }
  111. public DataSet GetListView(string strWhere)
  112. {
  113. return dal.GetListView(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<HySoft.BaseCallCenter.Model.T_Sys_UserAccount> 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<HySoft.BaseCallCenter.Model.T_Sys_UserAccount> DataTableToList(DataTable dt)
  134. {
  135. List<HySoft.BaseCallCenter.Model.T_Sys_UserAccount> modelList = new List<HySoft.BaseCallCenter.Model.T_Sys_UserAccount>();
  136. int rowsCount = dt.Rows.Count;
  137. if (rowsCount > 0)
  138. {
  139. HySoft.BaseCallCenter.Model.T_Sys_UserAccount model;
  140. for (int n = 0; n < rowsCount; n++)
  141. {
  142. model = dal.DataRowToModel(dt.Rows[n]);
  143. if (model != null)
  144. {
  145. modelList.Add(model);
  146. }
  147. }
  148. }
  149. return modelList;
  150. }
  151. public List<HySoft.BaseCallCenter.Model.T_Sys_UserAccount> DataTableToList1(DataTable dt)
  152. {
  153. List<HySoft.BaseCallCenter.Model.T_Sys_UserAccount> modelList = new List<HySoft.BaseCallCenter.Model.T_Sys_UserAccount>();
  154. int rowsCount = dt.Rows.Count;
  155. if (rowsCount > 0)
  156. {
  157. HySoft.BaseCallCenter.Model.T_Sys_UserAccount model;
  158. for (int n = 0; n < rowsCount; n++)
  159. {
  160. model = dal.DataRowToModel1(dt.Rows[n]);
  161. if (model != null)
  162. {
  163. modelList.Add(model);
  164. }
  165. }
  166. }
  167. return modelList;
  168. }
  169. /// <summary>
  170. /// 获得数据列表
  171. /// </summary>
  172. public DataSet GetAllList()
  173. {
  174. return GetList("");
  175. }
  176. /// <summary>
  177. /// 分页获取数据列表
  178. /// </summary>
  179. public int GetRecordCount(string strWhere)
  180. {
  181. return dal.GetRecordCount(strWhere);
  182. }
  183. /// <summary>
  184. /// 分页获取数据列表
  185. /// </summary>
  186. public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
  187. {
  188. return dal.GetListByPage( strWhere, orderby, startIndex, endIndex);
  189. }
  190. /// <summary>
  191. /// 分页获取数据列表
  192. /// </summary>
  193. //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
  194. //{
  195. //return dal.GetList(PageSize,PageIndex,strWhere);
  196. //}
  197. #endregion BasicMethod
  198. #region ExtensionMethod
  199. #endregion ExtensionMethod
  200. }
  201. }