// CUSTOMER protected void Page_Load(object sender, EventArgs e) { if (Session["OrderNum"] != null && !IsPostBack) { lblONum.Text = Session["OrderNum"].ToString(); orderNum = lblONum.Text; CsReceipt recept = new CsReceipt(orderNum, reTable, toTable); ConnectionClass.DisplayReceipt(recept); GridView1.DataSource = recept.ReceiptTable; GridView1.DataBind(); lblTQty.Text = recept.TotalTable.Rows[0][0].ToString(); lblTAmt.Text = recept.TotalTable.Rows[0][1].ToString(); lblTTax.Text = recept.TotalTable.Rows[0][2].ToString(); lblGTotal.Text = recept.TotalTable.Rows[0][3].ToString(); CsReceiptInfo info = new CsReceiptInfo(orderNum, ceTable); ConnectionClass.ViewCustomer(info); lblCInfo.Text = info.CustomerInfo.Rows[0][2].ToString() + " " + info.CustomerInfo.Rows[0][3].ToString(); lblDate.Text = info.CustomerInfo.Rows[0][1].ToString(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["ONUM"] != null && Session["CNAME"] != null && !IsPostBack) { lblONum.Text = Session["ONUM"].ToString(); lblCName.Text = Session["CNAME"].ToString(); lblCNum.Text = Session["CNUM"].ToString(); Cnum = Session["CNUM"].ToString(); orderNum = lblONum.Text; try { CsReceipt recept = new CsReceipt(orderNum, reTable, toTable); ConnectionClass.DisplayReceipt(recept); GridView1.DataSource = recept.ReceiptTable; GridView1.DataBind(); CsCustomer thisCustomer = new CsCustomer(Cnum, CFname, CLname, CAddress, Ccity, Cprovince, CPcode, CPhone, CEmail, CNote, CRDate, Clv); ConnectionClass.GetCustomerDetail(thisCustomer); lblCEmail.Text = thisCustomer.cEmail; lblOrderDate.Text = recept.TotalTable.Rows[0][4].ToString(); lblTQty.Text = recept.TotalTable.Rows[0][0].ToString(); lblTAmt.Text = recept.TotalTable.Rows[0][1].ToString(); lblTTax.Text = recept.TotalTable.Rows[0][2].ToString(); lblGTotal.Text = recept.TotalTable.Rows[0][3].ToString(); } catch { ClientScript.RegisterStartupScript(GetType(), "message", "<script>alert('error');</script>"); } finally { } } else { //ClientScript.RegisterStartupScript(GetType(), "message", "<script>alert('No Order');</script>"); } }