Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SqlConnection c;
- string str = "Data Source =(LocalDB)\MSSQLLocalDB;";
- str += "AttachDbFilename=|DataDirectory|\DinoData.mdf;";
- str += "Integrated Security= True";
- c = new SqlConnection(str);
- if (Session["Connect"] != null)
- {
- if ((bool)Session["Connect"])
- {
- logdiv.Visible = false;
- Usernamec.InnerHtml = (string)Session["CurentUserid"];
- Connected.Visible = true;
- SqlCommand exp = new SqlCommand("SELECT xp FROM[User] Where Username = @username", c);
- exp.Parameters.AddWithValue("@username", (string)Session["CurentUserid"]);
- c.Open();
- Session["exp"] = exp.ExecuteReader();
- c.Close();
- int b = (int)Session["exp"] / 2;
- string a = b + "px";
- xp.Style.Add("width", ((string)Session["exp"])+"%");
- }
- else
- {
- Connected.Visible = false;
- logdiv.Visible = true;
- }
- }
- SqlConnection c;
- string str = "Data Source =(LocalDB)\MSSQLLocalDB;";
- str += "AttachDbFilename=|DataDirectory|\DinoData.mdf;";
- str += "Integrated Security= True";
- c = new SqlConnection(str);
- if (Session["Conect"] != null)
- {
- if ((bool)Session["Conect"])
- {
- logdiv.Visible = false;
- Usernamec.InnerHtml = (string)Session["CurentUserid"];
- Connected.Visible = true;
- SqlCommand exp = new SqlCommand("SELECT xp FROM[User] Where Username = @username", c);
- exp.Parameters.AddWithValue("@username", (string)Session["CurentUserid"]);
- c.Open();
- Session["exp"] = exp.ExecuteScalar();
- c.Close();
- int b = (int)Session["exp"] / 2;
- string a = b + "%";
- xp.Style.Add("width", a);
- }
- else
- {
- Connected.Visible = false;
- logdiv.Visible = true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement