Exemple #1
0
    protected void btnGirisYap_Click(object sender, EventArgs e)
    {
        string kad, ksifre;

        kad    = txtKullanici.Text;
        ksifre = txtSifre.Text;
        //
        string sifrem = MD5Olustur(txtSifre.Text);

        //
        //DataTable dt = DBIslem.DtGetir("SELECT * FROM TBL_KULLANICI WHERE kKULLANICIADI='" + kad + "' AND kSIFRE='" + sifrem + "'");


        //kid = dt.Rows[0]["kID"].ToString();
        if (DBIslem.LoginControl(sifrem, kad) == true)
        {
            Session.Add("kullanici", kad);
            Session.Add("kulid", DBIslem.kulidGetir(kad, sifrem));

            DateTime bugun = DateTime.Now;
            int      yil   = bugun.Year;


            // Session["bildirimler"] = bildirimtable;
            Response.Redirect("Default.aspx");
        }
        else
        {
            lblDurum.Text = "Kullanıcı adı ya da şifre hatalı.";
        }
    }