Esempio n. 1
0
 public Sale(long id, Manager manager, Client client, Product product, DateTime saleDate)
 {
     Id = id;
     Manager = manager;
     Client = client;
     Product = product;
     SaleDate = saleDate;
 }
Esempio n. 2
0
        public void ChangeSale(Sale sale, Manager newManger, Client newClient, Product newProduct)
        {
            var modelSale = SaleObjectToModel(sale);
            var newModelManager = ManagerObjectToModel(newManger);
            var newModelClient = ClientObjectToModel(newClient);
            var newModelProduct = ProductObjectToModel(newProduct);

            _salesDataProvider.ChangeSale(modelSale, newModelManager, newModelClient, newModelProduct);
            sale.SetManger(newManger);
            sale.SetClient(newClient);
            sale.SetProduct(newProduct);
        }
Esempio n. 3
0
 public void SetClient(Client client)
 {
     Client = client;
 }
Esempio n. 4
0
 private DataAccessLayer.Models.SaleModels.Client ClientObjectToModel(Client client)
 {
     return new DataAccessLayer.Models.SaleModels.Client(client.Id, client.Name);
 }