Exemplo n.º 1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            FrmEmployeesManager employeesOverView = new FrmEmployeesManager();

            if (_department != null)
            {
                _createEditDepartmentViewModel.SetDepartmentForEmployee((int)_department.ManagerEmployeeId, null);
                lblBossName.Text = "";
            }
            employeesOverView.ShowDialog();

            if (employeesOverView.DialogResult == DialogResult.OK)
            {
                _bossId = employeesOverView.SelectedId;

                if (_department != null)
                {
                    _department.ManagerEmployeeId = _bossId;
                }

                ModelEmployee boss = _createEditDepartmentViewModel.GetEmployee(_bossId);
                lblBossName.Text   = $"{_departmentType.ToString()} Boss Name: {boss.Title} {boss.Name} {boss.Surname}";
                btnConfirm.Enabled = true;
            }
        }
Exemplo n.º 2
0
        private void BtnCreate_Click(object sender, EventArgs e)
        {
            FrmEmployeesManager frmEmployees = new FrmEmployeesManager();

            frmEmployees.ShowDialog();
            if (frmEmployees.DialogResult == DialogResult.OK)
            {
                _employeeOverviewViewModel.SetDepartmentForEmployee(frmEmployees.SelectedId, _superiorDepId);
            }
            FillDGV();
        }