예제 #1
0
        private void btnUpdateProjectMemberInformation_Click(object sender, EventArgs e)
        {
            if (UpdateProjectMemberState == FormState.preProcess)
            {
                UpdateProjectMemberState = FormState.Process;
                btnUpdateProjectMemberInformation.Text = "CONFIRM";
                btnAddNewProjectMember.Enabled         = false;
                btnChangeActiveProjectMember.Enabled   = false;
                btnPECancel.Enabled      = true;
                cbxProjectMember.Enabled = false;
                grcProjectMember.Enabled = false;
                ProjectEmployeeID        = (int)grvProjectMember.GetDataRow(grvProjectMember.GetSelectedRows()[0]).ItemArray[0];
            }
            else
            if (UpdateProjectMemberState == FormState.Process)
            {
                var           projectEmployee = new ProjectEmployeeEntity();
                ProjectEntity projectEntity   = new ProjectEntity();
                projectEntity.ID        = projectID;
                projectEmployee.Project = projectEntity;
                EmployeeEntity employeeEntity = new EmployeeEntity();
                employeeEntity.ID           = (int)cbxProjectMember.SelectedValue;
                projectEmployee.Employee    = employeeEntity;
                projectEmployee.StartedDate = dtmPMStartedDate.Value;
                projectEmployee.EndDate     = dtmPMEndDate.Value;
                projectEmployee.Role        = (JobRankValue)cbxRole.SelectedItem;
                projectEmployee.Active      = ActiveValue.Active;

                projectEmployeeBLL.EditProjectEmployee(projectEmployee, ProjectEmployeeID);
                load();
            }
        }
예제 #2
0
        private void btnAddNewProjectMember_Click(object sender, EventArgs e)
        {
            if (AddProjectMemberState == FormState.preProcess)
            {
                AddProjectMemberState       = FormState.Process;
                btnAddNewProjectMember.Text = "CONFIRM";
                btnUpdateProjectMemberInformation.Enabled = false;
                btnChangeActiveProjectMember.Enabled      = false;
                btnPECancel.Enabled      = true;
                grcProjectMember.Enabled = false;

                cbxProjectMember.DataSource    = projectEmployeeBLL.LoadEmployeeNameOutSideProject(projectID);
                cbxProjectMember.DisplayMember = "EmployeeName";
                cbxProjectMember.ValueMember   = "ID";
            }
            else
            if (AddProjectMemberState == FormState.Process)
            {
                var           projectEmployee = new ProjectEmployeeEntity();
                ProjectEntity projectEntity   = new ProjectEntity();
                projectEntity.ID        = projectID;
                projectEmployee.Project = projectEntity;
                EmployeeEntity employeeEntity = new EmployeeEntity();
                employeeEntity.ID           = (int)cbxProjectMember.SelectedValue;
                projectEmployee.Employee    = employeeEntity;
                projectEmployee.StartedDate = dtmPMStartedDate.Value;
                projectEmployee.EndDate     = dtmPMEndDate.Value;
                projectEmployee.Role        = (JobRankValue)cbxRole.SelectedItem;
                projectEmployee.Active      = ActiveValue.Active;

                projectEmployeeBLL.AddProjectEmployee(projectEmployee);
                load();
            }
        }
예제 #3
0
 public void EditProjectEmployee(ProjectEmployeeEntity _projectEmployee, int ID)
 {
     projectEmployeeDAL.Edit(_projectEmployee, ID);
 }
예제 #4
0
 public void AddProjectEmployee(ProjectEmployeeEntity _projectEmployee)
 {
     projectEmployeeDAL.Add(_projectEmployee);
 }