新野县12345_后端

T_Call_CallRecordsLD.cs 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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_Call_CallRecordsLD
  11. /// </summary>
  12. public partial class T_Call_CallRecordsLD
  13. {
  14. private readonly DAL.T_Call_CallRecordsLD dal = new DAL.T_Call_CallRecordsLD();
  15. public T_Call_CallRecordsLD()
  16. { }
  17. #region BasicMethod
  18. /// <summary>
  19. /// 增加一条数据
  20. /// </summary>
  21. public int Add(Model.T_Call_CallRecordsLD model)
  22. {
  23. return dal.Add(model);
  24. }
  25. /// <summary>
  26. /// 更新一条数据
  27. /// </summary>
  28. public bool Update(Model.T_Call_CallRecordsLD model)
  29. {
  30. return dal.Update(model);
  31. }
  32. /// <summary>
  33. /// 得到一个对象实体
  34. /// </summary>
  35. public Model.T_Call_CallRecordsLD GetModel(int F_CallRLDID)
  36. {
  37. return dal.GetModel(F_CallRLDID);
  38. }
  39. /// <summary>
  40. /// 获得数据列表
  41. /// </summary>
  42. public DataSet GetList(string strWhere)
  43. {
  44. return dal.GetList(strWhere);
  45. }
  46. /// <summary>
  47. /// 获得前几行数据
  48. /// </summary>
  49. public DataSet GetList(int Top, string strWhere, string filedOrder)
  50. {
  51. return dal.GetList(Top, strWhere, filedOrder);
  52. }
  53. /// <summary>
  54. /// 获得数据列表
  55. /// </summary>
  56. public List<Model.T_Call_CallRecordsLD> GetModelList(string strWhere)
  57. {
  58. DataSet ds = dal.GetList(strWhere);
  59. return DataTableToList(ds.Tables[0]);
  60. }
  61. /// <summary>
  62. /// 获得数据列表
  63. /// </summary>
  64. public List<Model.T_Call_CallRecordsLD> DataTableToList(DataTable dt)
  65. {
  66. List<Model.T_Call_CallRecordsLD> modelList = new List<Model.T_Call_CallRecordsLD>();
  67. int rowsCount = dt.Rows.Count;
  68. if (rowsCount > 0)
  69. {
  70. Model.T_Call_CallRecordsLD model;
  71. for (int n = 0; n < rowsCount; n++)
  72. {
  73. model = dal.DataRowToModel(dt.Rows[n]);
  74. if (model != null)
  75. {
  76. modelList.Add(model);
  77. }
  78. }
  79. }
  80. return modelList;
  81. }
  82. /// <summary>
  83. /// 获得数据列表
  84. /// </summary>
  85. public DataSet GetAllList()
  86. {
  87. return GetList("");
  88. }
  89. /// <summary>
  90. /// 分页获取数据列表
  91. /// </summary>
  92. public int GetRecordCount(string strWhere)
  93. {
  94. return dal.GetRecordCount(strWhere);
  95. }
  96. /// <summary>
  97. /// 分页获取数据列表
  98. /// </summary>
  99. public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
  100. {
  101. return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
  102. }
  103. #endregion BasicMethod
  104. #region ExtensionMethod
  105. #endregion ExtensionMethod
  106. }
  107. }