Пример #1
0
        private bool IsStudentInactive(string id)
        {
            StudentRepo repo = new StudentRepo();

            if (repo.CheckIfStudentIsActive(id) > 0)
            {
                Errors.Add(new ValidationError("This student cannot borrow any resources since he is inactive."));
                return(false);
            }
            return(true);
        }
Пример #2
0
        public bool IsStudentInactive(string id)
        {
            StudentRepo repo = new StudentRepo();

            if (repo.CheckIfStudentIsActive(id) > 0)
            {
                Errors.Add(new ValidationError("This resource cannot be reserved since this student is inactive."));
                return(false);
            }
            return(true);
        }