Exemplo n.º 1
0
    /// <summary>
    /// Cancel Order Button Click Event
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnCancelOrder_Click(object sender, EventArgs e)
    {
        _shoppingCart = ZNodeShoppingCart.CurrentShoppingCart();

        if (_shoppingCart != null)
        {
            _shoppingCart.EmptyCart();
            _shoppingCart = null;

            Session.Remove(ZNodeSessionKeyType.ShoppingCart.ToString());
        }

        ResetProfileCache();

        Response.Redirect("~/admin/Secure/default.aspx");
    }
Exemplo n.º 2
0
    /// <summary>
    /// Page Load Event
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.Browser.Browser.Equals("IE"))
        {
            UpdateProgressIE.Visible = true;
        }
        else if (Request.Browser.Browser.Equals("Firefox"))
        {
            UpdateProgressMozilla.Visible = true;
        }
        else
        {
            UpdateProgressMozilla.Visible = true;
        }

        //registers the event for the customer search (child) control
        this.uxCustomerSearch.SelectedIndexChanged += new EventHandler(FoundUsers_SelectedIndexChanged);

        //registers the event for the create user (child) control
        this.uxCreateUser.ButtonClick += new EventHandler(btnCancel_Click);

        //registers the event for the create user (child) control
        this.uxCustomerSearch.SearchButtonClick += new EventHandler(btnSearchClose_Click);

        //registers the event for the quick Order (child) control - Addto cart button
        this.uxQuickOrder.SubmitButtonClicked += new EventHandler(AddToCart_Click);

        //registers the event for the quick Order (child) control - Addto cart button
        this.uxQuickOrder.CancelButtonClicked += new EventHandler(AddToCart_Click);

        //registers the event for the quick Order (child) control - Add another product button
        this.uxQuickOrder.AddProductButtonClicked += new EventHandler(AddAnotherProduct_Click);

        //registers the event for the payment (child) control - Shipping Type selected change list
        this.uxPayment.ShippingSelectedIndexChanged += new EventHandler(Shipping_SelectedIndexChanged);

        if (!Page.IsPostBack)
        {
            _shoppingCart = (ZNodeShoppingCart)ZNodeShoppingCart.CreateFromSession(ZNodeSessionKeyType.ShoppingCart);

            if (_shoppingCart != null)
            {
                _shoppingCart.EmptyCart();
            }

            // Bind fields
            Bind();
        }
    }
Exemplo n.º 3
0
    /// <summary>
    /// 
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnBack_Click(object sender, EventArgs e)
    {
        _shoppingCart = ZNodeShoppingCart.CurrentShoppingCart();

        if (_shoppingCart != null)
        {
            _shoppingCart.EmptyCart();
            _shoppingCart = null;

            Session.Remove(ZNodeSessionKeyType.ShoppingCart.ToString());
        }

        ResetProfileCache();

        if (Page.Session["AccountObject"] != null)
        {
            //Remove account object
            Page.Session.Remove("AccountObject");
        }

        Response.Redirect("~/admin/Secure/default.aspx");
    }