コード例 #1
0
        public ActionResult ValidationAccount(string userName)
        {
            EmailNotification    notification = new EmailNotification(new EmailSender());
            StudentService       instance     = new StudentService();
            StudentInformationBL student      = instance.GetStudentByStudentName(userName);

            string studentName = userName;
            string email       = student.Email;
            int    id          = student.StudentID;

            notification.SendValidationEmail(email, studentName, id);
            return(View());
        }
コード例 #2
0
        public StudentInformationBL GetStudentByStudentName(string studentName)
        {
            StudentRepository     repository = new StudentRepository();
            StudentInformationDAL newStudent = repository.GetStudentByStudentName(studentName);

            StudentInformationBL student = new StudentInformationBL()
            {
                StudentID   = newStudent.StudentID,
                Email       = newStudent.Email,
                StudentName = newStudent.StudentName
            };

            return(student);
        }