/// <summary> /// Validating the fresher login /// </summary> /// <param name="userid">fresher login id</param> /// <param name="password">fresher password(encryption is done at service level)</param> /// <returns>return object of the valid fresher else return null</returns> public FreshersModel ValidateUser(string userid, string password) { if (string.IsNullOrEmpty(userid) || string.IsNullOrEmpty(password)) { return(null); } password = EncryptDecryptAES.Encrypt(password); return(freshersRepository.ValidateLogin(userid, password)); }
/// <summary> /// Validating the admin login /// </summary> /// <param name="userid">admin login id</param> /// <param name="password">admin password(encryption is done at service level)</param> /// <returns>return object of the valid admin else return null</returns> public AdminModel ValidateUser(string userid, string password) { if (string.IsNullOrEmpty(userid) || string.IsNullOrEmpty(password)) { return(null); } password = EncryptDecryptAES.Encrypt(password); return(adminRepo.ValidateLogin(userid, password)); }
/// <summary> /// Validating the student login /// </summary> /// <param name="userid">student login id</param> /// <param name="password">student password(encryption is done at service level)</param> /// <returns>return object of the valid student else return null</returns> public StudentModel ValidateUser(string clgCode, string userid, string password) { if (string.IsNullOrEmpty(userid) || string.IsNullOrEmpty(password) || string.IsNullOrEmpty(clgCode)) { return(null); } password = EncryptDecryptAES.Encrypt(password); return(studentsRepository.ValidateLogin(clgCode, userid, password)); }
public bool RegisterStudent(StudentModel student) { bool bSuccess = false; if (student != null) { student.Password = EncryptDecryptAES.Encrypt(student.Password); StudentModel model = studentsRepository.RegisterStudent(student); if (model != null) { return(bSuccess = true); } } return(bSuccess); }