public bool AddTeacher(Domain.Teacher newTeacher)
 {
     ITeacherDao teacherDao = new TeacherDao(sessionFactory);
     ISystemUserDao systemUserDao = new SystemUserDao(sessionFactory);
     //先存入Teacher,在存入SystemUser
     try
     {
         int teacherId= (Int32)teacherDao.Save(newTeacher);
         SystemUser newSystemUser = new SystemUser
         {
             systemUserID =teacherId.ToString(),
             systemUserPassword = newTeacher.teacherPassword,
             systemUserType = 2
         };
         systemUserDao.Save(newSystemUser);
         return true;
     }catch(Exception e){
         return false;
     }
 }
        public bool AddStudent(Student newStudent)
        {
            IStudentDao studentDao = new StudentDao(sessionFactory);
            ISystemUserDao systemUserDao = new SystemUserDao(sessionFactory);

            try
            {
                int studentId=(Int32)studentDao.Save(newStudent);
                //先存入Student,在存入SystemUser
                SystemUser newSystemUser = new SystemUser
                {
                    systemUserID = studentId.ToString(),
                    systemUserPassword = newStudent.studentPassword,
                    systemUserType = 1
                };
                systemUserDao.Save(newSystemUser);
                return true;
            }
            catch (Exception e) {
                return false;
            }
        }