private DomainModel() { _carCatalog = new CarCatalog(); _customerCatalog = new CustomerCatalog(); _employeeCatalog = new EmployeeCatalog(); _saleCatalog = new SaleCatalog(); }
private List <CustomerItemViewModel> CreateItemViewModelCollection(CustomerCatalog catalog) { List <CustomerItemViewModel> items = new List <CustomerItemViewModel>(); foreach (var obj in catalog.Customers) { items.Add(new CustomerItemViewModel(obj)); } return(items); }
public Tester() { _products = new ProductCatalog(); _customers = new CustomerCatalog(); _orders = new List <Order>(); _invoices = new List <Invoice>(); Setup(); }
public void AddCustomer() { CustomerCatalog cc = new CustomerCatalog(); int numberBefore = cc.Count; Customer c1 = new Customer(2, "john", "Undulatsvej", "78674523"); cc.AddCustomer(c1); int numberAfter = cc.Count; Assert.AreEqual(numberBefore + 1, numberAfter); }
public CustomerMasterDetailsViewModel() { _catalog = new CustomerCatalog(); _customerItemViewModel = new CustomerItemViewModel(new Customer()); _deleteCommand = new DeleteCustomerCommand(_catalog, this); _newCommand = new NewCustomerCommand(_catalog, this); _saveCommand = new SaveCustomerCommand(_catalog); _refreshCommand = new RefreshCustomerCommand(this, _catalog); RefreshCustomerItemViewModelCollection(); _catalog.Load(); }
private DomainModel() { _contactCatalog = new ContactCatalog(); _customerCatalog = new CustomerCatalog(); _leadCatalog = new LeadCatalog(); _locationCatalog = new LocationCatalog(); _offerCatalog = new OfferCatalog(); _pipelineCatalog = new PipelineCatalog(); _productCatalog = new ProductCatalog(); _userCatalog = new UserCatalog(); }
public void AddCustomerTest() { //Arrange ICustomerCatalog catalog = new CustomerCatalog(); int numberBefore = catalog.Count; Customer c1 = new Customer("Mads", "over there", 1, "10 10 10 10"); //Act catalog.AddCustomer(c1); int numberAfter = catalog.Count; //Assert Assert.AreEqual(numberBefore + 1, numberAfter); }
public SaveCustomerCommand(CustomerCatalog catalog) { _catalog = catalog; }
public DeleteCommand(CustomerVM Customer, CustomerCatalog customerCatalog) { _catalog = customerCatalog; _customerVM = Customer; }
public NewCustomerCommand(CustomerCatalog catalog, CustomerMasterDetailsViewModel mdvm) { _catalog = catalog; _customerMasterDetailsViewModel = mdvm; }
public RefreshCustomerCommand(CustomerMasterDetailsViewModel mdvm, CustomerCatalog catalog) { _mdvm = mdvm; _catalog = catalog; }
public CustomerEditCommand(CustomerVM Customer, CustomerCatalog customerCatalog) { _catalog = customerCatalog; _customerVM = Customer; }
private CustomerController() { customerCatalog = new CustomerCatalog(); }
public DeleteCustomerCommand(CustomerCatalog catalog, CustomerMasterDetailsViewModel viewModel) { _catalog = catalog; _customerMasterDetailsView = viewModel; }
public OrderTest() { _orderCatalog = OrderCatalog.Instance; _customerCatalog = CustomerCatalog.Instance; }