예제 #1
0
 private void PopulateOldShipData(OldShipUserInfo oldInfo)
 {
     OldShipUserId     = oldInfo.UserId;
     FirstName.Text    = oldInfo.FirstName.Trim();
     LastName.Text     = oldInfo.LastName.Trim();
     Email.Text        = oldInfo.Email.Trim();
     PrimaryPhone.Text = oldInfo.Phone.Trim();
 }
예제 #2
0
        public static OldShipUserInfo GetOldShipUserInfo(string UserName, string ClearTextPassword)
        {
            string          EncryptedPassword = EncryptorFactory.CreateEncryptor(EncryptionType.DES).Encrypt(ClearTextPassword);
            OldShipUserInfo oldInfo           = null;

            //If User provided valid Login/Password, then get user info.
            if (UserDAL.OldShipUserLogin(UserName, EncryptedPassword))
            {
                oldInfo = UserDAL.GetOldShipUserInfo(UserName);
            }
            return(oldInfo);
        }
예제 #3
0
 protected void btnLogin_Click(object sender, EventArgs e)
 {
     //TODO: Validation to be replaced with ProxyValidator
     Page.Validate("ChangePasswordGroup");
     if (Page.IsValid)
     {
         OldShipUserInfo oldinfo = RegisterUserBLL.GetOldShipUserInfo(UserName, Password);
         if (oldinfo != null)
         {
             Session["OldShipUserInfo"] = oldinfo;
             Response.Redirect("~/UserRegistration.aspx");
         }
         else
         {
             DisplayMessage("The Username and Password does not match a valid account.", true);
         }
     }
 }
예제 #4
0
        private void PopulateOldShipInfo()
        {
            OldShipUserInfo oldInfo = null;

            if (Session != null)
            {
                if (Session["OldShipUserInfo"] != null)
                {
                    oldInfo       = Session["OldShipUserInfo"] as OldShipUserInfo;
                    OldShipUserId = oldInfo.UserId;
                    //The variable will be removed later from Session on postback.
                }
            }
            if (oldInfo == null)
            {
                DisplayOldShipUserLoginLink();
            }
            else
            {
                PopulateOldShipData(oldInfo);
                DisplayOldShipUserInfoPopulatedMessage();
            }
        }