No Description

T_Bus_NoticeCriticism.cs 4.1KB

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