Nessuna descrizione

T_Bus_ToExamine.cs 4.4KB

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