Esempio n. 1
0
        List <ProductDTO> IService1.GetProducts()
        {
            List <Product> products = new List <Product>();
            // Ürün Mapper
            ProductMapper productMapper = new ProductMapper();

            // Tüm ürünleri yükle
            products = productMapper.GetAllProducts();
            // Ürünleri dönüştür ve geri gönder
            return(ProductConverter.CretateProductDto(products));
        }
Esempio n. 2
0
        public FilterViewModel()
        {
            InitializeCommands();

            DatabaseManager.GetAllProductListData();

            m_Products = ProductMapper.GetAllProducts();
            RaisePropertyChanged(nameof(Products));

            m_FilterCriteria = ToolConstants.FILTER_CRITERIA;
            RaisePropertyChanged(nameof(FilterCriteria));
            RaisePropertyChanged(nameof(Filtered));
        }
 private void OnSaveProducts()
 {
     if (CheckSupplier() && CheckProducts())
     {
         foreach (Product p in m_Products)
         {
             p.ProducerId = m_CurrentProducer.Id;
             p.SupplierId = m_CurrentSupplier.Id;
         }
         ProductMapper.SaveProducts(m_Products, true);
         m_Products = ProductMapper.GetAllProducts();
         RaisePropertyChanged(nameof(Products));
     }
 }
        public ProductExportViewModel()
        {
            m_Sorts      = SortMapper.GetAllSorts();
            m_Categories = ToolConstants.DEFAULT_FRUIT_CATEGORIES;
            m_Costumers  = CostumerMapper.GetAllCostumers();
            m_Products   = ProductMapper.GetAllProducts();


            InitializeCommands();

            RaisePropertyChanged(nameof(Products));
            RaisePropertyChanged(nameof(Sorts));
            RaisePropertyChanged(nameof(Categories));
            RaisePropertyChanged(nameof(Origins));
        }
Esempio n. 5
0
 public void UpdateResources()
 {
     m_Products = ProductMapper.GetAllProducts();
 }