public JsonResult YetkiGrupSil(string Key) { SonucModel <YetkiGrupModel> oSonucModel = new SonucModel <YetkiGrupModel>() { Durum = "H", Aciklama = "" }; if (string.IsNullOrEmpty(Key)) { oSonucModel.Aciklama = "Silinecek kayda ulaşılamadı"; } else { string sSQL = "delete from public.\"YETKI_GRUP\""; sSQL += " where \"YetkiGrupKey\" = " + Key; string Sonuc = DBUtilPostger.SorguCalistir(sSQL); if (Sonuc == "0") { oSonucModel.Durum = ""; } else { oSonucModel.Aciklama = Sonuc; } } return(Json(oSonucModel, JsonRequestBehavior.AllowGet)); }
public JsonResult KullaniciSil(string Key) { SonucModel <KullaniciModel> oSonucModel = new SonucModel <KullaniciModel>() { Durum = "H", Aciklama = "" }; if (string.IsNullOrEmpty(Key)) { oSonucModel.Aciklama = "Silinecek kayda ulaşılamadı"; } else if (Key == "1") { oSonucModel.Aciklama = "Sistem yöneticisi silinemez"; } { string sSQL = "delete from public.\"KULLANICI\""; sSQL += " where \"KullaniciKey\" = " + Key; string Sonuc = DBUtilPostger.SorguCalistir(sSQL); if (Sonuc == "0") { oSonucModel.Durum = ""; } else { oSonucModel.Aciklama = Sonuc; } } return(Json(oSonucModel, JsonRequestBehavior.AllowGet)); }
public static DataSet YetkiLookGetir() { DataSet ds; if (HttpRuntime.Cache["ARGEM_YETKI"] == null) { string sSQL = "SELECT \"LookNo\", \"AlanAd\", \"UzunAd\" FROM public.\"YETKI_LOOK\""; ds = DBUtilPostger.VeriGetirDS(sSQL); HttpRuntime.Cache["ARGEM_YETKI"] = ds; } return((DataSet)HttpRuntime.Cache["ARGEM_YETKI"]); }
public ActionResult KullaniciOku(string Durum, string Key) { SonucModel <KullaniciAraModel> oSonucModel = new SonucModel <KullaniciAraModel>() { Durum = "H", Aciklama = "" }; if (string.IsNullOrEmpty(Durum) && string.IsNullOrEmpty(Key)) { oSonucModel.Aciklama = "Hatalı parametre"; return(PartialView(oSonucModel)); } else { string sSQL = "SELECT * FROM public.\"KULLANICI\""; sSQL += " where \"KullaniciKey\" = " + Key; DataSet ds = DBUtilPostger.VeriGetirDS(sSQL); if (ds.Tables[0].Rows.Count > 0) { DataRow dr = ds.Tables[0].Rows[0]; int KullaniciTipNo = Convert.ToInt32(dr["KullaniciTipNo"]); int AktifPasifTipNo = Convert.ToInt32(dr["AktifPasifTipNo"]); KullaniciAraModel oKullaniciAraModel = new KullaniciAraModel() { KullaniciKey = Convert.ToInt32(dr["KullaniciKey"]), KullaniciAd = dr["KullaniciAd"].ToString(), Ad = dr["Ad"].ToString(), Soyad = dr["Soyad"].ToString(), KullaniciTipNo = KullaniciTipNo, KullaniciTipNoUzunAd = CacheHelper.LookUzunAdGetir(CacheHelper.DatabaseTipNo.Yetki, KullaniciTipNo), AktifPasifTipNo = AktifPasifTipNo, AktifPasifTipNoUzunAd = CacheHelper.LookUzunAdGetir(CacheHelper.DatabaseTipNo.Yetki, AktifPasifTipNo) }; List <KullaniciAraModel> aryKullaniciAraModel = new List <KullaniciAraModel>(); aryKullaniciAraModel.Add(oKullaniciAraModel); oSonucModel.Durum = Durum; oSonucModel.Data = aryKullaniciAraModel; } else { oSonucModel.Aciklama = "Kayıt bulunamadı"; } } return(PartialView(oSonucModel)); }
public PartialViewResult YetkiGrupOku(string Durum, string Key) { SonucModel <YetkiGrupModel> oSonucModel = new SonucModel <YetkiGrupModel>() { Durum = "H", Aciklama = "" }; if (string.IsNullOrEmpty(Durum) && string.IsNullOrEmpty(Key)) { oSonucModel.Aciklama = "Hatalı parametre"; return(PartialView(oSonucModel)); } else { string sSQL = "SELECT * FROM public.\"YETKI_GRUP\""; sSQL += " where \"YetkiGrupKey\" = " + Key; DataSet ds = DBUtilPostger.VeriGetirDS(sSQL); if (ds.Tables[0].Rows.Count > 0) { DataRow dr = ds.Tables[0].Rows[0]; YetkiGrupModel oYetkiGrupModel = new YetkiGrupModel() { YetkiGrupKey = Convert.ToInt32(dr["YetkiGrupKey"]), YetkiGrupAd = dr["YetkiGrupAd"].ToString() }; List <YetkiGrupModel> aryYetkiGrupModel = new List <YetkiGrupModel>(); aryYetkiGrupModel.Add(oYetkiGrupModel); oSonucModel.Durum = Durum; oSonucModel.Data = aryYetkiGrupModel; } else { oSonucModel.Aciklama = "Kayıt bulunamadı"; } } return(PartialView(oSonucModel)); }