private void BtnEditCompany_Click(object sender, EventArgs e) { FrmCreateEditDepartment frmCreateEditDepartment = new FrmCreateEditDepartment((ModelDepartment)cmbCompanies.SelectedItem); frmCreateEditDepartment.ShowDialog(); FillCmb(); }
private void BtnEdit_Click(object sender, EventArgs e) { FrmCreateEditDepartment frmCreateEditDepartment = new FrmCreateEditDepartment(GetModel()); frmCreateEditDepartment.ShowDialog(); FillDGV(); }
private void BtnCreate_Click(object sender, EventArgs e) { FrmCreateEditDepartment createDepartment = new FrmCreateEditDepartment(EnumDepartmentsType.DepartmentType.Project, _superiorDepId); createDepartment.ShowDialog(); if (createDepartment.DialogResult == DialogResult.OK) { FillDGV(); } }
private void BtnCreateCompany_Click(object sender, EventArgs e) { FrmCreateEditDepartment createCompany = new FrmCreateEditDepartment(EnumDepartmentsType.DepartmentType.Company); createCompany.ShowDialog(); if (createCompany.DialogResult == DialogResult.OK) { FillCmb(); } }
private void BtnEdit_Click(object sender, EventArgs e) { FrmCreateEditDepartment frmCreateEditDepartment = new FrmCreateEditDepartment( _departmentsViewModel.MakeDepartment((int)dGVOverview.CurrentRow.Cells["Id"].Value, (string)dGVOverview.CurrentRow.Cells["Name"].Value, (string)dGVOverview.CurrentRow.Cells["Code"].Value, (int?)dGVOverview.CurrentRow.Cells["SuperiorDepartmentId"].Value, (int?)dGVOverview.CurrentRow.Cells["ManagerEmployeeId"].Value)); frmCreateEditDepartment.ShowDialog(); FillDGV(); }