private void Delete(int id)
    {
        ProcessDeleteShoppingCart processdelete = new ProcessDeleteShoppingCart();

        LittleItalyVineyard.Common.ShoppingCart shoppingcart = new LittleItalyVineyard.Common.ShoppingCart();
        shoppingcart.ShoppingCartID = id;
        processdelete.ShoppingCart  = shoppingcart;

        processdelete.Invoke();
    }
    private void Update(int id, int newqty)
    {
        ProcessUpdateShoppingCart processupdate = new ProcessUpdateShoppingCart();

        LittleItalyVineyard.Common.ShoppingCart shoppingcart = new LittleItalyVineyard.Common.ShoppingCart();
        shoppingcart.Quantity       = newqty;
        shoppingcart.ShoppingCartID = id;
        processupdate.ShoppingCart  = shoppingcart;

        processupdate.Invoke();
    }
示例#3
0
    private void LoadShoppingCart()
    {
        LittleItalyVineyard.Common.ShoppingCart shoppingcart = new LittleItalyVineyard.Common.ShoppingCart();
        shoppingcart.CartGUID = Utilities.GetCartGUID();

        ProcessGetShoppingCart processgetcart = new ProcessGetShoppingCart();

        processgetcart.ShoppingCart = shoppingcart;

        processgetcart.Invoke();
        gridviewShoppingCart.DataSource = processgetcart.ResultSet;
        gridviewShoppingCart.DataBind();
    }
示例#4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LittleItalyVineyard.Common.ShoppingCart shoppingcart = new LittleItalyVineyard.Common.ShoppingCart();
        shoppingcart.ProductID = int.Parse(Request.QueryString["ProductID"]);
        shoppingcart.CartGUID  = CartGUID;
        shoppingcart.Quantity  = 1;

        ProcessAddShoppingCart procshoppingcart = new ProcessAddShoppingCart();

        procshoppingcart.ShoppingCart = shoppingcart;

        procshoppingcart.Invoke();
        Response.Redirect("ShoppingCart.aspx");
    }
    private void Delete(int id)
    {
        ProcessDeleteShoppingCart processdelete = new ProcessDeleteShoppingCart();

        LittleItalyVineyard.Common.ShoppingCart shoppingcart = new LittleItalyVineyard.Common.ShoppingCart();
        shoppingcart.ShoppingCartID = id;
        processdelete.ShoppingCart  = shoppingcart;

        try
        {
            processdelete.Invoke();
        }
        catch
        {
            Response.Redirect("ErrorPage.aspx");
        }
    }
    private void Update(int id, int newqty)
    {
        ProcessUpdateShoppingCart processupdate = new ProcessUpdateShoppingCart();

        LittleItalyVineyard.Common.ShoppingCart shoppingcart = new LittleItalyVineyard.Common.ShoppingCart();
        shoppingcart.Quantity       = newqty;
        shoppingcart.ShoppingCartID = id;
        processupdate.ShoppingCart  = shoppingcart;

        try
        {
            processupdate.Invoke();
        }
        catch
        {
            Response.Redirect("ErrorPage.aspx");
        }
    }
    private void LoadShoppingCart()
    {
        LittleItalyVineyard.Common.ShoppingCart shoppingcart = new LittleItalyVineyard.Common.ShoppingCart();
        shoppingcart.CartGUID = CartGUID;

        ProcessGetShoppingCart processgetcart = new ProcessGetShoppingCart();

        processgetcart.ShoppingCart = shoppingcart;

        try
        {
            processgetcart.Invoke();
            gridviewShoppingCart.DataSource = processgetcart.ResultSet;
            gridviewShoppingCart.DataBind();
        }
        catch
        {
            Response.Redirect("ErrorPage.aspx");
        }
    }