예제 #1
0
        private void addButton_Click(object sender, RoutedEventArgs e)  //Calls the appropriate classes to create a new customer object
        {
            AddEditCustomer AEC = new AddEditCustomer("N");

            AEC.Show();
            AEC.titleLabel.Content = "New Customer";
            Close();
        }
예제 #2
0
 private void amendButton_Click(object sender, RoutedEventArgs e)    //Calls the appropriate classes to modify an existing customer object
 {
     try
     {
         String[]        selectedLine = CustomerBox.SelectedItem.ToString().Split(' ');
         int             selectedInt  = Int32.Parse(selectedLine[0]);
         AddEditCustomer AEC          = new AddEditCustomer("A");
         AEC.Show();
         AEC.loadData(selectedInt);
         AEC.titleLabel.Content = "Edit Customer";
         Close();
     }
     catch
     {
         MessageBox.Show("Click on an item in the left hand list to select it!");
     }
 }