private void DeleteShoppingCart() { ShoppingCart shoppingCart = new ShoppingCart(); shoppingCart.CartGuid = this.CartGUID; ProcessGetShoppingCart getShoppingCart = new ProcessGetShoppingCart(); getShoppingCart.ShoppingCart = shoppingCart; try { getShoppingCart.Invoke(); } catch (Exception ex) { Response.Redirect("ErrorPage.aspx"); } ProcessDeleteShoppingCartByGuid deleteCart = new ProcessDeleteShoppingCartByGuid(); deleteCart.ShoppingCart = getShoppingCart.ShoppingCart; try { deleteCart.Invoke(); Utilities.DeleteCartGUID(); } catch (Exception ex) { Response.Redirect("ErrorPage.aspx"); } }
protected void UpdateStockLevel() { ShoppingCart shoppingCart = new ShoppingCart(); shoppingCart.CartGuid = this.CartGUID; ProcessGetShoppingCart getShoppingCart = new ProcessGetShoppingCart(); getShoppingCart.ShoppingCart = shoppingCart; ProcessUpdateStockLevel updateStockLevel = new ProcessUpdateStockLevel(); try { getShoppingCart.Invoke(); } catch (Exception ex) { Response.Redirect("ErrorPage.aspx"); } updateStockLevel.ShoppingCart = getShoppingCart.ShoppingCart; try { updateStockLevel.Invoke(); } catch (Exception ex) { Response.Redirect("ErrorPage.aspx"); } }
private void LoadShoppingCart() { LiveFreeRange.Common.ShoppingCart shoppingcart = new LiveFreeRange.Common.ShoppingCart(); shoppingcart.CartGuid = CartGUID; ProcessGetShoppingCart processGetCart = new ProcessGetShoppingCart(); processGetCart.ShoppingCart = shoppingcart; try { processGetCart.Invoke(); gvShoppingCart.DataSource = processGetCart.ResultSet; gvShoppingCart.DataBind(); } catch(Exception ex) { Response.Redirect( "ErrorPage.aspx" ); } }
private void LoadShoppingCart() { LiveFreeRange.Common.ShoppingCart shoppingCart = new LiveFreeRange.Common.ShoppingCart(); shoppingCart.CartGuid = Utilities.GetCartGUID(); ProcessGetShoppingCart processGetCart = new ProcessGetShoppingCart(); processGetCart.ShoppingCart = shoppingCart; try { processGetCart.Invoke(); this.gvShoppingCart.DataSource = processGetCart.ResultSet; this.gvShoppingCart.DataBind(); } catch { Response.Redirect("ErrorPage.aspx"); } }