鄂尔多斯-招源科技

CallResult.cs 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System.Collections.Generic;
  2. using System.Data;
  3. namespace CallCenterApi.BLL
  4. {
  5. public class CallResult
  6. {
  7. private readonly DAL.CallRecords dal = new DAL.CallRecords();
  8. public CallResult()
  9. { }
  10. #region BasicMethod
  11. /// <summary>
  12. /// 获得数据列表
  13. /// </summary>
  14. public List<Model.CallResult> DataTableToList(DataTable dt)
  15. {
  16. List<Model.CallResult> modelList = new List<Model.CallResult>();
  17. int rowsCount = dt.Rows.Count;
  18. if (rowsCount > 0)
  19. {
  20. Model.CallResult model;
  21. for (int n = 0; n < rowsCount; n++)
  22. {
  23. model = dal.DataRowToModel(dt.Rows[n]);
  24. if (model != null)
  25. {
  26. modelList.Add(model);
  27. }
  28. }
  29. }
  30. return modelList;
  31. }
  32. /// <summary>
  33. /// 获得数据列表
  34. /// </summary>
  35. public List<Model.CallResult> DataTableToListQC(DataTable dt)
  36. {
  37. List<Model.CallResult> modelList = new List<Model.CallResult>();
  38. int rowsCount = dt.Rows.Count;
  39. if (rowsCount > 0)
  40. {
  41. Model.CallResult model;
  42. for (int n = 0; n < rowsCount; n++)
  43. {
  44. model = dal.DataRowToModelQC(dt.Rows[n]);
  45. if (model != null)
  46. {
  47. modelList.Add(model);
  48. }
  49. }
  50. }
  51. return modelList;
  52. }
  53. public Model.CallResult GetModel(string callId)
  54. {
  55. return dal.GetModel(callId);
  56. }
  57. public bool UpdateQC(Model.CallResult model)
  58. {
  59. return dal.UpdateQC(model);
  60. }
  61. #endregion BasicMethod
  62. #region ExtensionMethod
  63. #endregion ExtensionMethod
  64. }
  65. }