Exemplo n.º 1
0
        public void DM_GuncellemeEkraniGetir(int ID)
        {
            Duzenle_ID.Text = ID.ToString();

            using (BaglantiCumlesi db = new BaglantiCumlesi())
            {
                var SQL2 = (from p in db.tbl_menuler
                            where p.id == ID
                            select new
                {
                    p.dil_id,
                    p.ad,
                    p.url,
                    p.onay
                });

                if (SQL2.Any())
                {
                    AdminClass.StoreDoldurDil(StoreDil2, false);
                    StoreDoldurURL(StoreUrl2);

                    Duzenle_ComboBoxURL.SelectedItem.Value  = SQL2.Select(x => x.url).FirstOrDefault();
                    Duzenle_ComboBoxDil.SelectedItem.Value  = SQL2.Select(x => x.dil_id).FirstOrDefault().ToString();
                    Duzenle_TextFieldMenu.Text              = SQL2.Select(x => x.ad).FirstOrDefault();
                    Duzenle_ComboBoxOnay.SelectedItem.Value = Class.Fonksiyonlar.Genel.Cevirmeler.BoolToInteger(SQL2.Select(x => x.onay).FirstOrDefault());

                    WindowDuzenle.Title = ID + " numaralı kaydı güncelle...";
                }
            }

            WindowDuzenle.Show();
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            #region JS İçin Admin Root mu Değil mi?
            Class.Fonksiyonlar.JavaScript.Ekle("var AdminRoot = function(){return " + Class.Fonksiyonlar.Admin.Kullanici.Kontroller.Root(Class.Fonksiyonlar.Admin.Genel.AdminID()).ToString().ToLower() + ";};");
            #endregion

            #region Oturum Kontrol
            if (!Class.Fonksiyonlar.Admin.Genel.SessionKontrol())
            {
                #region Oturum Yoksa Postala
                Response.Redirect("default.aspx?rnd=" + (DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond) + "&s=" + Class.Fonksiyonlar.Genel.MevcutSayfa(), false);
                Context.ApplicationInstance.CompleteRequest();
                return;

                #endregion
            }
            else
            {
                #region JS İçin Header Yolu
                Class.Fonksiyonlar.JavaScript.Ekle("var HeaderYolu = \"" + Class.Degiskenler.Site.Yollar.Haber.Replace(@"\", "\\\\") + "\";");
                #endregion

                #region Sayfa Adını Al
                SayfaAdi = Request.Url.LocalPath.Split('/')[Request.Url.LocalPath.Split('/').Count() - 1].Replace(Request.CurrentExecutionFilePathExtension, "");
                #endregion

                #region Row Selection Modeli
                RSM = GridPanel1.SelectionModel.Primary as RowSelectionModel;
                #endregion

                #region Icon Register Olayı
                if (!IsPostBack)
                {
                    ResourceManager1.RegisterIcon(Icon.Cancel);
                }
                #endregion

                #region Veri Cacheden Mi Gelecek?
                if (Request.QueryString["cache"] != null)
                {
                    if (Request.QueryString["cache"].ToString().Trim() == "ok")
                    {
                        CacheOlayi = true;
                    }
                }
                #endregion

                #region Dil Seç
                if (!IsPostBack)
                {
                    AdminClass.StoreDoldurDil(StoreDil, true);
                }
                if (string.IsNullOrEmpty(ComboBoxDil.SelectedItem.Value))
                {
                    ComboBoxDil.SelectedItem.Value = AdminClass.AnaDilID();
                }
                #endregion
            }
            #endregion
        }
        public void DM_GuncellemeEkraniGetir(int ID)
        {
            Duzenle_ID.Text = ID.ToString();

            using (BaglantiCumlesi db = new BaglantiCumlesi())
            {
                var SQL2 = (from p in db.tbl_headerlar
                            where p.id == ID
                            select new
                {
                    p.dil_id,
                    p.baslik,
                    p.resim,
                    p.onay,
                    p.text
                });

                if (SQL2.Any())
                {
                    AdminClass.StoreDoldurDil(StoreDil2, false);
                    StoreDoldurResim(StoreResim2);

                    Duzenle_ComboBoxDil.SelectedItem.Value   = SQL2.Select(x => x.dil_id).FirstOrDefault().ToString();
                    Duzenle_ComboBoxResim.SelectedItem.Value = SQL2.Select(x => x.resim).FirstOrDefault();
                    Duzenle_TextFieldBaslik.Text             = SQL2.Select(x => x.baslik).FirstOrDefault();
                    Duzenle_TextAreaText.Text = SQL2.Select(x => x.text).FirstOrDefault();
                    Duzenle_ComboBoxOnay.SelectedItem.Value = Class.Fonksiyonlar.Genel.Cevirmeler.BoolToInteger(SQL2.Select(x => x.onay).FirstOrDefault());

                    WindowDuzenle.Title = ID + " numaralı kaydı güncelle...";
                }
            }

            WindowDuzenle.Show();
        }
Exemplo n.º 4
0
 protected void YeniKayitEkraniGetir(object sender, EventArgs e)
 {
     AdminClass.StoreDoldurDil(StoreDil1, false);
     #region Otomatik Dil Seçimi
     if (ComboBoxDil.SelectedItem.Value == "-1")
     {
         Ekle_ComboBoxDil.SelectedItem.Value = AdminClass.AnaDilID();
     }
     else
     {
         Ekle_ComboBoxDil.SelectedItem.Value = ComboBoxDil.SelectedItem.Value;
     }
     #endregion
     WindowEkle.Show();
 }
Exemplo n.º 5
0
        public void DM_GuncellemeEkraniGetir(int ID)
        {
            Duzenle_ID.Text = ID.ToString();

            using (BaglantiCumlesi db = new BaglantiCumlesi())
            {
                var SQL2 = (from p in db.tbl_kategoriler
                            where p.id == ID
                            select new
                {
                    p.ad,
                    p.dil_id,
                    p.onay,
                    p.resim,
                    p.kategori_tip
                });

                if (SQL2.Any())
                {
                    AdminClass.StoreDoldurDil(StoreDil2, false);
                    StoreDoldurResim(StoreResim2);

                    //if (!SQL2.Select(x => x.kategori_tip).FirstOrDefault())
                    //{
                    //Duzenle_ComboBoxResim.Show();
                    StoreDoldurResim(StoreResim2);
                    //}
                    //else
                    //{
                    //Duzenle_ComboBoxResim.Hide();
                    //}

                    Duzenle_ComboBoxDil.SelectedItem.Value = SQL2.Select(x => x.dil_id).FirstOrDefault().ToString();
                    Duzenle_TextFieldKategori.Text         = SQL2.Select(x => x.ad).FirstOrDefault();

                    if (!string.IsNullOrEmpty(SQL2.Select(x => x.resim).FirstOrDefault()))
                    {
                        Duzenle_ComboBoxResim.SelectedItem.Value = SQL2.Select(x => x.resim).FirstOrDefault();
                    }

                    Duzenle_ComboBoxOnay.SelectedItem.Value = Class.Fonksiyonlar.Genel.Cevirmeler.BoolToInteger(SQL2.Select(x => x.onay).FirstOrDefault());

                    WindowDuzenle.Title = ID + " numaralı kaydı güncelle...";
                }
            }

            WindowDuzenle.Show();
        }
        protected void YeniKayitEkraniGetir(object sender, EventArgs e)
        {
            AdminClass.StoreDoldurDil(StoreDil1, false);
            #region Otomatik Dil Seçimi
            int DilID2;
            if (ComboBoxDil.SelectedItem.Value == "-1")
            {
                Ekle_ComboBoxDil.SelectedItem.Value = AdminClass.AnaDilID();
                DilID2 = int.Parse(AdminClass.AnaDilID());
            }
            else
            {
                Ekle_ComboBoxDil.SelectedItem.Value = ComboBoxDil.SelectedItem.Value;
                DilID2 = int.Parse(ComboBoxDil.SelectedItem.Value);
            }
            #endregion

            StoreDoldurSabitler(Ekle_ComboBoxSabitler, StoreSabitler1, DilID2);
            WindowEkle.Show();
        }