public Hour Add(HourEntryModel hourModel)
        {
            var hour = _hourRepository.InsertHourFromModel(hourModel);

            _hourRepository.Save();
            return(hour);
        }
예제 #2
0
        public Hour Add(HourEntryModel hourModel, string professorUser)
        {
            var isAdmin = _userRepository.isAdmin(professorUser);
            var hour    = _hourRepository.InsertHourFromModel(hourModel.AccountId, hourModel.SectionId, hourModel.ProjectId, hourModel.Hour, professorUser, isAdmin);

            _hourRepository.Save();
            return(hour);
        }