RoadFlow2.1 临时演示

IDictionary.cs 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. using System;
  2. using System.Collections.Generic;
  3. namespace RoadFlow.Data.Interface
  4. {
  5. public interface IDictionary
  6. {
  7. /// <summary>
  8. /// 新增
  9. /// </summary>
  10. int Add(RoadFlow.Data.Model.Dictionary model);
  11. /// <summary>
  12. /// 更新
  13. /// </summary>
  14. int Update(RoadFlow.Data.Model.Dictionary model);
  15. /// <summary>
  16. /// 查询所有记录
  17. /// </summary>
  18. List<RoadFlow.Data.Model.Dictionary> GetAll();
  19. /// <summary>
  20. /// 查询单条记录
  21. /// </summary>
  22. Model.Dictionary Get(Guid id);
  23. /// <summary>
  24. /// 删除
  25. /// </summary>
  26. int Delete(Guid id);
  27. /// <summary>
  28. /// 查询记录条数
  29. /// </summary>
  30. long GetCount();
  31. /// <summary>
  32. /// 查询根记录
  33. /// </summary>
  34. RoadFlow.Data.Model.Dictionary GetRoot();
  35. /// <summary>
  36. /// 查询下级记录
  37. /// </summary>
  38. List<RoadFlow.Data.Model.Dictionary> GetChilds(Guid id);
  39. /// <summary>
  40. /// 查询下级记录
  41. /// </summary>
  42. List<RoadFlow.Data.Model.Dictionary> GetChilds(string code);
  43. /// <summary>
  44. /// 查询上级记录
  45. /// </summary>
  46. RoadFlow.Data.Model.Dictionary GetParent(Guid id);
  47. /// <summary>
  48. /// 是否包含下级记录
  49. /// </summary>
  50. bool HasChilds(Guid id);
  51. /// <summary>
  52. /// 得到最大排序
  53. /// </summary>
  54. int GetMaxSort(Guid id);
  55. /// <summary>
  56. /// 更新排序
  57. /// </summary>
  58. int UpdateSort(Guid id, int sort);
  59. /// <summary>
  60. /// 根据代码查询一条记录
  61. /// </summary>
  62. RoadFlow.Data.Model.Dictionary GetByCode(string code);
  63. }
  64. }