郑许地铁

T_SYS_Time.cs 2.9KB

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