南阳电信API

T_AutomaticCall_Phone.cs 4.8KB

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