private static IProjectLeader Convert(ProjectLeader raw)
 {
     return(new Data.Interfaces.Implementations.ProjectLeader()
     {
         UserName = raw.Id,
         Teams = raw.Teams?.Select(item => item?.ToString()) ?? new List <string>()
     });
 }
        public ReportingSection()
        {
            _teamLeader    = new TeamLeader();
            _projectLeader = new ProjectLeader();
            _hr            = new HR();

            _teamLeader.SetNextSupervisor(_projectLeader);
            _projectLeader.SetNextSupervisor(_hr);
            _hr.SetNextSupervisor(null);
        }
 public override string ToString()
 {
     return($"[{Id},{Resource.ToString()},{ProjectLeader.ToString()},{Course.ToString()},{StartDate},{MaxEndDate},{IsAdmitted},{Notes}]");
 }
Example #4
0
        private void btn_AddEmployee_Click(object sender, RoutedEventArgs e)
        {
            EmployeeService personService = new EmployeeService();

            switch ((cmb_EmployeeType.SelectedItem))
            {
            case EmployeeType.Trainee:

                Trainee trainee;

                if (string.IsNullOrEmpty(txt_Salary.Text))
                {
                    trainee = new Trainee(txt_Firstname.Text, txt_Lastname.Text,
                                          dp_Birthday.SelectedDate, dp_EntryDay.SelectedDate,
                                          Convert.ToInt32(txt_IncuranceId.Text));
                }
                else
                {
                    trainee = new Trainee(txt_Firstname.Text, txt_Lastname.Text,
                                          dp_Birthday.SelectedDate, dp_EntryDay.SelectedDate,
                                          Convert.ToInt32(txt_IncuranceId.Text), Convert.ToDouble(txt_Salary.Text));
                }

                personService.InsertEmployee(trainee);
                _EmployeeList.Add(trainee);

                break;

            case EmployeeType.Developer:

                Developer developer;
                if (string.IsNullOrEmpty(txt_Salary.Text))
                {
                    developer = new Developer(txt_Firstname.Text, txt_Lastname.Text,
                                              dp_Birthday.SelectedDate, dp_EntryDay.SelectedDate,
                                              Convert.ToInt32(txt_IncuranceId.Text));
                }
                else
                {
                    developer = new Developer(txt_Firstname.Text, txt_Lastname.Text,
                                              dp_Birthday.SelectedDate, dp_EntryDay.SelectedDate,
                                              Convert.ToInt32(txt_IncuranceId.Text), Convert.ToDouble(txt_Salary.Text));
                }

                personService.InsertEmployee(developer);
                _EmployeeList.Add(developer);

                break;

            case EmployeeType.ProjectLeader:

                ProjectLeader projectLeader;

                if (string.IsNullOrEmpty(txt_Salary.Text))
                {
                    projectLeader = new ProjectLeader(txt_Firstname.Text, txt_Lastname.Text,
                                                      dp_Birthday.SelectedDate, dp_EntryDay.SelectedDate,
                                                      Convert.ToInt32(txt_IncuranceId.Text));
                }
                else
                {
                    projectLeader = new ProjectLeader(txt_Firstname.Text, txt_Lastname.Text,
                                                      dp_Birthday.SelectedDate, dp_EntryDay.SelectedDate,
                                                      Convert.ToInt32(txt_IncuranceId.Text), Convert.ToDouble(txt_Salary.Text));
                }

                personService.InsertEmployee(projectLeader);
                _EmployeeList.Add(projectLeader);

                break;
            }

            lstv_Employees.Items.Refresh();
        }
Example #5
0
        public ProjectLeader GetProjectLeader(Guid id)
        {
            ProjectLeader projectLeader = con.Get <ProjectLeader>(id);

            return(projectLeader);
        }
Example #6
0
 public void Add(ProjectLeader projectLeader)
 {
     con.Insert(projectLeader);
 }
Example #7
0
 public void UpdateProjectLeader(ProjectLeader projectLeader)
 {
     con.Update(projectLeader);
 }