コード例 #1
0
 public Wniosek1(EquivalentApplication Application)
 {
     InitializeComponent();
     application            = Application;
     spContext.DataContext  = application;
     dgRescuers.ItemsSource = application.Units;
 }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: AdamPowroznik/OSPM
 private void btnEquivalentMenu3_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         foreach (Druh item in zastep)
         {
             item.IleAkcji++;
         }
         int counter = 1;
         foreach (Unit item in units)
         {
             item.ID = counter;
             counter++;
         }
         EquivalentApplication application = new EquivalentApplication((DateTime)dpEquivalentOccurrence.SelectedDate, units, tbRecordNumber.Text, tbOccurenceName.Text, (DateTime)dpApplication.SelectedDate);
         wniosek = new Wniosek1(application);
         wniosek.Show();
     }
     catch (Exception)
     {
         MessageBox.Show("Nie wypełniono wszystkich wymaganych pól.", "Erroł", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }