Пример #1
0
        public decimal CutDept(DepartmentDetailsDto dept)
        {
            var department = Company.AllDepartments.Where(d => d.Id == dept.Id).First();
            department.Cut();

            return department.Total;
        }
Пример #2
0
        public DepartmentDetailsDto GetDepartmentDetails(Guid id)
        {
            var dept = CompanyRepository.Find<Department>(d => d.Id == id).First();

            var dto = new DepartmentDetailsDto()
                          {
                              Id = dept.Id,
                              Name = dept.Name,
                              Manager = new EmployeeDto()
                                            {
                                                Address = dept.Manager.Person.Address,
                                                Id = dept.Manager.Id,
                                                Name = dept.Manager.Person.Name,
                                                Salary = dept.Manager.Salary
                                            },
                              Total = dept.Total,

                          };

            return dto;
        }
Пример #3
0
 public DepartmentDto()
 {
     Details = new DepartmentDetailsDto();
 }