protected void Page_Load(object sender, EventArgs e) { long uid = 0; if (!IsPostBack) { if (Session["emailid"] != null && Session["emailid"] != "") { string email = Session["emailid"].ToString(); lstuseraccounts = objuser.GetUserAccountsRecord(Session["emailid"].ToString()); foreach (UserAccounts ua in lstuseraccounts) { uid = ua.UserAccountID; Session["useraccountids"] = uid; } long cid = uid; // lstorders = objorders.GetlistofOrders(cid); lstorders = objorders.GetTotallistofOrders(); //foreach (CustomerDetails cd in lstcd) //{ // objcustdet = new CustomerDetails(); // objcustdet.EnqReferenceNo = cd.EnqReferenceNo; // objcustdet.EnqDateTime = cd.EnqDateTime; // objcustdet.CategoryName = cd.CategoryName; // objcustdet.EnqStatus = cd.EnqStatus; // lstcd.Add(objcustdet); //} MyOrderStatusGridview.DataSource = lstorders; MyOrderStatusGridview.DataBind(); } } }
//byte value; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { lblresult.Text = ""; lblmsg.Text = ""; } if (Session["emailid"] != null) { string mail = Session["emailid"].ToString(); List <UserAccounts> lst = uaobj.GetUserAccountsRecord(mail); if (lst.Count > 0) { foreach (UserAccounts item in lst) { txtfirstname.Text = item.Firstname; txtlastname.Text = item.LastName; txtemailid.Text = Session["emailid"].ToString(); } } } }
protected void btnsave_Click(object sender, EventArgs e) { string emailid = txtemail.Text; List <UserAccounts> lstua = uaobj.GetUserAccountsRecord(emailid); if (lstua.Count > 0) { string emaild = ""; string password = ""; string username = ""; string name = ""; foreach (UserAccounts item in lstua) { string fname = item.Firstname; string lname = item.LastName; string fullname = fname + lname; Session["fullname"] = fullname; string uname = item.EmailID; Session["username"] = uname; string pwd = item.Password; Session["password"] = pwd; name = item.Firstname; emaild = item.EmailID; username = item.EmailID; password = item.Password; } } else { lblresult.ForeColor = System.Drawing.Color.Red; lblresult.Text = "Invalid Emailid"; } }