Geen omschrijving

T_Wo_TempStorage.cs 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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. /// T_Wo_TempStorage
  11. /// </summary>
  12. public partial class T_Wo_TempStorage
  13. {
  14. private readonly CallCenterApi.DAL.T_Wo_TempStorage dal = new CallCenterApi.DAL.T_Wo_TempStorage();
  15. public T_Wo_TempStorage()
  16. { }
  17. #region BasicMethod
  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_Wo_TempStorage model)
  29. {
  30. return dal.Add(model);
  31. }
  32. /// <summary>
  33. /// 更新一条数据
  34. /// </summary>
  35. public bool Update(CallCenterApi.Model.T_Wo_TempStorage 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. /// <param name="where"></param>
  57. /// <returns></returns>
  58. public bool DelteByWhere(string where)
  59. {
  60. return dal.DelteByWhere(where);
  61. }
  62. /// <summary>
  63. /// 得到一个对象实体
  64. /// </summary>
  65. public CallCenterApi.Model.T_Wo_TempStorage GetModel(int F_Id)
  66. {
  67. return dal.GetModel(F_Id);
  68. }
  69. /// <summary>
  70. /// 获得数据列表
  71. /// </summary>
  72. public DataSet GetList(string strWhere)
  73. {
  74. return dal.GetList(strWhere);
  75. }
  76. /// <summary>
  77. /// 获得前几行数据
  78. /// </summary>
  79. public DataSet GetList(int Top, string strWhere, string filedOrder)
  80. {
  81. return dal.GetList(Top, strWhere, filedOrder);
  82. }
  83. /// <summary>
  84. /// 获得数据列表
  85. /// </summary>
  86. public List<CallCenterApi.Model.T_Wo_TempStorage> GetModelList(string strWhere)
  87. {
  88. DataSet ds = dal.GetList(strWhere);
  89. return DataTableToList(ds.Tables[0]);
  90. }
  91. /// <summary>
  92. /// 获得数据列表
  93. /// </summary>
  94. public List<CallCenterApi.Model.T_Wo_TempStorage> DataTableToList(DataTable dt)
  95. {
  96. List<CallCenterApi.Model.T_Wo_TempStorage> modelList = new List<CallCenterApi.Model.T_Wo_TempStorage>();
  97. int rowsCount = dt.Rows.Count;
  98. if (rowsCount > 0)
  99. {
  100. CallCenterApi.Model.T_Wo_TempStorage model;
  101. for (int n = 0; n < rowsCount; n++)
  102. {
  103. model = dal.DataRowToModel(dt.Rows[n]);
  104. if (model != null)
  105. {
  106. modelList.Add(model);
  107. }
  108. }
  109. }
  110. return modelList;
  111. }
  112. /// <summary>
  113. /// 获得数据列表
  114. /// </summary>
  115. public DataSet GetAllList()
  116. {
  117. return GetList("");
  118. }
  119. /// <summary>
  120. /// 分页获取数据列表
  121. /// </summary>
  122. public int GetRecordCount(string strWhere)
  123. {
  124. return dal.GetRecordCount(strWhere);
  125. }
  126. /// <summary>
  127. /// 分页获取数据列表
  128. /// </summary>
  129. public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
  130. {
  131. return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
  132. }
  133. #endregion BasicMethod
  134. #region ExtensionMethod
  135. #endregion ExtensionMethod
  136. }
  137. }