Ejemplo n.º 1
0
        protected void RegisterUser_CreatedUser(object sender, EventArgs e)
        {
            FormsAuthentication.SetAuthCookie(RegisterUser.UserName, createPersistentCookie: false);

            QueensBookstore.Logic.ShoppingCartActions usersShoppingCart = new QueensBookstore.Logic.ShoppingCartActions();
            String cartId = usersShoppingCart.GetCartId();
            usersShoppingCart.MigrateCart(cartId, RegisterUser.UserName.ToString());

            string continueUrl = RegisterUser.ContinueDestinationPageUrl;
            if (!OpenAuth.IsLocalUrl(continueUrl))
            {
                continueUrl = "~/";
            }
            Response.Redirect(continueUrl);
        }
Ejemplo n.º 2
0
 protected void LoginCtrl_LoggedIn(object sender, EventArgs e)
 {
     QueensBookstore.Logic.ShoppingCartActions usersShoppingCart = new QueensBookstore.Logic.ShoppingCartActions();
     String cartId = usersShoppingCart.GetCartId();
     usersShoppingCart.MigrateCart(cartId, User.Identity.Name.ToString());
 }