public void OnLogin()
 {
     if (!IsAnyEmptyField())
     {
         if (ProfesseurManipulation.Login(Username, Password))
         {
             IsValidLogin = true;
             return;
         }
         Message = "Username or password is wrong !";
         return;
     }
     Message = "Enter all the required information";
     return;
 }
Esempio n. 2
0
        public void OnSubmit()
        {
            if (!IsAnyEmptyField())
            {
                if (IsValidPassword(Password))
                {
                    if (IsMatchingPassword(Password, Confirmation))
                    {
                        if (IsValidEmail(Email))
                        {
                            if (!ProfesseurManipulation.IsExistedUsername(Username))
                            {
                                if (!ProfesseurManipulation.IsExistedEmail(Email))
                                {
                                    ProfesseurManipulation.Insert(Username, Password, Email);
                                    IsValidRegistrition = true;
                                    Message             = " Your Registration Completed ";
                                    return;
                                }

                                Message = " Email already Existed ";
                                return;
                            }
                            Message = " Username already Existed ";
                            return;
                        }
                        Message = "Enter a valid email address";
                        return;
                    }
                    Message = "Password and confirmation mismatch ";
                    return;
                }
                Message = "Enter a password of 8 characters  at least ";
                return;
            }
            Message = "Enter all the required information";
            return;
        }