DataBaseBackupBll.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. using LeaRun.Application.Entity.SystemManage;
  2. using LeaRun.Application.IService.SystemManage;
  3. using LeaRun.Application.Service.SystemManage;
  4. using System;
  5. using System.Collections.Generic;
  6. namespace LeaRun.Application.Busines.SystemManage
  7. {
  8. /// <summary>
  9. /// 版 本 6.1
  10. /// Copyright (c) 2013-2016 上海力软信息技术有限公司
  11. /// 创建人:佘赐雄
  12. /// 日 期:2015.11.25 11:02
  13. /// 描 述:数据库备份
  14. /// </summary>
  15. public class DataBaseBackupBLL
  16. {
  17. private IDataBaseBackupService service = new DataBaseBackupService();
  18. #region 获取数据
  19. /// <summary>
  20. /// 库备份列表
  21. /// </summary>
  22. /// <param name="dataBaseLinkId">连接库Id</param>
  23. /// <param name="queryJson">查询参数</param>
  24. /// <returns></returns>
  25. public IEnumerable<DataBaseBackupEntity> GetList(string dataBaseLinkId, string queryJson)
  26. {
  27. return service.GetList(dataBaseLinkId, queryJson);
  28. }
  29. /// <summary>
  30. /// 库备份文件路径列表
  31. /// </summary>
  32. /// <param name="databaseBackupId">计划Id</param>
  33. /// <returns></returns>
  34. public IEnumerable<DataBaseBackupEntity> GetPathList(string databaseBackupId)
  35. {
  36. return service.GetPathList(databaseBackupId);
  37. }
  38. /// <summary>
  39. /// 库备份实体
  40. /// </summary>
  41. /// <param name="keyValue">主键值</param>
  42. /// <returns></returns>
  43. public DataBaseBackupEntity GetEntity(string keyValue)
  44. {
  45. return service.GetEntity(keyValue);
  46. }
  47. #endregion
  48. #region 提交数据
  49. /// <summary>
  50. /// 删除库备份
  51. /// </summary>
  52. /// <param name="keyValue">主键</param>
  53. public void RemoveForm(string keyValue)
  54. {
  55. try
  56. {
  57. service.RemoveForm(keyValue);
  58. }
  59. catch (Exception)
  60. {
  61. throw;
  62. }
  63. }
  64. /// <summary>
  65. /// 保存库备份表单(新增、修改)
  66. /// </summary>
  67. /// <param name="keyValue">主键值</param>
  68. /// <param name="dataBaseBackupEntity">库备份实体</param>
  69. /// <returns></returns>
  70. public void SaveForm(string keyValue, DataBaseBackupEntity dataBaseBackupEntity)
  71. {
  72. try
  73. {
  74. service.SaveForm(keyValue, dataBaseBackupEntity);
  75. }
  76. catch (Exception)
  77. {
  78. throw;
  79. }
  80. }
  81. #endregion
  82. }
  83. }