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) { } }
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/? } }
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(); }