Exemplo n.º 1
0
        public ViewResult ShowUserAssignment(string id)
        {
            UserAssignmentDTO userAssignment = _UserAssignment.GetUserAssignment(id);
            var userAssignmentObj            = new UserAssignmentListViewModel
            {
                CurrAssignment = userAssignment.Assignment,
                Worker         = userAssignment.User,
                UserAssignment = userAssignment
            };

            return(View(userAssignmentObj));
        }
Exemplo n.º 2
0
        public UserAssignmentDTO GetUserAssignment(string id)
        {
            UserAssignment    userAssignment    = Database.UserAssignment.Get(id);
            UserAssignmentDTO userAssignmentDTO = new UserAssignmentDTO
            {
                Id         = userAssignment.Id,
                User       = userAssignment.User,
                Assignment = new AssignmentDTO
                {
                    Id          = userAssignment.Assignment.Id,
                    Name        = userAssignment.Assignment.Name,
                    Description = userAssignment.Assignment.Description,
                    StartTime   = userAssignment.Assignment.StartTime,
                    EndTime     = userAssignment.Assignment.EndTime
                },
                IsCompleted = userAssignment.IsCompleted,
                Text        = userAssignment.Text
            };

            return(userAssignmentDTO);
        }