示例#1
0
        public void CreateCustomer(string firstName, string lastName, string phoneNum)
        {
            Customer newCustomer = new Customer(firstName, lastName, phoneNum);

            WallyDAL dal = new WallyDAL();

            dal.CreateCustomer(newCustomer);
        }
示例#2
0
        //----------METHODS----------//
        public MainWindowVM()
        {
            WallyDAL dal = new WallyDAL();

            PossibleBranches = new ObservableCollection <Branch>(dal.GetBranches());
            Products         = new ObservableCollection <Item>(dal.GetProductsByName(""));
            _shoppingCart    = new ObservableCollection <ShoppingCartItem>();
        }
示例#3
0
        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);
        }
示例#4
0
        public void FilterCustomers(string firstName, string lastName, string phoneNum)
        {
            WallyDAL dal = new WallyDAL();

            FilteredCustomers = new ObservableCollection <Customer>(dal.GetCustomers(firstName, lastName, phoneNum));
        }