Пример #1
0
        //create method for displaying student details

        public static List <Student> DisplayStudentsBLL()
        {
            List <Student> studtlist = null;

            try
            {
                StudentDAL.StudentDAL studentDal = new StudentDAL.StudentDAL();
                studtlist = studentDal.DisplayStudentDAL();
                return(studtlist);
            }
            catch (StudentException.StudentException ex)
            {
                throw ex;
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Пример #2
0
        //creating method in BLL for adding student
        public static bool AddStudent(Student student)
        {
            bool studentAdded = false;

            try
            {
                if (ValidateStudent(student))
                {
                    StudentDAL.StudentDAL studentDAL = new StudentDAL.StudentDAL();
                    studentAdded = studentDAL.AddStudentDAL(student);
                }
            }
            catch (StudentException.StudentException e)
            {
                throw e;
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(studentAdded);
        }