private void ApplicantListForm_Load(object sender, EventArgs e) { // ParentFrom is a MdiParent of the ApplicantListForm MdiParent = MyForms.GetForm<ParentForm>(); LoadData(); }
public void CreateNewCourse() { Mode = FormMode.CreateNew; Course = new Course(); InitializeControls(); MdiParent = MyForms.GetForm <ParentForm>(); Show(); }
private void CourseListForm_Load(object sender, EventArgs e) { // ParentFrom is a MdiParent of the CourseListForm // to make sure our CourseListForm always stays inside the ParentForm MdiParent = MyForms.GetForm <ParentForm>(); LoadData(); }
public void CreateNewApplicant() { Mode = FormMode.CreateNew; Applicant = new DAL.Applicant(); InitializeControls(); MdiParent = MyForms.GetForm <ParentForm>(); Show(); }
public void UpdateCourse(Course course) { Mode = FormMode.Update; Course = course; InitializeControls(); ShowCourseInControls(); MdiParent = MyForms.GetForm <ParentForm>(); Show(); }
public void UpdateApplicant(DAL.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 btnSave_Click(object sender, EventArgs e) { try { GrabUserInput(); var manager = new CourseManager(); if (Mode == FormMode.CreateNew) { manager.Create(Course); } else { manager.Update(Course); } // to refresh database right away MyForms.GetForm <CourseListForm>().LoadData(); Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void allCoursesToolStripMenuItem_Click(object sender, EventArgs e) { MyForms.GetForm <CourseListForm>().Show(); }
private void allApplicantsToolStripMenuItem_Click(object sender, EventArgs e) { MyForms.GetForm <ApplicantListForm>().Show(); }