Beispiel #1
0
 private void RefreshCust_Click(object sender, RoutedEventArgs e)
 {
     CustomerSelect.ItemsSource = null;
     ZP_Customers.CustList      = null;
     ZP_Customers.CustList      = SQL_Calls.Select_Customers();
     CustomerSelect.ItemsSource = ZP_Customers.CustList;
 }
 public NewCustomer()
 {
     InitializeComponent();
     CustomersView.ItemsSource = null;
     ZP_Customers.CustList.Clear();
     ZP_Customers.CustList     = SQL_Calls.Select_Customers();
     CustomersView.ItemsSource = ZP_Customers.CustList;
 }
 private void AddCust_Click(object sender, RoutedEventArgs e)
 {
     name  = NAME.Text;
     lname = LNAME.Text;
     phone = PHONE.Text;
     SQL_Calls.AddNewCustomer(name, lname, phone);
     //clear the text
     NAME.Text  = "";
     LNAME.Text = "";
     PHONE.Text = "";
     //refresh the view
     CustomersView.ItemsSource = null;
     ZP_Customers.CustList.Clear();
     ZP_Customers.CustList     = SQL_Calls.Select_Customers();
     CustomersView.ItemsSource = ZP_Customers.CustList;
 }
Beispiel #4
0
 public OrderWindow(int Location)
 {
     InitializeComponent();
     Loc = Location;
     //populate the cust select
     CustomerSelect.ItemsSource = null;
     ZP_Customers.CustList      = null;
     ZP_Customers.CustList      = SQL_Calls.Select_Customers();
     CustomerSelect.ItemsSource = ZP_Customers.CustList;
     //populate inventory by branch/loc
     ZP_Inventory.InvAtLoc    = null;
     ZP_Inventory.InvAtLoc    = SQL_Calls.Select_Inventory(Loc);
     LocInventory.ItemsSource = null;
     LocInventory.ItemsSource = ZP_Inventory.InvAtLoc;
     //get new orderID and set to SQL_Calls class for calling the number later
     SQL_Calls.MaxOrderID();
 }