protected void Page_Load(object sender, EventArgs e)
 {
     Response.Cache.SetExpires(DateTime.Now.AddMinutes(-1));
     Response.Cache.SetNoStore();
     if (Session["uid"] != null)
     {
         lblUserID.Text = Session["uid"].ToString();
         UpdateBal b = new UpdateBal();
         user          = b.show(lblUserID.Text);
         lblNAME.Text  = user.name.ToString();
         lblADD.Text   = user.add.ToString();
         lblSTATE.Text = user.city.ToString();
         lblCITY.Text  = user.state.ToString();
         lblCOUNT.Text = user.count.ToString();
         lblPIN.Text   = user.pin.ToString();
         lblEMAIL.Text = user.email.ToString();
         lblCONT.Text  = user.cont.ToString();
         lblDOB.Text   = user.date.ToString("MM/dd/yyy");
         lblGEND.Text  = user.gend.ToString();
     }
     else
     {
         Response.Redirect("UserSearch.aspx");
     }
 }
        public DataTable tblCountry()
        {
            GetUser   obj1 = new GetUser();
            UpdateBal obj  = new UpdateBal();
            DataTable dt   = obj.findCountry();

            return(dt);
        }
        public DataTable tblcity(string state)
        {
            GetUser   obj1 = new GetUser();
            UpdateBal obj  = new UpdateBal();

            obj1.state = state;
            DataTable dt = obj.UpdateCity(obj1);

            return(dt);
        }
        public DataTable tblstate(string count)
        {
            GetUser   obj1 = new GetUser();
            UpdateBal obj  = new UpdateBal();

            obj1.count = count;
            DataTable dt = obj.UpdateState(obj1);

            return(dt);
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            UpdateBal b = new UpdateBal();

            b.show1(txtName.Text, txtAdd.Text, ddCity.SelectedItem.Text, ddCount.SelectedItem.Text, ddState.SelectedItem.Text, txtPin.Text, txtEmail.Text, lblGend.Text, txtCont.Text, lblDob.Text, lblUserId.Text);
            Session.Clear();         //session object will be there but all the keys will be deleted//
            Session.Abandon();       //session itself will be destroyed//
            Session.Remove("uname"); //this will remove the particular key from the session//
            //Session.Remove("dob");
            //Session.Remove("gend");
            Response.Redirect("UserSearch.aspx");
        }
Exemple #6
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            string    t11 = txtUSERID.Text;
            UpdateBal bal = new UpdateBal();

            if (t11 != "" && bal.SearchUser(t11) == 1)
            {
                Session["uid"] = txtUSERID.Text;
                Response.Redirect("ShowProfile.aspx");
            }
            else
            {
                lblERROR.Text = "Invalid User";
            }
        }
        protected void btnDELETE_Click(object sender, EventArgs e)
        {
            int       i = 1;
            UpdateBal b = new UpdateBal();

            try
            {
                b.delete(lblUserID.Text);
            }
            catch (SqlException sqle)
            {
                i = 0;
            }

            Session.Clear();         //session object will be there but all the keys will be deleted//
            Session.Abandon();       //session itself will be destroyed//
            Session.Remove("uname"); //this will remove the particular key from the session//
            //Session.Remove("dob");
            //Session.Remove("gend");
            Response.Redirect("UserSearch.aspx");
        }