人民医院API

T_Sys_GroupClass.cs 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. /** 版本信息模板在安装目录下,可自行修改。
  2. * T_Sys_GroupClass.cs
  3. *
  4. * 功 能: N/A
  5. * 类 名: T_Sys_GroupClass
  6. *
  7. * Ver 变更日期 负责人 变更内容
  8. * ───────────────────────────────────
  9. * V0.01 2022/9/5 14:54:21 N/A 初版
  10. *
  11. * Copyright (c) 2012 Maticsoft Corporation. All rights reserved.
  12. *┌──────────────────────────────────┐
  13. *│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │
  14. *│ 版权所有:动软卓越(北京)科技有限公司              │
  15. *└──────────────────────────────────┘
  16. */
  17. using System;
  18. using System.Data;
  19. using System.Collections.Generic;
  20. using RMYY_CallCenter_Api.Model;
  21. namespace RMYY_CallCenter_Api.Bll
  22. {
  23. /// <summary>
  24. /// T_Sys_GroupClass
  25. /// </summary>
  26. public partial class T_Sys_GroupClass
  27. {
  28. private readonly RMYY_CallCenter_Api.Dal.T_Sys_GroupClass dal=new RMYY_CallCenter_Api.Dal.T_Sys_GroupClass();
  29. public T_Sys_GroupClass()
  30. {}
  31. #region BasicMethod
  32. /// <summary>
  33. /// 增加一条数据
  34. /// </summary>
  35. public long Add(RMYY_CallCenter_Api.Model.T_Sys_GroupClass model)
  36. {
  37. return dal.Add(model);
  38. }
  39. /// <summary>
  40. /// 更新一条数据
  41. /// </summary>
  42. public bool Update(RMYY_CallCenter_Api.Model.T_Sys_GroupClass model)
  43. {
  44. return dal.Update(model);
  45. }
  46. /// <summary>
  47. /// 删除一条数据
  48. /// </summary>
  49. public bool Delete(long 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_GroupClass GetModel(long F_Id)
  64. {
  65. return dal.GetModel(F_Id);
  66. }
  67. /// <summary>
  68. /// 得到一个对象实体,从缓存中
  69. /// </summary>
  70. //public RMYY_CallCenter_Api.Model.T_Sys_GroupClass GetModelByCache(long F_Id)
  71. //{
  72. // string CacheKey = "T_Sys_GroupClassModel-" + F_Id;
  73. // object objModel = Maticsoft.Common.DataCache.GetCache(CacheKey);
  74. // if (objModel == null)
  75. // {
  76. // try
  77. // {
  78. // objModel = dal.GetModel(F_Id);
  79. // if (objModel != null)
  80. // {
  81. // int ModelCache = Maticsoft.Common.ConfigHelper.GetConfigInt("ModelCache");
  82. // Maticsoft.Common.DataCache.SetCache(CacheKey, objModel, DateTime.Now.AddMinutes(ModelCache), TimeSpan.Zero);
  83. // }
  84. // }
  85. // catch{}
  86. // }
  87. // return (RMYY_CallCenter_Api.Model.T_Sys_GroupClass)objModel;
  88. //}
  89. ///// <summary>
  90. /// 获得数据列表
  91. /// </summary>
  92. public DataSet GetList(string strWhere)
  93. {
  94. return dal.GetList(strWhere);
  95. }
  96. /// <summary>
  97. /// 获得前几行数据
  98. /// </summary>
  99. public DataSet GetList(int Top,string strWhere,string filedOrder)
  100. {
  101. return dal.GetList(Top,strWhere,filedOrder);
  102. }
  103. /// <summary>
  104. /// 获得数据列表
  105. /// </summary>
  106. public List<RMYY_CallCenter_Api.Model.T_Sys_GroupClass> GetModelList(string strWhere)
  107. {
  108. DataSet ds = dal.GetList(strWhere);
  109. return DataTableToList(ds.Tables[0]);
  110. }
  111. /// <summary>
  112. /// 获得数据列表
  113. /// </summary>
  114. public List<RMYY_CallCenter_Api.Model.T_Sys_GroupClass> DataTableToList(DataTable dt)
  115. {
  116. List<RMYY_CallCenter_Api.Model.T_Sys_GroupClass> modelList = new List<RMYY_CallCenter_Api.Model.T_Sys_GroupClass>();
  117. int rowsCount = dt.Rows.Count;
  118. if (rowsCount > 0)
  119. {
  120. RMYY_CallCenter_Api.Model.T_Sys_GroupClass model;
  121. for (int n = 0; n < rowsCount; n++)
  122. {
  123. model = dal.DataRowToModel(dt.Rows[n]);
  124. if (model != null)
  125. {
  126. modelList.Add(model);
  127. }
  128. }
  129. }
  130. return modelList;
  131. }
  132. /// <summary>
  133. /// 获得数据列表
  134. /// </summary>
  135. public DataSet GetAllList()
  136. {
  137. return GetList("");
  138. }
  139. /// <summary>
  140. /// 分页获取数据列表
  141. /// </summary>
  142. public int GetRecordCount(string strWhere)
  143. {
  144. return dal.GetRecordCount(strWhere);
  145. }
  146. /// <summary>
  147. /// 分页获取数据列表
  148. /// </summary>
  149. public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
  150. {
  151. return dal.GetListByPage( strWhere, orderby, startIndex, endIndex);
  152. }
  153. /// <summary>
  154. /// 分页获取数据列表
  155. /// </summary>
  156. //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
  157. //{
  158. //return dal.GetList(PageSize,PageIndex,strWhere);
  159. //}
  160. #endregion BasicMethod
  161. #region ExtensionMethod
  162. #endregion ExtensionMethod
  163. }
  164. }