南阳电信API

T_Sys_AutoCallTime.cs 4.6KB

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