DataProvider.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using sql_pagining.models;
  7. using Dapper;
  8. using MySqlConnector;
  9. namespace sql_pagining.models
  10. {
  11. public interface IDataProvider
  12. {
  13. IEnumerable<ProductMaterial> getProductMaterials(int productId);
  14. IEnumerable<Product> getProduct(int pageNum);
  15. int getProductCount();
  16. void setOrder(string condition);
  17. IEnumerable<ProductType> getProductTypes();
  18. void clearFilter();
  19. void addFilter(string v, object value);
  20. void setMinCostForAgent(decimal result, int[] ints);
  21. void saveProduct(Product product);
  22. Product GetProductByArticle(string article);
  23. void removePriceHistory(int productId);
  24. void removeProduct(int productId);
  25. void removeProductMaterial(int productId);
  26. int saleCount(int productId);
  27. void deleteProductMaterial(ProductMaterial productMaterial);
  28. IEnumerable<Material> getAvailableMaterials();
  29. void addProductMaterial(ProductMaterial productMaterial);
  30. }
  31. }