市长热线演示版

T_RepositoryCategory.cs 3.4KB

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