地铁二期项目正式开始

T_Sys_UserAccount.cs 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. 
  2. using System;
  3. using System.Data;
  4. using System.Collections.Generic;
  5. using YTSoft.Common;
  6. using YTSoft.BaseCallCenter.Model;
  7. namespace YTSoft.BaseCallCenter.BLL
  8. {
  9. /// <summary>
  10. /// T_Sys_UserAccount
  11. /// </summary>
  12. public partial class T_Sys_UserAccount
  13. {
  14. private readonly YTSoft.BaseCallCenter.DAL.T_Sys_UserAccount dal=new YTSoft.BaseCallCenter.DAL.T_Sys_UserAccount();
  15. public T_Sys_UserAccount()
  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_UserId)
  29. {
  30. return dal.Exists(F_UserId);
  31. }
  32. /// <summary>
  33. /// 增加一条数据
  34. /// </summary>
  35. public int Add(YTSoft.BaseCallCenter.Model.T_Sys_UserAccount model)
  36. {
  37. return dal.Add(model);
  38. }
  39. /// <summary>
  40. /// 更新一条数据
  41. /// </summary>
  42. public bool Update(YTSoft.BaseCallCenter.Model.T_Sys_UserAccount model)
  43. {
  44. return dal.Update(model);
  45. }
  46. /// <summary>
  47. /// 删除一条数据
  48. /// </summary>
  49. public bool Delete(int F_UserId)
  50. {
  51. return dal.Delete(F_UserId);
  52. }
  53. /// <summary>
  54. /// 删除一条数据
  55. /// </summary>
  56. public bool DeleteList(string F_UserIdlist )
  57. {
  58. return dal.DeleteList(F_UserIdlist );
  59. }
  60. /// <summary>
  61. /// 得到一个对象实体
  62. /// </summary>
  63. public YTSoft.BaseCallCenter.Model.T_Sys_UserAccount GetModel(int F_UserId)
  64. {
  65. return dal.GetModel(F_UserId);
  66. }
  67. public YTSoft.BaseCallCenter.Model.T_Sys_UserAccount GetModel(string Where)
  68. {
  69. return dal.GetModel(Where);
  70. }
  71. /// <summary>
  72. /// 得到一个对象实体
  73. /// </summary>
  74. public YTSoft.BaseCallCenter.Model.T_Sys_UserAccount GetModelByUserCode(string userCode)
  75. {
  76. return dal.GetModelByUserCode(userCode);
  77. }
  78. ///// <summary>
  79. ///// 得到一个对象实体,从缓存中
  80. ///// </summary>
  81. //public YTSoft.BaseCallCenter.Model.T_Sys_UserAccount GetModelByCache(int F_UserId)
  82. //{
  83. // string CacheKey = "T_Sys_UserAccountModel-" + F_UserId;
  84. // object objModel = Maticsoft.Common.DataCache.GetCache(CacheKey);
  85. // if (objModel == null)
  86. // {
  87. // try
  88. // {
  89. // objModel = dal.GetModel(F_UserId);
  90. // if (objModel != null)
  91. // {
  92. // int ModelCache = Maticsoft.Common.ConfigHelper.GetConfigInt("ModelCache");
  93. // Maticsoft.Common.DataCache.SetCache(CacheKey, objModel, DateTime.Now.AddMinutes(ModelCache), TimeSpan.Zero);
  94. // }
  95. // }
  96. // catch{}
  97. // }
  98. // return (YTSoft.BaseCallCenter.Model.T_Sys_UserAccount)objModel;
  99. //}
  100. /// <summary>
  101. /// 获得数据列表
  102. /// </summary>
  103. public DataSet GetList(string strWhere)
  104. {
  105. return dal.GetList(strWhere);
  106. }
  107. /// <summary>
  108. /// 获得数据列表
  109. /// </summary>
  110. public DataSet GetList(string userName,string passWord)
  111. {
  112. return dal.GetList(userName, passWord);
  113. }
  114. public DataSet GetListView(string strWhere)
  115. {
  116. return dal.GetListView(strWhere);
  117. }
  118. /// <summary>
  119. /// 获得前几行数据
  120. /// </summary>
  121. public DataSet GetList(int Top,string strWhere,string filedOrder)
  122. {
  123. return dal.GetList(Top,strWhere,filedOrder);
  124. }
  125. /// <summary>
  126. /// 获得数据列表
  127. /// </summary>
  128. public List<YTSoft.BaseCallCenter.Model.T_Sys_UserAccount> GetModelList(string strWhere)
  129. {
  130. DataSet ds = dal.GetList(strWhere);
  131. return DataTableToList(ds.Tables[0]);
  132. }
  133. /// <summary>
  134. /// 获得数据列表
  135. /// </summary>
  136. public List<YTSoft.BaseCallCenter.Model.T_Sys_UserAccount> DataTableToList(DataTable dt)
  137. {
  138. List<YTSoft.BaseCallCenter.Model.T_Sys_UserAccount> modelList = new List<YTSoft.BaseCallCenter.Model.T_Sys_UserAccount>();
  139. int rowsCount = dt.Rows.Count;
  140. if (rowsCount > 0)
  141. {
  142. YTSoft.BaseCallCenter.Model.T_Sys_UserAccount model;
  143. for (int n = 0; n < rowsCount; n++)
  144. {
  145. model = dal.DataRowToModel(dt.Rows[n]);
  146. if (model != null)
  147. {
  148. modelList.Add(model);
  149. }
  150. }
  151. }
  152. return modelList;
  153. }
  154. public List<YTSoft.BaseCallCenter.Model.T_Sys_UserAccount> DataTableToList1(DataTable dt)
  155. {
  156. List<YTSoft.BaseCallCenter.Model.T_Sys_UserAccount> modelList = new List<YTSoft.BaseCallCenter.Model.T_Sys_UserAccount>();
  157. int rowsCount = dt.Rows.Count;
  158. if (rowsCount > 0)
  159. {
  160. YTSoft.BaseCallCenter.Model.T_Sys_UserAccount model;
  161. for (int n = 0; n < rowsCount; n++)
  162. {
  163. model = dal.DataRowToModel1(dt.Rows[n]);
  164. if (model != null)
  165. {
  166. modelList.Add(model);
  167. }
  168. }
  169. }
  170. return modelList;
  171. }
  172. /// <summary>
  173. /// 获得数据列表
  174. /// </summary>
  175. public DataSet GetAllList()
  176. {
  177. return GetList("");
  178. }
  179. /// <summary>
  180. /// 分页获取数据列表
  181. /// </summary>
  182. public int GetRecordCount(string strWhere)
  183. {
  184. return dal.GetRecordCount(strWhere);
  185. }
  186. /// <summary>
  187. /// 分页获取数据列表
  188. /// </summary>
  189. public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
  190. {
  191. return dal.GetListByPage( strWhere, orderby, startIndex, endIndex);
  192. }
  193. /// <summary>
  194. /// 分页获取数据列表
  195. /// </summary>
  196. //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
  197. //{
  198. //return dal.GetList(PageSize,PageIndex,strWhere);
  199. //}
  200. public bool UpdateWXId(string collName, int keyID, int userId)
  201. {
  202. return dal.UpdateWXId( collName, keyID, userId);
  203. }
  204. #endregion BasicMethod
  205. #region ExtensionMethod
  206. #endregion ExtensionMethod
  207. }
  208. }