IAppendixService.cs 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using GreenTree.Nachtragsmanagement.Core.Domain.Appendix;
  7. using GreenTree.Nachtragsmanagement.Core.Domain.Invoice;
  8. namespace GreenTree.Nachtragsmanagement.Services.Appendix
  9. {
  10. public interface IAppendixService
  11. {
  12. #region Appendix
  13. /// <summary>
  14. /// Gets all appendices
  15. /// </summary>
  16. IList<Core.Domain.Appendix.Appendix> GetAllAppendices();
  17. /// <summary>
  18. /// Gets all appendices where the user is assigned to the corresponding site if the current role only allows assigned sites
  19. /// </summary>
  20. IList<Core.Domain.Appendix.Appendix> GetAllUserAssignedAppendices(Core.Domain.User.User user);
  21. /// <summary>
  22. /// Gets a appendix by specified Id
  23. /// </summary>
  24. /// <param name="id">Appendix identifier.</param>
  25. Core.Domain.Appendix.Appendix GetAppendixById(int id);
  26. /// <summary>
  27. /// Gets all appendices to the specified ids
  28. /// </summary>
  29. IList<Core.Domain.Appendix.Appendix> GetAppendicesByIds(int[] ids);
  30. /// <summary>
  31. /// Gets a appendix by specified customer number
  32. /// </summary>
  33. /// <param name="customNumber">Customer number.</param>
  34. Core.Domain.Appendix.Appendix GetAppendixByCustomNumber(string customNumber);
  35. /// <summary>
  36. /// Insert a appendix
  37. /// </summary>
  38. /// <param name="appendix">Appendix.</param>
  39. void InsertAppendix(Core.Domain.Appendix.Appendix appendix);
  40. /// <summary>
  41. /// Update a appendix
  42. /// </summary>
  43. /// <param name="appendix">Appendix.</param>
  44. void UpdateAppendix(Core.Domain.Appendix.Appendix appendix);
  45. /// <summary>
  46. /// Delete a appendix
  47. /// </summary>
  48. /// <param name="appendix">Appendix.</param>
  49. void DeleteAppendix(Core.Domain.Appendix.Appendix appendix);
  50. #endregion
  51. #region Category
  52. /// <summary>
  53. /// Gets all categories
  54. /// </summary>
  55. IList<Category> GetAllCategories();
  56. /// <summary>
  57. /// Gets a category by specified Id
  58. /// </summary>
  59. /// <param name="id">Category identifier.</param>
  60. Category GetCategoryById(int id);
  61. /// <summary>
  62. /// Gets all categories to the specified ids
  63. /// </summary>
  64. IList<Category> GetCategoriesByIds(int[] ids);
  65. /// <summary>
  66. /// Insert a category
  67. /// </summary>
  68. /// <param name="category">Category.</param>
  69. void InsertCategory(Category category);
  70. /// <summary>
  71. /// Update a category
  72. /// </summary>
  73. /// <param name="category">Category.</param>
  74. void UpdateCategory(Category category);
  75. /// <summary>
  76. /// Delete a category
  77. /// </summary>
  78. /// <param name="category">Category.</param>
  79. void DeleteCategory(Category category);
  80. #endregion
  81. #region Invoice
  82. /// <summary>
  83. /// Gets all invoices
  84. /// </summary>
  85. IList<Invoice> GetAllInvoices();
  86. /// <summary>
  87. /// Gets a invoice by specified Id
  88. /// </summary>
  89. /// <param name="id">Invoice identifier.</param>
  90. Invoice GetInvoiceById(int id);
  91. /// <summary>
  92. /// Gets all invoices to the specified ids
  93. /// </summary>
  94. IList<Invoice> GetInvoicesByIds(int[] ids);
  95. /// <summary>
  96. /// Insert a invoice
  97. /// </summary>
  98. /// <param name="invoice">Invoice.</param>
  99. void InsertInvoice(Invoice invoice);
  100. /// <summary>
  101. /// Update a invoice
  102. /// </summary>
  103. /// <param name="invoice">Invoice.</param>
  104. void UpdateInvoice(Invoice invoice);
  105. /// <summary>
  106. /// Delete a invoice
  107. /// </summary>
  108. /// <param name="invoice">Invoice.</param>
  109. void DeleteInvoice(Invoice invoice);
  110. #endregion
  111. #region State
  112. /// <summary>
  113. /// Gets all states
  114. /// </summary>
  115. IList<State> GetAllStates();
  116. /// <summary>
  117. /// Gets a state by specified Id
  118. /// </summary>
  119. /// <param name="id">State identifier.</param>
  120. State GetStateById(int id);
  121. /// <summary>
  122. /// Gets all states to the specified ids
  123. /// </summary>
  124. IList<State> GetStatesByIds(int[] ids);
  125. /// <summary>
  126. /// Gets all appendices to the specified with the specified status id
  127. /// </summary>
  128. /// <param name="id">State identifier.</param>
  129. IList<Core.Domain.Appendix.Appendix> GetAppendicesByState(int id);
  130. /// <summary>
  131. /// Gets the state which is defaultly selected
  132. /// </summary>
  133. State GetDefaultState();
  134. /// <summary>
  135. /// Gets the state which is marked as finish
  136. /// </summary>
  137. State GetFinishState();
  138. /// <summary>
  139. /// Insert a state
  140. /// </summary>
  141. /// <param name="state">State.</param>
  142. void InsertState(State state);
  143. /// <summary>
  144. /// Update a state
  145. /// </summary>
  146. /// <param name="state">State.</param>
  147. void UpdateState(State state);
  148. /// <summary>
  149. /// Delete a state
  150. /// </summary>
  151. /// <param name="state">State.</param>
  152. void DeleteState(State state);
  153. #endregion
  154. }
  155. }