private void setMenu() { KullaniciModel kullaniciModel = KullaniciModel.getKullanici(); rptMenu.DataSource = db.DataTableGetir("SELECT*FROM MENU WHERE YETKI_ID=" + kullaniciModel.YetkiID); rptMenu.DataBind(); }
public bool checkKullanici(string _kullanici_adi, string _sifre) { try { DataTable dt = dbLogin.DataTableGetir("SP_KULLANICI_GIRIS '" + _kullanici_adi + "','" + _sifre + "'"); if (dt.Rows.Count > 0) { KullaniciModel kullaniciModel = KullaniciModel.getKullanici(); kullaniciModel.KullaniciAdi = _kullanici_adi; kullaniciModel.Resim = dt.Rows[0]["RESIM"].ToString(); kullaniciModel.Ad = dt.Rows[0]["ADI"].ToString(); kullaniciModel.Soyad = dt.Rows[0]["SOYADI"].ToString(); kullaniciModel.Cinsiyet = dt.Rows[0]["CINSIYET"].ToString(); kullaniciModel.Email = dt.Rows[0]["EMAIL"].ToString(); kullaniciModel.Telefon = dt.Rows[0]["TELEFON"].ToString(); kullaniciModel.Adres = dt.Rows[0]["ADRES"].ToString(); kullaniciModel.Sehir = dt.Rows[0]["SEHIR"].ToString(); kullaniciModel.YetkiID = Convert.ToInt32(dt.Rows[0]["YETKI_ID"].ToString()); return(true); } else { return(false); } } catch (Exception) { return(false); } }
protected void btnMesaj_Click(object sender, EventArgs e) { DbBaglanti db = new DbBaglanti(); KullaniciModel kullanici = KullaniciModel.getKullanici(); db.DataTableGetir("MESAJ_GONDER '" + kullanici.KullaniciAdi + "','" + kullanici_adi + "','" + tbBaslik.Text + "','" + tbMesaj.Text + "'"); tbBaslik.Text = ""; tbMesaj.Text = ""; }
protected void btnGiris_Click(object sender, EventArgs e) { Login login = new Login(); if (login.checkKullanici(tbKullaniciAdi.Text, tbsifre.Text)) { KullaniciModel kullanici = KullaniciModel.getKullanici(); if (kullanici.YetkiID == 1) { Response.Redirect("/business/KitapTanim.aspx"); } else { Response.Redirect("/business/HomePage.aspx"); } } else { lblResult.Text = "Lütfen Kullanıcı Bilgilerini Kontrol Ediniz!"; } }
public DataTable getOkunmayanKitaplar() { KullaniciModel kullanici = KullaniciModel.getKullanici(); return(db.DataTableGetir("SP_GET_ORTAK_ONERI '" + kullanici.KullaniciAdi + "'")); }
public DataTable getOrtakPaunOneri() { KullaniciModel kullanici = KullaniciModel.getKullanici(); return(db.DataTableGetir("SP_GET_ORTAK_PUAN_ONERI '" + kullanici.KullaniciAdi + "'")); }