public void CreateNewApplicant() { Mode = FormMode.CreateNew; Applicant = new Applicant(); InitializeControls(); MdiParent = MyForms.GetForm <ParentForm>(); Show(); }
public void UpdateApplicant(Applicant applicant) { Mode = FormMode.Update; Applicant = applicant; InitializeControls(); ShowApplicantInControls(); 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 ApplicantListForm_Load(object sender, EventArgs e) { MdiParent = MyForms.GetForm <ParentForm>(); LoadData(); }