郑许地铁

T_QC_IndexRes.cs 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Data;
  6. namespace ZXDT.CallCenter.BLL
  7. {
  8. /// <summary>
  9. /// T_QC_IndexRes
  10. /// </summary>
  11. public partial class T_QC_IndexRes
  12. {
  13. private readonly ZXDT.CallCenter.DAL.T_QC_IndexRes dal = new ZXDT.CallCenter.DAL.T_QC_IndexRes();
  14. public T_QC_IndexRes()
  15. { }
  16. #region Method
  17. /// <summary>
  18. /// 是否存在该记录
  19. /// </summary>
  20. public bool Exists(int F_Id)
  21. {
  22. return dal.Exists(F_Id);
  23. }
  24. /// <summary>
  25. /// 增加一条数据
  26. /// </summary>
  27. public int Add(ZXDT.CallCenter.Model.T_QC_IndexRes model)
  28. {
  29. return dal.Add(model);
  30. }
  31. /// <summary>
  32. /// 更新一条数据
  33. /// </summary>
  34. public bool Update(ZXDT.CallCenter.Model.T_QC_IndexRes model)
  35. {
  36. return dal.Update(model);
  37. }
  38. /// <summary>
  39. /// 删除一条数据
  40. /// </summary>
  41. public bool Delete(int F_Id)
  42. {
  43. return dal.Delete(F_Id);
  44. }
  45. /// <summary>
  46. /// 删除一条数据
  47. /// </summary>
  48. public bool DeleteList(string F_Idlist)
  49. {
  50. return dal.DeleteList(F_Idlist);
  51. }
  52. /// <summary>
  53. /// 得到一个对象实体
  54. /// </summary>
  55. public ZXDT.CallCenter.Model.T_QC_IndexRes GetModel(int F_Id)
  56. {
  57. return dal.GetModel(F_Id);
  58. }
  59. /// <summary>
  60. /// 获得数据列表
  61. /// </summary>
  62. public DataSet GetList(string strWhere)
  63. {
  64. return dal.GetList(strWhere);
  65. }
  66. /// <summary>
  67. /// 获得前几行数据
  68. /// </summary>
  69. public DataSet GetList(int Top, string strWhere, string filedOrder)
  70. {
  71. return dal.GetList(Top, strWhere, filedOrder);
  72. }
  73. /// <summary>
  74. /// 获得数据列表
  75. /// </summary>
  76. public List<ZXDT.CallCenter.Model.T_QC_IndexRes> GetModelList(string strWhere)
  77. {
  78. DataSet ds = dal.GetList(strWhere);
  79. return DataTableToList(ds.Tables[0]);
  80. }
  81. /// <summary>
  82. /// 获得数据列表
  83. /// </summary>
  84. public List<ZXDT.CallCenter.Model.T_QC_IndexRes> DataTableToList(DataTable dt)
  85. {
  86. List<ZXDT.CallCenter.Model.T_QC_IndexRes> modelList = new List<ZXDT.CallCenter.Model.T_QC_IndexRes>();
  87. int rowsCount = dt.Rows.Count;
  88. if (rowsCount > 0)
  89. {
  90. ZXDT.CallCenter.Model.T_QC_IndexRes model;
  91. for (int n = 0; n < rowsCount; n++)
  92. {
  93. model = new ZXDT.CallCenter.Model.T_QC_IndexRes();
  94. if (dt.Rows[n]["F_Id"] != null && dt.Rows[n]["F_Id"].ToString() != "")
  95. {
  96. model.F_Id = int.Parse(dt.Rows[n]["F_Id"].ToString());
  97. }
  98. if (dt.Rows[n]["CallRecordsId"] != null && dt.Rows[n]["CallRecordsId"].ToString() != "")
  99. {
  100. model.CallRecordsId = int.Parse(dt.Rows[n]["CallRecordsId"].ToString());
  101. }
  102. if (dt.Rows[n]["F_IndexId"] != null && dt.Rows[n]["F_IndexId"].ToString() != "")
  103. {
  104. model.F_IndexId = int.Parse(dt.Rows[n]["F_IndexId"].ToString());
  105. }
  106. if (dt.Rows[n]["F_Score"] != null && dt.Rows[n]["F_Score"].ToString() != "")
  107. {
  108. model.F_Score = int.Parse(dt.Rows[n]["F_Score"].ToString());
  109. }
  110. if (dt.Rows[n]["F_QCScore"] != null && dt.Rows[n]["F_QCScore"].ToString() != "")
  111. {
  112. model.F_QCScore = int.Parse(dt.Rows[n]["F_QCScore"].ToString());
  113. }
  114. if (dt.Rows[n]["F_Remark"] != null && dt.Rows[n]["F_Remark"].ToString() != "")
  115. {
  116. model.F_Remark = dt.Rows[n]["F_Remark"].ToString();
  117. }
  118. modelList.Add(model);
  119. }
  120. }
  121. return modelList;
  122. }
  123. /// <summary>
  124. /// 获得数据列表
  125. /// </summary>
  126. public DataSet GetAllList()
  127. {
  128. return GetList("");
  129. }
  130. /// <summary>
  131. /// 分页获取数据列表
  132. /// </summary>
  133. public int GetRecordCount(string strWhere)
  134. {
  135. return dal.GetRecordCount(strWhere);
  136. }
  137. /// <summary>
  138. /// 分页获取数据列表
  139. /// </summary>
  140. public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
  141. {
  142. return dal.GetListByPage(strWhere, orderby, startIndex, endIndex);
  143. }
  144. /// <summary>
  145. /// 分页获取数据列表
  146. /// </summary>
  147. //public DataSet GetList(int PageSize,int PageIndex,string strWhere)
  148. //{
  149. //return dal.GetList(PageSize,PageIndex,strWhere);
  150. //}
  151. #endregion Method
  152. }
  153. }