Exemple #1
0
        /// <summary>
        /// Gets the unit.
        /// </summary>
        /// <param name="unitId">The unit id.</param>
        /// <returns></returns>
        public AssignmentViewModel GetAssignment(int assgId)
        {
            AssignmentViewModel model = default(AssignmentViewModel);

            try
            {
                Assignment assignment = AssignmentManager.FindBy(assgId);
                model = ObjectMapper.Map <Model.Entities.Assignment, AssignmentViewModel>(assignment);
            }
            catch (Exception ex)
            {
                ExceptionManager.HandleException(ex, PolicyNameType.ExceptionReplacing);
            }
            return(model);
        }