public void CreateNewApplicant() { Mode = FormMode.CreateNew; Applicant = new Applicant(); InitializeControls(); MdiParent = MyForms.GetForm <ParentForm>(); Show(); }
public void CreateNewTests() { Mode = FormMode.CreateNew; Tests = new Tests(); InitializeControls(); MdiParent = MyForms.GetForm <ParentForm>(); Show(); }
public void UpdateApplicant(Applicant applicant) { Mode = FormMode.Update; Applicant = applicant; InitializeControls(); ShowApplicantInControls(); MdiParent = MyForms.GetForm <ParentForm>(); Show(); }
public void UpdateTests(Tests tests) { Mode = FormMode.Update; Tests = tests; InitializeControls(); ShowTestsInControls(); MdiParent = MyForms.GetForm <ParentForm>(); Show(); }
private void btnSave_Click(object sender, EventArgs e) { try { GrabUserInput(); var manager = new ApplicantManager(); if (Mode == FormMode.CreateNew) { manager.Create(Applicant); } else { manager.Update(Applicant); } MyForms.GetForm <ApplicantListForm>().LoadData(); Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnSave_Click(object sender, EventArgs e) { try { GrabUserInput(); var manager = new TestsManager(); if (Mode == FormMode.CreateNew) { manager.Create(Tests); } else { manager.Update(Tests); } MyForms.GetForm <TestListForm>().LoadData();//This code instantly refreshes data everytime users hit save button MessageBox.Show("Saved!"); Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void ApplicantListForm_Load(object sender, EventArgs e) { MdiParent = MyForms.GetForm <ParentForm>(); LoadData(); }
private void allTestsToolStripMenuItem_Click(object sender, EventArgs e) { MyForms.GetForm <TestListForm>().Show(); }