コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["CreditCardInfo"] != null && Session["CheckOutDataSource"] != null)
         {
             if (!IsAgentRole)
             {
                 AgentLiteral.Text = "Selected Agent: " + Session["SelectedAgent"].ToString();
             }
             ShoppingCartService.ShoppingCartInfo cartInfo = (ShoppingCartService.ShoppingCartInfo)Session["CheckOutDataSource"];
             OrderService.OrderInfo orderInfo = (OrderService.OrderInfo)Session["CreditCardInfo"];
             TransactionNoLiteral.Text = orderInfo.TransactionCode.ToString();
             AssignDataSource(cartInfo, orderInfo.CreditCard);
         }
         else
         {
             Response.Redirect("~/Members/ProductCatalog.aspx");
         }
     }
 }
コード例 #2
0
    private void AssignDataSource(ShoppingCartService.ShoppingCartInfo cartInfo, OrderService.CreditCardInfo cardInfo)
    {
        OrderLiteral.Text = OrderNoLiteral.Text = Request.QueryString["orderId"];

        OrderDateLiteral.Text      = DateTime.Now.ToShortDateString();
        PaymentDetailsLiteral.Text = cardInfo.Type.Name + " ," + "XXXX-XXXX-XXXX-" + cardInfo.Number.Substring(cardInfo.Number.Length - 4);
        BillingAddressLiteral.Text = cardInfo.Address.Address1 + ", ";
        if (cardInfo.Address.Address2 != string.Empty && cardInfo.Address.Address2 != null)
        {
            BillingAddressLiteral.Text += cardInfo.Address.Address2 + ", ";
        }
        BillingAddressLiteral.Text += cardInfo.Address.City + ", " + cardInfo.Address.State.Name + "-" + cardInfo.Address.Zip;
        if (cartInfo.CartItems.Length > 0)
        {
            CartGridView.DataSource = cartInfo.CartItems;
            CartGridView.DataBind();
            SubTotalLiteral.Text   = cartInfo.SubTotal.ToString();
            ShippingLiteral.Text   = cartInfo.ShippingAndHandling.ToString();
            TaxLiteral.Text        = cartInfo.Tax.ToString();
            GrandTotalLiteral.Text = cartInfo.GrandTotal.ToString();
            DiscountLiteral.Text   = cartInfo.Discount.ToString();
        }
    }
コード例 #3
0
ファイル: Reference.cs プロジェクト: dilipsvn/mailingcycle
 /// <remarks/>
 public void CalculateGrandTotalAsync(ShoppingCartInfo cartInfo)
 {
     this.CalculateGrandTotalAsync(cartInfo, null);
 }
コード例 #4
0
ファイル: Reference.cs プロジェクト: dilipsvn/mailingcycle
 /// <remarks/>
 public void GetPromotionDiscountAsync(ShoppingCartInfo cartInfo)
 {
     this.GetPromotionDiscountAsync(cartInfo, null);
 }