Example #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);
        }
        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);
        }