高新区管委会,以5.0标准版为基准,从双汇项目拷贝

T_Rec_RegRecords.cs 3.6KB

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