Keine Beschreibung

T_RepositoryInformation.cs 4.6KB

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