郑许地铁

T_Hr_EmployeeBase.cs 5.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Data;
  6. namespace ZXDT.CallCenter.BLL
  7. {
  8. /// <summary>
  9. /// T_Hr_EmployeeBase
  10. /// </summary>
  11. public partial class T_Hr_EmployeeBase
  12. {
  13. private readonly ZXDT.CallCenter.DAL.T_Hr_EmployeeBase dal = new ZXDT.CallCenter.DAL.T_Hr_EmployeeBase();
  14. public T_Hr_EmployeeBase()
  15. { }
  16. #region BasicMethod
  17. /// <summary>
  18. /// 是否存在该记录
  19. /// </summary>
  20. public bool Exists(int F_EmployeeId)
  21. {
  22. return dal.Exists(F_EmployeeId);
  23. }
  24. /// <summary>
  25. /// 增加一条数据
  26. /// </summary>
  27. public int Add(ZXDT.CallCenter.Model.T_Hr_EmployeeBase model)
  28. {
  29. return dal.Add(model);
  30. }
  31. /// <summary>
  32. /// 更新一条数据
  33. /// </summary>
  34. public bool Update(ZXDT.CallCenter.Model.T_Hr_EmployeeBase model)
  35. {
  36. return dal.Update(model);
  37. }
  38. /// <summary>
  39. /// 删除一条数据
  40. /// </summary>
  41. public bool Delete(int F_EmployeeId)
  42. {
  43. return dal.Delete(F_EmployeeId);
  44. }
  45. /// <summary>
  46. /// 删除一条数据
  47. /// </summary>
  48. public bool DeleteList(string F_EmployeeIdlist)
  49. {
  50. return dal.DeleteList(F_EmployeeIdlist);
  51. }
  52. /// <summary>
  53. /// 得到一个对象实体
  54. /// </summary>
  55. public ZXDT.CallCenter.Model.T_Hr_EmployeeBase GetModel(int F_EmployeeId)
  56. {
  57. return dal.GetModel(F_EmployeeId);
  58. }
  59. ///// <summary>
  60. ///// 得到一个对象实体,从缓存中
  61. ///// </summary>
  62. //public ZXDT.CallCenter.Model.T_Hr_EmployeeBase GetModelByCache(int F_EmployeeId)
  63. //{
  64. // string CacheKey = "T_Hr_EmployeeBaseModel-" + F_EmployeeId;
  65. // object objModel = Maticsoft.Common.DataCache.GetCache(CacheKey);
  66. // if (objModel == null)
  67. // {
  68. // try
  69. // {
  70. // objModel = dal.GetModel(F_EmployeeId);
  71. // if (objModel != null)
  72. // {
  73. // int ModelCache = Maticsoft.Common.ConfigHelper.GetConfigInt("ModelCache");
  74. // Maticsoft.Common.DataCache.SetCache(CacheKey, objModel, DateTime.Now.AddMinutes(ModelCache), TimeSpan.Zero);
  75. // }
  76. // }
  77. // catch { }
  78. // }
  79. // return (ZXDT.CallCenter.Model.T_Hr_EmployeeBase)objModel;
  80. //}
  81. /// <summary>
  82. /// 获得数据列表
  83. /// </summary>
  84. public DataSet GetList(string strWhere)
  85. {
  86. return dal.GetList(strWhere);
  87. }
  88. /// <summary>
  89. /// 获得前几行数据
  90. /// </summary>
  91. public DataSet GetList(int Top, string strWhere, string filedOrder)
  92. {
  93. return dal.GetList(Top, strWhere, filedOrder);
  94. }
  95. /// <summary>
  96. /// 获得数据列表
  97. /// </summary>
  98. public List<ZXDT.CallCenter.Model.T_Hr_EmployeeBase> GetModelList(string strWhere)
  99. {
  100. DataSet ds = dal.GetList(strWhere);
  101. return DataTableToList(ds.Tables[0]);
  102. }
  103. /// <summary>
  104. /// 获得数据列表
  105. /// </summary>
  106. public List<ZXDT.CallCenter.Model.T_Hr_EmployeeBase> DataTableToList(DataTable dt)
  107. {
  108. List<ZXDT.CallCenter.Model.T_Hr_EmployeeBase> modelList = new List<ZXDT.CallCenter.Model.T_Hr_EmployeeBase>();
  109. int rowsCount = dt.Rows.Count;
  110. if (rowsCount > 0)
  111. {
  112. ZXDT.CallCenter.Model.T_Hr_EmployeeBase model;
  113. for (int n = 0; n < rowsCount; n++)
  114. {
  115. model = dal.DataRowToModel(dt.Rows[n]);
  116. if (model != null)
  117. {
  118. modelList.Add(model);
  119. }
  120. }
  121. }
  122. return modelList;
  123. }
  124. /// <summary>
  125. /// 获得数据列表
  126. /// </summary>
  127. public DataSet GetAllList()
  128. {
  129. return GetList("");
  130. }
  131. /// <summary>
  132. /// 分页获取数据列表
  133. /// </summary>
  134. public int GetRecordCount(string strWhere)
  135. {
  136. return dal.GetRecordCount(strWhere);
  137. }
  138. /// <summary>
  139. /// 分页获取数据列表
  140. /// </summary>
  141. public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
  142. {
  143. return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
  144. }
  145. /// <summary>
  146. /// 分页获取数据列表
  147. /// </summary>
  148. //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
  149. //{
  150. //return dal.GetList(PageSize,PageIndex,strWhere);
  151. //}
  152. #endregion BasicMethod
  153. #region ExtensionMethod
  154. #endregion ExtensionMethod
  155. }
  156. }