void FillOrderOptions(OrderInfo orderInfo) { orderInfo.OrderOptions.Clear(); IList<OrderLookupItemInfo> selectedOptions = orderOptionList.SelectedOptions; if ((selectedOptions != null) && (selectedOptions.Count > 0)) { foreach (OrderLookupItemInfo info in selectedOptions) { OrderOptionInfo item = new OrderOptionInfo(); item.AdjustedPrice = 0M; if (info.AppendMoney.HasValue) { if (info.CalculateMode.Value == 1) { item.AdjustedPrice = info.AppendMoney.Value; } else { item.AdjustedPrice = orderInfo.GetDiscountedAmount() * (info.AppendMoney.Value / 100M); } } item.CustomerDescription = info.UserInputContent; item.CustomerTitle = info.UserInputTitle; item.ItemDescription = info.Name; OrderLookupListInfo orderLookupList = ShoppingProcessor.GetOrderLookupList(info.LookupListId); if (orderLookupList != null) { item.ListDescription = orderLookupList.Name; } item.LookupItemId = info.LookupItemId; item.LookupListId = info.LookupListId; item.OrderId = orderInfo.OrderId; orderInfo.OrderOptions.Add(item); } } }
void BindOrderItems(OrderInfo order) { this.orderItems.DataSource = order.LineItems.Values; this.orderItems.DataBind(); if (order.Gifts.Count > 0) { this.plOrderGift.Visible = true; this.grdOrderGift.DataSource = order.Gifts; this.grdOrderGift.DataBind(); } this.lblCartMoney.Money = order.GetAmount(); this.litWeight.Text = order.Weight.ToString(); this.lblPayCharge.Money = order.AdjustedPayCharge; this.lblOptionPrice.Money = order.GetOptionPrice(); this.lblFreight.Money = order.AdjustedFreight; this.lblAdjustedDiscount.Money = order.AdjustedDiscount; this.litCouponValue.Text = order.CouponName + " -" + Globals.FormatMoney(order.CouponValue); this.lblDiscount.Money = order.GetAmount() - order.GetDiscountedAmount(); if (order.OrderStatus == OrderStatus.WaitBuyerPay) { this.litPoints.Text = order.GetTotalPoints().ToString(CultureInfo.InvariantCulture); } else { this.litPoints.Text = order.Points.ToString(CultureInfo.InvariantCulture); } this.litTotalPrice.Money = order.GetTotal(); }