人民医院API

T_Sys_CustomFiled.cs 4.3KB

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