IDataProvider.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using MySqlConnector;
  7. using Dapper;
  8. using mysql_connector2.res;
  9. namespace mysql_connector2.res
  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. }