Пример #1
0
        public string GirisYap(string id, string ps)
        {
            String ids="", pss ="", donus="", user="";
            StringBuilder sb = new StringBuilder();
            SqlDataReader dr = (SqlDataReader)VeriIslemleri.dataReaderSorgu("select * from personeller where ID='" + id + "' and PAROLA='" + ps + "'", System.Data.CommandType.Text);
            while (dr.Read())
            {
                ids = dr["ID"].ToString();
                pss = dr["PAROLA"].ToString();
                user = dr["KULLANICIADI"].ToString();

            }
            if (id == ids && ps == pss)
            {

               users us = new users();
               us.WriteCookie("Lokanta", user);

            }
            else
            {
                donus = "hata";
            }

            return donus;
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            users h = new users();
            string a = h.ReadCookie("Lokanta");

            if (a != null)
            {
                Response.Redirect("anasayfa.aspx");
            }
        }