Example #1
0
 private void createAddCustomerDialog()
 {
     loadCustomerWindow = new LoadCustomer
     {
         DataContext = new LoadCustomerVM(CustomerEvents)
     };
     loadCustomerWindow.Closing += (o, e) =>
     {
         usersFromDB  = DBConnector.GetFromDB(string.Format(DB_StoredProcedures.CUSTOMER_GET, string.Empty, string.Empty, string.Empty, string.Empty));
         CustomerList = null;
         CustomerList = usersFromDB.Copy();
     };
     loadCustomerWindow.Show();
 }
Example #2
0
 private void AddNewCustomer(object obj)
 {
     if (loadCustomerWindow == null)
     {
         createAddCustomerDialog();
     }
     else
     {
         if (loadCustomerWindow.IsLoaded.Equals(false))
         {
             loadCustomerWindow = null;
             createAddCustomerDialog();
         }
         else
         {
             loadCustomerWindow.Focus();
         }
     }
 }