public void CreateCustomer(string firstName, string lastName, string phoneNum) { Customer newCustomer = new Customer(firstName, lastName, phoneNum); WallyDAL dal = new WallyDAL(); dal.CreateCustomer(newCustomer); }
//----------METHODS----------// public MainWindowVM() { WallyDAL dal = new WallyDAL(); PossibleBranches = new ObservableCollection <Branch>(dal.GetBranches()); Products = new ObservableCollection <Item>(dal.GetProductsByName("")); _shoppingCart = new ObservableCollection <ShoppingCartItem>(); }
public void CreateNewOrder(Customer customer, Branch branch) { WallyDAL dal = new WallyDAL(); Order newOrder = new Order(customer.CustomerId, branch.BranchId); int orderID = dal.CreateNewOrder(newOrder); // Associate Order with Product with OrderLInes var products = new List <ShoppingCartItem>(ShoppingCart); dal.InsertOrderLine(orderID, products); }
public void FilterCustomers(string firstName, string lastName, string phoneNum) { WallyDAL dal = new WallyDAL(); FilteredCustomers = new ObservableCollection <Customer>(dal.GetCustomers(firstName, lastName, phoneNum)); }