Ejemplo n.º 1
0
        public List <AssignmentViewModel> GetAllNonFocusAssignments(int employee)
        {
            List <AssignmentViewModel> AssignmentViewModels = new List <AssignmentViewModel>();

            List <Assigment> targetData = AssignmentService.GetAllNonFocus(employee);

            if (targetData != null)
            {
                foreach (Assigment target in targetData)
                {
                    AssignmentViewModel avm = new AssignmentViewModel
                    {
                        Id          = target.Id,
                        Beskrivning = target.Beskrivning,
                        Roll        = target.Roll,
                        Teknik      = target.Teknik,
                        Tid         = target.Tid,
                        Uppdrag     = target.Uppdrag,
                        Focus       = target.Focus
                    };

                    AssignmentViewModels.Add(avm);
                }
            }

            return(AssignmentViewModels);
        }
Ejemplo n.º 2
0
        public AssignmentViewModel GetView(Assigment target)
        {
            Employee            employee = EmployeeService.Get(target.Employeeid);
            AssignmentViewModel avm      = new AssignmentViewModel
            {
                Id          = target.Id,
                Employee    = employee,
                Beskrivning = target.Beskrivning,
                Roll        = target.Roll,
                Teknik      = target.Teknik,
                Tid         = target.Tid,
                Uppdrag     = target.Uppdrag,
                Focus       = target.Focus
            };

            return(avm);
        }