private void SetItemList() { CheckoutDetail currentDetail = Detail; currentDetail.Items.Clear(); foreach (ListItem checkItem in itemCheckBoxList.Items) { if (checkItem.Selected) currentDetail.Items.Add(new BoughtItem { Item = FindItem(Int32.Parse(checkItem.Value)), Quantity = 1 }); } Detail = currentDetail; }
private void SetQuantity() { CheckoutDetail currentDetail = Detail; foreach (BoughtItem item in currentDetail.Items) { QuantityItemControl itemControl = (QuantityItemControl)Page.LoadControl("~/QuantityItemControl.ascx"); itemControl.ID = String.Format("item{0}", item.Item.Id); quantityItemPlaceHolder.Controls.Add(itemControl); item.Quantity = itemControl.Quantity; } Detail = currentDetail; }
private void SetDespatchAddress() { CheckoutDetail currentDetail = Detail; currentDetail.BillingAddress = billingAddress1TextBox.Text; currentDetail.BillingAddressPostCode = billingAddressPostCodeTextBox.Text; currentDetail.ShippingAddress = currentDetail.ShippingAddressSource != 2 ? billingAddress1TextBox.Text : shippingAddress1TextBox.Text; currentDetail.ShippingAddressPostCode = currentDetail.ShippingAddressSource != 2? billingAddressPostCodeTextBox.Text : shippingAddressPostCodeTextBox.Text; Detail = currentDetail; }