南阳电信API

T_AutoCall_Result.cs 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. /** 版本信息模板在安装目录下,可自行修改。
  2. * T_AutoCall_Result.cs
  3. *
  4. * 功 能: N/A
  5. * 类 名: T_AutoCall_Result
  6. *
  7. * Ver 变更日期 负责人 变更内容
  8. * ───────────────────────────────────
  9. * V0.01 2022/2/23 09:12:42 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 CallCenterApi.Model;
  21. namespace CallCenterApi.BLL
  22. {
  23. /// <summary>
  24. /// T_AutoCall_Result
  25. /// </summary>
  26. public partial class T_AutoCall_Result
  27. {
  28. private readonly CallCenterApi.DAL.T_AutoCall_Result dal=new CallCenterApi.DAL.T_AutoCall_Result();
  29. public T_AutoCall_Result()
  30. {}
  31. #region BasicMethod
  32. /// <summary>
  33. /// 得到最大ID
  34. /// </summary>
  35. public int GetMaxId()
  36. {
  37. return dal.GetMaxId();
  38. }
  39. /// <summary>
  40. /// 是否存在该记录
  41. /// </summary>
  42. public bool Exists(int Id)
  43. {
  44. return dal.Exists(Id);
  45. }
  46. /// <summary>
  47. /// 增加一条数据
  48. /// </summary>
  49. public int Add(CallCenterApi.Model.T_AutoCall_Result model)
  50. {
  51. return dal.Add(model);
  52. }
  53. /// <summary>
  54. /// 更新一条数据
  55. /// </summary>
  56. public bool Update(CallCenterApi.Model.T_AutoCall_Result model)
  57. {
  58. return dal.Update(model);
  59. }
  60. /// <summary>
  61. /// 删除一条数据
  62. /// </summary>
  63. public bool Delete(int Id)
  64. {
  65. return dal.Delete(Id);
  66. }
  67. /// <summary>
  68. /// 删除一条数据
  69. /// </summary>
  70. public bool DeleteList(string Idlist )
  71. {
  72. return dal.DeleteList(Idlist );
  73. }
  74. /// <summary>
  75. /// 得到一个对象实体
  76. /// </summary>
  77. public CallCenterApi.Model.T_AutoCall_Result GetModel(int Id)
  78. {
  79. return dal.GetModel(Id);
  80. }
  81. ///// <summary>
  82. ///// 得到一个对象实体,从缓存中
  83. ///// </summary>
  84. //public CallCenterApi.Model.T_AutoCall_Result GetModelByCache(int Id)
  85. //{
  86. // string CacheKey = "T_AutoCall_ResultModel-" + Id;
  87. // object objModel = Maticsoft.Common.DataCache.GetCache(CacheKey);
  88. // if (objModel == null)
  89. // {
  90. // try
  91. // {
  92. // objModel = dal.GetModel(Id);
  93. // if (objModel != null)
  94. // {
  95. // int ModelCache = Maticsoft.Common.ConfigHelper.GetConfigInt("ModelCache");
  96. // Maticsoft.Common.DataCache.SetCache(CacheKey, objModel, DateTime.Now.AddMinutes(ModelCache), TimeSpan.Zero);
  97. // }
  98. // }
  99. // catch{}
  100. // }
  101. // return (CallCenterApi.Model.T_AutoCall_Result)objModel;
  102. //}
  103. /// <summary>
  104. /// 获得数据列表
  105. /// </summary>
  106. public DataSet GetList(string strWhere)
  107. {
  108. return dal.GetList(strWhere);
  109. }
  110. public DataSet exportList(string strWhere)
  111. {
  112. return dal.exportList(strWhere);
  113. }
  114. /// <summary>
  115. /// 分页获取数据列表
  116. /// </summary>
  117. public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
  118. {
  119. return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
  120. }
  121. /// <summary>
  122. /// 获得前几行数据
  123. /// </summary>
  124. public DataSet GetList(int Top,string strWhere,string filedOrder)
  125. {
  126. return dal.GetList(Top,strWhere,filedOrder);
  127. }
  128. /// <summary>
  129. /// 获得数据列表
  130. /// </summary>
  131. public List<CallCenterApi.Model.T_AutoCall_Result> GetModelList(string strWhere)
  132. {
  133. DataSet ds = dal.GetList(strWhere);
  134. return DataTableToList(ds.Tables[0]);
  135. }
  136. /// <summary>
  137. /// 获得数据列表
  138. /// </summary>
  139. public List<CallCenterApi.Model.T_AutoCall_Result> DataTableToList(DataTable dt)
  140. {
  141. List<CallCenterApi.Model.T_AutoCall_Result> modelList = new List<CallCenterApi.Model.T_AutoCall_Result>();
  142. int rowsCount = dt.Rows.Count;
  143. if (rowsCount > 0)
  144. {
  145. CallCenterApi.Model.T_AutoCall_Result model;
  146. for (int n = 0; n < rowsCount; n++)
  147. {
  148. model = dal.DataRowToModel(dt.Rows[n]);
  149. if (model != null)
  150. {
  151. modelList.Add(model);
  152. }
  153. }
  154. }
  155. return modelList;
  156. }
  157. /// <summary>
  158. /// 获得数据列表
  159. /// </summary>
  160. public DataSet GetAllList()
  161. {
  162. return GetList("");
  163. }
  164. /// <summary>
  165. /// 分页获取数据列表
  166. /// </summary>
  167. public int GetRecordCount(string strWhere)
  168. {
  169. return dal.GetRecordCount(strWhere);
  170. }
  171. /// <summary>
  172. /// 分页获取数据列表
  173. /// </summary>
  174. //public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
  175. //{
  176. // return dal.GetListByPage( strWhere, orderby, startIndex, endIndex);
  177. //}
  178. /// <summary>
  179. /// 分页获取数据列表
  180. /// </summary>
  181. //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
  182. //{
  183. //return dal.GetList(PageSize,PageIndex,strWhere);
  184. //}
  185. #endregion BasicMethod
  186. #region ExtensionMethod
  187. #endregion ExtensionMethod
  188. }
  189. }