protected void ShipMethodList_SelectedIndexChanged(object sender, EventArgs e) { // UPDATE SHIPMENTS for (int i = 0; i < ShipmentList.Items.Count; i++) { RepeaterItem item = ShipmentList.Items[i]; if (item != null) { BasketShipment shipment = _Basket.Shipments[i]; DropDownList ShipMethodList = (DropDownList)item.FindControl("ShipMethodList"); if (shipment != null && ShipMethodList != null) { shipment.ShipMethodId = AlwaysConvert.ToInt(ShipMethodList.Items[ShipMethodList.SelectedIndex].Value); } } } // UPDATE THE ORDER ITMES PANEL TO REFLECT ANY CHANGE _Basket.Save(); IBasketService preCheckoutService = AbleContext.Resolve <IBasketService>(); preCheckoutService.Recalculate(_Basket); BindPaymentMethodForms(); BasketAjax.Update(); }
protected void AddProductSaveButton_Click(object sender, EventArgs e) { // SAVE THE BASKET FOR A NEW USER if (_Basket.Id == 0) { _Basket.Save(); } if (Page.IsValid) { BasketItem basketItem = CreateBasketItem(); if (basketItem != null) { _Basket.Items.Add(basketItem); SaveBasket(); } BasketAjax.Update(); HideProductForm(); } }