//clsOrderCollection OrderBook = new clsOrderCollection(); protected void Page_Load(object sender, EventArgs e) { //get the security data from the session Sec = (clsSecurity)Session["Sec"]; //if it is null then this is the first run of the site if (Sec == null) { //initialise the object Sec = new clsSecurity(); //save it to the session Session["Sec"] = Sec; } //create an object clsCustomer customer = new clsCustomer(); Boolean Found = false; //get customerNo by email Found = customer.GetCustomerNoByEmail(Sec.UserEMail); //Get CustomerNo CustomerNo = customer.CustomerNo; //Check if login if (CustomerNo == 0) { lblError.Text = "Please Sign-In first."; } else { DisplayAllOrders(CustomerNo); } }
protected void Page_Load(object sender, EventArgs e) { //get the security data from the session Sec = (clsSecurity)Session["Sec"]; //if it is null then this is the first run of the site if (Sec == null) { //initialise the object Sec = new clsSecurity(); //save it to the session Session["Sec"] = Sec; } //Control the visiable btnGotoTrackAParcel.Visible = Sec.Authenticated; //create a customer object clsCustomer customer = new clsCustomer(); Boolean Found = false; Found = customer.GetCustomerNoByEmail(Sec.UserEMail); CustomerNo = customer.CustomerNo; }