Geen omschrijving

T_Sys_Department.cs 4.4KB

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