DataProvider.cs 856 B

1234567891011121314151617181920212223242526272829
  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<Product> getProduct(int pageNum);
  14. int getProductCount();
  15. void setOrder(string condition);
  16. IEnumerable<ProductType> getProductTypes();
  17. void clearFilter();
  18. void addFilter(string v, object value);
  19. void setMinCostForAgent(decimal result, int[] ints);
  20. void saveProduct(Product product);
  21. Product GetProductByArticle(string article);
  22. void removePriceHistory(int productId);
  23. void removeProduct(int productId);
  24. void removeProductMaterial(int productId);
  25. int saleCount(int productId);
  26. }
  27. }