private void Btn_edit_service_Click(object sender, RoutedEventArgs e) { if (Lbx_Offered_Services.SelectedItem == null) { MessageBox.Show("Please select an item to edit service"); } else { var editService = Lbx_Offered_Services.SelectedItem as Servicesinfo; AddServices add = new AddServices(editService, Btn_edit_service.ToString()); add.Show(); } }
private void Btn_Add_New_Service_Click(object sender, RoutedEventArgs e) { AddServices add = new AddServices(null, Btn_Add_New_Service.Content.ToString()); add.Show(); }