public static void OpenUpdateCustomerForm(Dictionary <string, Label> customerValueLabels, PictureBox pictureBox,
                                                  RichTextBox commentsRichTextBox, BindingNavigator bindingNavigatorCustomers)
        {
            UpdateCustomer form = new UpdateCustomer(customerValueLabels, pictureBox, commentsRichTextBox, bindingNavigatorCustomers);

            form.Show();
        }
        private void BtnUpdateCustomer_Click(object sender, EventArgs e)
        {
            UpdateCustomer updateCustomer = new UpdateCustomer();

            this.Hide();
            updateCustomer.Show();
        }
Example #3
0
 private void CustomerActivity(object obj)
 {
     switch (obj as string)
     {
     case "UpdateCustomer":
     {
         if (updateCustomerWindow == null)
         {
             updateCustomerWindow = new UpdateCustomer
             {
                 DataContext = new UpdateCustomerVM()
             };
             updateCustomerWindow.Show();
         }
         else
         {
             if (updateCustomerWindow.IsLoaded.Equals(false))
             {
                 updateCustomerWindow = null;
                 updateCustomerWindow = new UpdateCustomer
                 {
                     DataContext = new UpdateCustomerVM()
                 };
                 updateCustomerWindow.Show();
             }
             else
             {
                 updateCustomerWindow.Focus();
             }
         }
     }
     break;
     }
 }
 /// <summary>
 /// Update Customer Operation
 /// </summary>
 private void UpdateMethod()
 {
     if (null != selectedcustomer)
     {
         //Displays the Update Window
         UpdateCustomer update = new UpdateCustomer(selectedcustomer);
         update.Show();
     }
     else
     {
         MessageBox.Show("Please search for a customer before you" + "attempt to delete.", "No selected customer");
     }
 }