public ActionResult Index(string Adi, string Parola) { if (Adi == "" || Parola == "") { return(Json("Lütfen boşlukları doldurunuz.", JsonRequestBehavior.AllowGet)); } //else if (GuvenlikKodu != Session["GuvenlikKodu"].ToString()) //{ // return Json("Güvenlik kodunu yanlış girdin.", JsonRequestBehavior.AllowGet); //} else { var kontrol = _kullanici.GetFirstOrDefault(g => g.Adi == Adi && g.Parola == Parola); if (kontrol != null) { _kullanici.Update(kontrol); Session["Kullanici"] = kontrol; return(Json("OK", JsonRequestBehavior.AllowGet)); } else { return(Json("Kullanıcı bilgisine ulaşılamadı.", JsonRequestBehavior.AllowGet)); } } }
public Kullanici KullaniciSil(int silinecekID) { var kullaniciSil = kullaniciBLL.GetFirstOrDefault(x => x.ID == silinecekID); if (kullaniciSil != null) { kullaniciBLL.Delete(kullaniciSil); } return(kullaniciSil); }