Beispiel #1
0
        public object ktheEmail(string username)
        {
            sqlConfig sqlConfig = new sqlConfig();
            var       emaill    = sqlConfig.ktheRol("select email  from useri where username ='******'");

            return(emaill);
        }
Beispiel #2
0
        protected void LOGIN(object sender, EventArgs e)
        {
            var username = usernamee.Value;
            var passi    = pasi.Value;


            sqlConfig sqlConfig = new sqlConfig();
            var       rol       = sqlConfig.ktheRol("select role  from useri where username ='******'  and password ='******'");

            //Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "successalert()", true);


            if (Convert.ToInt32(rol) == 1)
            {
                Session["name"] = username;
                Response.Redirect("admintable.aspx");
            }
            if (Convert.ToInt32(rol) == 2)
            {
                ScriptManager.RegisterStartupScript(this, GetType(), "randomtext", "Operator()", true);
            }
            if (Convert.ToInt32(rol) != 1 && Convert.ToInt32(rol) != 2)
            {
                ScriptManager.RegisterStartupScript(this, GetType(), "randomtext", "a()", true);
            }
        }