예제 #1
0
        //
        // GET: /AdminKullanicilar/Edit/5

        public ActionResult Edit(int id)
        {
            Tbl_Kullanicilar tbl_kullanicilar = db.Tbl_Kullanicilar.Single(t => t.KullaniciID == id);

            ViewBag.YetkiID = new SelectList(db.Tbl_Yetkiler, "YetkiKodu", "Yetki", tbl_kullanicilar.YetkiID);
            return(View(tbl_kullanicilar));
        }
예제 #2
0
        public ActionResult DeleteConfirmed(int id)
        {
            Tbl_Kullanicilar tbl_kullanicilar = db.Tbl_Kullanicilar.Single(t => t.KullaniciID == id);

            db.Tbl_Kullanicilar.DeleteObject(tbl_kullanicilar);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #3
0
 public ActionResult Edit(Tbl_Kullanicilar tbl_kullanicilar)
 {
     if (ModelState.IsValid)
     {
         db.Tbl_Kullanicilar.Attach(tbl_kullanicilar);
         db.ObjectStateManager.ChangeObjectState(tbl_kullanicilar, EntityState.Modified);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.YetkiID = new SelectList(db.Tbl_Yetkiler, "YetkiKodu", "Yetki", tbl_kullanicilar.YetkiID);
     return(View(tbl_kullanicilar));
 }
예제 #4
0
        public ActionResult Create(Tbl_Kullanicilar tbl_kullanicilar)
        {
            if (ModelState.IsValid)
            {
                db.Tbl_Kullanicilar.AddObject(tbl_kullanicilar);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.YetkiID = new SelectList(db.Tbl_Yetkiler, "YetkiKodu", "Yetki", tbl_kullanicilar.YetkiID);
            return(View(tbl_kullanicilar));
        }
        public ActionResult GirisYap(Tbl_Kullanicilar p)
        {
            var bilgiler =
                db.Tbl_Kullanicilar.FirstOrDefault(x => x.SICIL == p.SICIL && x.SIFRE == p.SIFRE);

            if (bilgiler != null)
            {
                FormsAuthentication.SetAuthCookie(bilgiler.SICIL, false);
                Session["SICIL"] = bilgiler.SICIL.ToString();

                return(RedirectToAction("Index", "Mahkeme"));
            }
            else
            {
                return(View());
            }
        }
예제 #6
0
 public bool KullaniciKaydi(string ad, string soyad, string email, string sifre, string telefon)
 {
     if (string.IsNullOrEmpty(ad) || string.IsNullOrEmpty(soyad) || string.IsNullOrEmpty(email) || string.IsNullOrEmpty(sifre) || string.IsNullOrEmpty(telefon))
     {
         return(false);
     }
     else
     {
         Tbl_Kullanicilar kullaniciEkle = new Tbl_Kullanicilar
         {
             KullaniciAdi     = ad,
             KullaniciSoyadi  = soyad,
             KullaniciEmail   = email,
             KullaniciSifre   = sifre,
             KullaniciTelefon = telefon,
             CreatedDate      = DateTime.Now,
             IsActive         = true,
         };
         db.Tbl_Kullanicilar.Add(kullaniciEkle);
         db.SaveChanges();
         return(true);
     }
 }
예제 #7
0
        //
        // GET: /AdminKullanicilar/Delete/5

        public ActionResult Delete(int id)
        {
            Tbl_Kullanicilar tbl_kullanicilar = db.Tbl_Kullanicilar.Single(t => t.KullaniciID == id);

            return(View(tbl_kullanicilar));
        }
예제 #8
0
        //
        // GET: /AdminKullanicilar/Details/5

        public ViewResult Details(int id)
        {
            Tbl_Kullanicilar tbl_kullanicilar = db.Tbl_Kullanicilar.Single(t => t.KullaniciID == id);

            return(View(tbl_kullanicilar));
        }
        public PartialViewResult KullaniciPaneli()
        {
            Tbl_Kullanicilar kullanici = (Tbl_Kullanicilar)Session["LoginUser"];

            return(PartialView(kullanici));
        }