郑许地铁

rec_file_info.cs 3.8KB

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