Ejemplo n.º 1
0
        void SaveNewCustomerMethod(object arg)
        {
            FactoryManager myManager = new FactoryManager();

            myManager.GetCustomerManager().CreateNewCustomer(customer.Description, customer.CompanyName);
            RefreshAction();
            CloseAction();
        }
Ejemplo n.º 2
0
        public void GetCustomerList()
        {
            ObservableCollection <CustomerViewModel> customers = new ObservableCollection <CustomerViewModel>();
            FactoryManager myManager = new FactoryManager();

            foreach (var item in myManager.GetCustomerManager().GetAllCustomers())
            {
                customers.Add(
                    new CustomerViewModel()
                {
                    CustomerId  = item.ID,
                    CompanyName = item.CompanyName
                });
            }
            this.Customers = customers;
        }