private void SelectEmploymentTypes(object sender, EventArgs e) { if (SelectEmploymentTypesForm.IsDisposed) { SelectEmploymentTypesForm = new ViewLayer.FormSelectEmploymentTypes(this.Employees, this.Specialties); } if (sender is string) { SelectEmploymentTypesForm.EmploymentTypesByEmployee(sender.ToString()); } EmployeesForm.Hide(); SelectEmploymentTypesForm.Show(); SelectEmploymentTypesForm.FormClosed += ShowEmployerOrEmployeeForm; }
public FormController() { Specialties = new Specialties(); Vacancies = new Vacancies(); Users = new Users(); Employers = new Employers(); Employees = new Employees(); EmployeesForm = new ViewLayer.FormEmployees(Employees, Vacancies); EmployerForm = new ViewLayer.FormEmployers(Employers, Vacancies); VacancyForm = new ViewLayer.FormAddVacancy(this.Vacancies); SpecialtyForm = new ViewLayer.FormAddSpecialty(this.Specialties); AuthorizationForm = new ViewLayer.FormAuthorization(this.Users); SelectSpecialtiesForm = new ViewLayer.FormSelectSpecialties(this.Specialties, this.Employees); SelectEmploymentTypesForm = new ViewLayer.FormSelectEmploymentTypes(this.Employees, this.Specialties); }