private void OnRefresh() { var queryString = Request.QueryString; orderGet = int.Parse(queryString["oID"]); odb = adpOrd.GetOrdersByOID(orderGet); var row = odb.FindByOrderID(orderGet); lblOrd.Text = row.OrderID.ToString(); lblTotal.Text = "$" + row.Total.ToString(); lblDate.Text = row.OrderDate.ToString(); delGet = ddlDelivery.SelectedValue; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { delGet = ddlDelivery.SelectedValue; var queryString = Request.QueryString; orderGet = int.Parse(queryString["oID"]); odb = adpOrd.GetOrdersByOID(orderGet); var row = odb.FindByOrderID(orderGet); lblOrd.Text = row.OrderID.ToString(); lblTotal.Text = "$" + row.Total.ToString(); lblDate.Text = row.OrderDate.ToString(); lblDelMe.Text = delGet; } else { OnRefresh(); lblDel.Text = "Delivery Method: "; lblDelMe.Text = delGet; } }