新野县12345_后端

T_Sys_SystemConfig.cs 4.0KB

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