郑州颐和随访系统

T_Con_Conversation.cs 3.7KB

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