Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["customer"] == null)
            {
                Response.Redirect("~");
            }

            Customer     theCustomer    = (Customer)Session["Customer"];
            List <Order> customerOrders = OrderDA.GetAllOrdersByCustomer(theCustomer.CustomerFirst, theCustomer.CustomerLast);

            foreach (Order o in customerOrders)
            {
                lblFirst.Text       = o.CustomerFirst;
                lblLast.Text        = o.CustomerLast;
                lblOrderTotal.Text  = o.OrderTotal.ToString("c2");
                lblStoreNumber.Text = Convert.ToString(o.StoreNum);

                lblOrderType.Text = o.OrderType;
            }
        }