Нет описания

Rotation.cs 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. public class Rotation
  10. {
  11. DAL.Rotation dal = new DAL.Rotation();
  12. /// <summary>
  13. /// 增加一条图片
  14. /// </summary>
  15. /// <param name="model"></param>
  16. /// <returns></returns>
  17. public int Add(Model.Rotation model)
  18. {
  19. return dal.Add(model);
  20. }
  21. /// <summary>
  22. /// 查询图片信息
  23. /// </summary>
  24. /// <returns></returns>
  25. public DataSet GetList(string name)
  26. {
  27. return dal.GetList(name);
  28. }
  29. /// <summary>
  30. /// 禁用图片信息
  31. /// </summary>
  32. /// <param name="id"></param>
  33. /// <returns></returns>
  34. public bool delrotation(string id)
  35. {
  36. return dal.delrotation(id);
  37. }
  38. /// <summary>
  39. /// 启用图片信息
  40. /// </summary>
  41. /// <param name="id"></param>
  42. /// <returns></returns>
  43. public bool poenRotion(string id)
  44. {
  45. return dal.poenRotion(id);
  46. }
  47. /// <summary>
  48. /// 删除图片信息
  49. /// </summary>
  50. /// <returns></returns>
  51. public bool SCRotion(string id)
  52. {
  53. return dal.SCRotion(id);
  54. }
  55. /// <summary>
  56. /// 获取数剧列表
  57. /// </summary>
  58. /// <param name="dt"></param>
  59. /// <returns></returns>
  60. public List<Model.Rotation> DataTableToList(DataTable dt)
  61. {
  62. List<Model.Rotation> modelList = new List<Model.Rotation>();
  63. int rowsCount = dt.Rows.Count;
  64. if (rowsCount > 0)
  65. {
  66. Model.Rotation model;
  67. for (int n = 0; n < rowsCount; n++)
  68. {
  69. model = dal.DataRowToModel(dt.Rows[n]);
  70. if (model != null)
  71. {
  72. modelList.Add(model);
  73. }
  74. }
  75. }
  76. return modelList;
  77. }
  78. }
  79. }