private void Add_Click(object sender, RoutedEventArgs e) { TariffInformation tariffwindow = new TariffInformation(null); tariffwindow.Show(); this.Close(); }
private void Update_Click(object sender, RoutedEventArgs e) { var selectedTariff = TarrifItems.SelectedItem as Tariff; if (selectedTariff == null) { MessageBox.Show("Select the item"); return; } else { TariffInformation tariffwindow = new TariffInformation(selectedTariff); tariffwindow.Show(); this.Close(); } }