Beispiel #1
0
        public void ShowSpacecraftsDeleteForm()
        {
            try
            {
                Statek spacecraft = spacecrafts.GetActiveElement();
                UpdateTypesList();
                SpacecraftsForm form = new SpacecraftsForm(spacecraft, types);
                SpacecraftsFormController formController = new SpacecraftsFormController(form, Operation.Delete);
                form.Queries = queriesSpacecrafts;
                formController.Queries = queriesSpacecrafts;
                form.ShowDialog();
                // odswiezenie danych
                UpdateTypesList();
                SelectAllAtActiveWindow();
            }
            catch (NullReferenceException ex)
            {

            }
        }
Beispiel #2
0
 public void ShowSpacecraftsEditForm()
 {
     try
     {
         Statek spacecraft = spacecrafts.GetActiveElement();
         UpdateTypesList();
         SpacecraftsForm form = new SpacecraftsForm(spacecraft, types);
         SpacecraftsFormController formController = new SpacecraftsFormController(form, Operation.Edit);
         form.Queries = queriesSpacecrafts;
         formController.Queries = queriesSpacecrafts;
         dr = form.ShowDialog();
         // odswiezenie danych
         UpdateTypesList();
         ReloadIfFormReturnedOK();
     }
     catch (NullReferenceException ex)
     {
         // pusta tabela/?
     }
 }
Beispiel #3
0
 public void ShowSpacecraftsAddForm()
 {
     UpdateTypesList();
     SpacecraftsForm form = new SpacecraftsForm(types);
     SpacecraftsFormController formController = new SpacecraftsFormController(form, Operation.Add);
     form.Queries = queriesSpacecrafts;
     formController.Queries = queriesSpacecrafts;
     dr = form.ShowDialog();
     // odswiezenie danych
     UpdateTypesList();
     ReloadIfFormReturnedOK();
 }