コード例 #1
0
        private SlotAssignment AssignAdjudicatorSlots(SlotAssignment assignment, int adjudicatorSlots, User user)
        {
            if (assignment.AdjucatorsGranted != adjudicatorSlots)
            {
                assignment.AdjucatorsGranted = adjudicatorSlots;
                assignment.UpdateTrackingData(user);

                unitOfWork.GetRepository<SlotAssignment>().Update(assignment);
                unitOfWork.Save();
            }

            return assignment;
        }
コード例 #2
0
        private SlotAssignment AssignTeamSlots(SlotAssignment assignment, int teamSlots, User user)
        {
            if (assignment.TeamsGranted != teamSlots)
            {
                assignment.TeamsGranted = teamSlots;
                assignment.UpdateTrackingData(user);

                unitOfWork.GetRepository<SlotAssignment>().Update(assignment);
                unitOfWork.Save();
            }

            return assignment;
        }