Example #1
0
 protected void btnGiris_Click(object sender, EventArgs e)
 {
     if (txtKullaniciAd.Text != "" && txtParola.Text != "")
     {
         VeriIslem veriIslem = new VeriIslem();
         SQLSorgu  sqlSorgu  = new SQLSorgu();
         if (veriIslem.dataTable(sqlSorgu.yetkiliGiris(txtKullaniciAd.Text, txtParola.Text)).Rows.Count != 0)
         {
             lblAciklama.Text = "Hoşgeldiniz Yetkili " + txtKullaniciAd.Text + " !";
             //  Thread.Sleep(3000);
             Session["userID"] = veriIslem.dataTable(sqlSorgu.getID(txtKullaniciAd.Text, txtParola.Text)).Rows[0][0].ToString();
             Response.Redirect("Anasayfa.aspx");
         }
         else if (veriIslem.dataTable(sqlSorgu.uyeGiris(txtKullaniciAd.Text, txtParola.Text)).Rows.Count != 0)
         {
             lblAciklama.Text  = "Hoşgeldiniz Uye " + txtKullaniciAd.Text + " !";
             Session["userID"] = veriIslem.dataTable(sqlSorgu.getID(txtKullaniciAd.Text, txtParola.Text)).Rows[0][0].ToString();
             Response.Redirect("UAnasayfa.aspx");
         }
         else
         {
             lblAciklama.Text = "Kullanıcı adı veya şifre hatalı.";
         }
     }
     else
     {
         lblAciklama.Text = "Kullanıcı adı veya şifre boş bırakılamaz.";
     }
 }
Example #2
0
        protected void Page_Load(object sender, EventArgs e) //Yetkiliye ait bilgilerin listelendiği sayfa
        {
            SQLSorgu  sqlSorgu  = new SQLSorgu();
            VeriIslem veriIslem = new VeriIslem();

            if (Session["userID"] != null)
            {
                int       kullaniciID = Convert.ToInt32(Session["userID"].ToString());
                DataTable dt          = veriIslem.dataTable(sqlSorgu.Bilgilendirme(kullaniciID));
                txtname.Text    = dt.Rows[0][0].ToString() + " " + dt.Rows[0][1].ToString();
                txtphoneNo.Text = dt.Rows[0][2].ToString();
                txtaddress.Text = dt.Rows[0][3].ToString();
            }
        }
Example #3
0
        protected void btnGiris_Click(object sender, EventArgs e)
        {
            if (txtKullaniciAd.Text != "" && txtParola.Text != "")
            {
                VeriIslem vi = new VeriIslem();

                if (vi.dt(Sorgular.Giris(txtKullaniciAd.Text, txtParola.Text)).Rows.Count != 0)
                {
                    lblAciklama.Text = "Hoşgeldiniz '" + txtKullaniciAd.Text + "'";

                    //Thread.Sleep(5000);
                    Response.Redirect("Anasayfa.aspx");
                }
                else
                {
                    lblAciklama.Text = "Kullanici adi veya Şifre hatalı";
                }
            }
            else
            {
                lblAciklama.Text = "Kullanici adi veya Şifre boş bırakılamaz";
            }
        }