private void View_OnEditEmployee(object sender, EventArgs e) { EmployeeFormPresenter editEmployeeFormPresenter = new EmployeeFormPresenter(_messageService, _employeeRepository, View.CurrentEmployee); editEmployeeFormPresenter.View.IsCodeActive = false; editEmployeeFormPresenter.OnFormClose += (o, args) => UpdateEmployees(); editEmployeeFormPresenter.View.ShowForm(); }
private void View_OnAddEmployee(object sender, EventArgs e) { EmployeeFormPresenter addEmployeeFormPresenter = new EmployeeFormPresenter(_messageService, _employeeRepository); addEmployeeFormPresenter.View.IsCodeActive = true; addEmployeeFormPresenter.OnFormClose += (o, args) => UpdateEmployees(); addEmployeeFormPresenter.View.ShowForm(); }