示例#1
0
 protected void RepeaterCart_ItemCommand(object source, System.Web.UI.WebControls.RepeaterCommandEventArgs e)
 {
     if (e.CommandName == "RemoveItem")
     {
         ShoppinAction action = new ShoppinAction(this.Context);
         action.RemoveItemFromCart(e.CommandArgument.ToString());
         this.CurrentController.NextView = action.NextViewToDisplay;
     }
     else if (e.CommandName == "Update")
     {
         this.CurrentController.NextView = WebViews.CART;
     }
     else if (e.CommandName == "ShowItem")
     {
         CatalogAction action = new CatalogAction(this.Context);
         action.ShowItem(e.CommandArgument.ToString());
         this.CurrentController.NextView = action.NextViewToDisplay;
     }
 }