コード例 #1
0
        /// <summary>
        /// Validates an assignment swap view model
        /// </summary>
        /// <param name="swapModel">The swap model to validate</param>
        public static void ValidateAssignmentSwapVM(AddAssignmentGroupSwapViewModel swapModel)
        {
            // Validating base validity
            APIValidation.Validate(swapModel);

            // Assignment group IDs cannot be the same
            if (swapModel.SwapAssignmentGroupID == swapModel.BaseAssignmentGroupID)
            {
                throw new CoursesAPIException(ErrorCodes.IDENTICAL_GROUP_IDS);
            }
        }
コード例 #2
0
 /// <summary>
 /// Validates an assignment
 /// </summary>
 /// <param name="groupModel"></param>
 public static void ValidateAssignmentVM(this AddAssignmentViewModel groupModel)
 {
     // Validing the model
     APIValidation.Validate(groupModel);
 }