Exemple #1
0
    private void LoadOrderDetails()
    {
        ProcessGetOrderDetails processdetails = new ProcessGetOrderDetails();

        OrderDetails orderdetails = new OrderDetails();

        orderdetails.OrderID        = int.Parse(Request.QueryString["OrderID"]);
        processdetails.OrderDetails = orderdetails;

        try
        {
            processdetails.Invoke();
        }
        catch
        {
            Response.Redirect("../ErrorPage.aspx");
        }

        gridviewOrderDetailsProducts.DataSource = processdetails.ResultSet;
        gridviewOrderDetailsProducts.DataBind();

        labelTransactionID.Text = Request.QueryString["TransID"];

        PayPalManager paypal = new PayPalManager();
        Orders        ord    = new Orders();

        ord.TransactionID = Request.QueryString["TransID"];
        paypal.GetTransactionDetails(ord);

        if (paypal.IsSubmissionSuccess)
        {
            labelOrderTotal.Text = ord.OrderTotal.ToString("c");
            labelTax.Text        = ord.Tax.ToString("c");
        }
        else
        {
            Response.Redirect("../ErrorPage.aspx");
        }
    }
Exemple #2
0
    private void LoadOrderDetails()
    {
        ProcessGetOrderDetails processdetails = new ProcessGetOrderDetails();
        ProcessGetOrderByID    processorder   = new ProcessGetOrderByID();

        OrderDetails orderdetails = new OrderDetails();

        orderdetails.OrderID        = int.Parse(Request.QueryString["OrderID"]);
        processdetails.OrderDetails = orderdetails;

        Orders orders = new Orders();

        orders.OrderID      = int.Parse(Request.QueryString["OrderID"]);
        processorder.Orders = orders;

        try
        {
            processdetails.Invoke();
            processorder.Invoke();
        }
        catch
        {
            Response.Redirect("../ErrorPage.aspx");
        }

        gridviewOrderDetailsProducts.DataSource = processdetails.ResultSet;
        gridviewOrderDetailsProducts.DataBind();

        labelTransactionID.Text = Request.QueryString["TransID"];

        if (orders.ShipDate != DateTime.MinValue)
        {
            textShippedDate.Text = orders.ShipDate.ToShortDateString();
        }
        textTrackingNumber.Text = orders.TrackingNumber;

        dropdownlistOrderStatus.SelectedIndex = dropdownlistOrderStatus.Items.IndexOf(dropdownlistOrderStatus.Items.FindByValue(orders.OrderStatusID.ToString()));
    }