protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //site içi sayfa linkleri listeleniyor Snlg_DBConnect vt = new Snlg_DBConnect(true); Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[1]; DBPrms[0] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, DBNull.Value); using (SqlDataReader sdr = vt.DBReaderOlustur("snlg_V1.msp_LinkListele", CommandType.StoredProcedure, DBPrms)) { while (sdr.Read()) { ListItem item = new ListItem(sdr["LinkText"].ToString(), sdr["Link"].ToString()); item.Selected = sdr["Link"].ToString() == "/" + Snlg_ConfigValues.startPage; DDLLinks.Items.Add(item); } } DataTable dtLang= vt.DataTableOlustur("SELECT DId, Name FROM snlg_V1.TblDiller WHERE Aktif = 1 ORDER BY Name", CommandType.Text); DDLDefLang.DataSource = dtLang; DDLDefLang.DataBind(); DDLAdminLang.DataSource = dtLang; DDLAdminLang.DataBind(); vt.Kapat(); CBExtension.Checked = !string.IsNullOrEmpty(Snlg_ConfigValues.urlExtension); try { DDLDefLang.SelectedValue = Snlg_ConfigValues.defaultLangId; } catch { } try { DDLAdminLang.SelectedValue = Snlg_ConfigValues.adminDefaultLangId.ToString(); } catch { } } }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { Uri realURL = new Uri(HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Authority + HttpContext.Current.Request.RawUrl); guid = HttpUtility.ParseQueryString(realURL.Query).Get("guid"); if (!string.IsNullOrEmpty(guid)) { Snlg_DBConnect vt = new Snlg_DBConnect(true); vt.Ac(); string SqlSorgu = string.Format(@"SELECT * FROM snlg_V1.TblUyeApp AS TBUA INNER JOIN snlg_V1.TblUyeDetay AS TBUD ON TBUA.UyeId=TBUD.UyeId WHERE TBUA.SifreUnuttumGuid='{0}'", guid); DataTable DtKayitVari = vt.DataTableOlustur(SqlSorgu, CommandType.Text); if (DtKayitVari.Rows.Count > 0) { UyeAdi = DtKayitVari.Rows[0]["UyeAd"].ToString(); } vt.Kapat(); } } } catch (Exception) { } }
protected void BtnSifreSifirlama_Click(object sender, EventArgs e) { Uri realURL = new Uri(HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Authority + HttpContext.Current.Request.RawUrl); guid = HttpUtility.ParseQueryString(realURL.Query).Get("guid"); if (!string.IsNullOrEmpty(guid)) { Snlg_DBConnect vt = new Snlg_DBConnect(true); vt.Ac(); if (!string.IsNullOrEmpty(TxtPassword.Text) && TxtPassword.Text == TxtPassword2.Text) { string SqlSorgu = string.Format(@"SELECT * FROM snlg_V1.TblUyeApp AS TBUA INNER JOIN snlg_V1.TblUyeDetay AS TBUD ON TBUA.UyeId=TBUD.UyeId WHERE TBUA.SifreUnuttumGuid='{0}'", guid); DataTable DtKayitVari = vt.DataTableOlustur(SqlSorgu, CommandType.Text); if (DtKayitVari.Rows.Count > 0) { #region parametreler string Sifre = TxtPassword.Text; Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[4]; try { string Eposta = DtKayitVari.Rows[0]["Eposta"].ToString(); DBPrms[0] = new Snlg_DBParameter("@IslemTipi", SqlDbType.Int, 1); DBPrms[1] = new Snlg_DBParameter("@Eposta", SqlDbType.VarChar, Eposta, 150); DBPrms[2] = new Snlg_DBParameter("@Sifre", SqlDbType.VarChar, Snlg_ConfigValues.MD5Olustur(Sifre), 128); DBPrms[3] = new Snlg_DBParameter("@guidDegeri", SqlDbType.VarChar, DBNull.Value); using (SqlDataReader sdr = vt.DBReaderOlustur("snlg_V1.zsp_UyeSifreSifirla", CommandType.StoredProcedure, DBPrms)) { try { if (sdr.Read()) { Snlg_Hata.ziyaretci.HataGosterBasarili(Resources._default.login_ascx_hata13, false, "#" + UserControlClientID); TxtPassword2.Text = TxtPassword.Text = ""; } } catch (Exception exc) { Snlg_Hata.ziyaretci.HataGosterHatali(Resources._default.hataBeklenmeyen, false, "#" + UserControlClientID); } } } catch { Snlg_Hata.ziyaretci.HataGosterHatali(Resources._default.hataBeklenmeyen, false, "#" + UserControlClientID); } #endregion } } else { Snlg_Hata.ziyaretci.HataGosterHatali(Resources._default.login_ascx_hata12, false, "#" + UserControlClientID); } } }
private void BindGrdView() { Snlg_DBConnect vt = new Snlg_DBConnect(true); string sqlSorgu = string.Format(@"SELECT TblProjeAltBilgiApp.ProjeAltId, TblProjeAltBilgiApp.Sira, TblProjeAltBilgiDetay.Baslik, TblProjeAltBilgiApp.Gorunurluk, TblProjeAltBilgiDetay.SeoUrl FROM snlg_V1.TblProjeAltBilgiApp INNER JOIN snlg_V1.TblProjeAltBilgiDetay ON TblProjeAltBilgiApp.ProjeAltId = TblProjeAltBilgiDetay.ProjeAltId INNER JOIN snlg_V1.TblProjeDetay ON TblProjeAltBilgiApp.ProjeId = TblProjeDetay.ProjeId WHERE (TblProjeAltBilgiDetay.Dil = {0}) ORDER BY TblProjeAltBilgiApp.Sira ASC", Snlg_ConfigValues.defaultLangId); GrdSiralama.DataSource = vt.DataTableOlustur(sqlSorgu, System.Data.CommandType.Text); GrdSiralama.DataBind(); }
protected void SDSYorum_Updated(object sender, SqlDataSourceStatusEventArgs e) { if (e.Exception == null) { Snlg_Hata.ziyaretci.HataGosterBasarili("Değişiklikler kaydedildi.", false); MPE1.Hide(); GVYorumlar.DataBind(); if (((CheckBox)FVYorum.FindControl("CBMail")).Checked) { Snlg_DBConnect vt = new Snlg_DBConnect(true); try { DataTable DtMail = vt.DataTableOlustur("snlg_V1.zsp_EPostaSablonGetir_Smtp", CommandType.StoredProcedure, new Snlg_DBParameter[2] { new Snlg_DBParameter("@Anahtar", SqlDbType.VarChar, "makaleYorumOnay"), new Snlg_DBParameter("@Ozelifadeler", SqlDbType.VarChar, "$#url_adresi#$") }); Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[1]; DBPrms[0] = new Snlg_DBParameter("@YId", SqlDbType.Int, e.Command.Parameters["@YId"].Value.ToString()); SqlDataReader sdr = vt.DBReaderOlustur("snlg_V1.msp_MakaleYorumCevapEposta", CommandType.StoredProcedure, DBPrms); if (DtMail.Rows.Count > 0) {//mail gönder DataRow drMail = DtMail.Rows[0]; Snlg_Mail eposta = new Snlg_Mail(); while (sdr.Read()) { if (!string.IsNullOrEmpty(drMail["Kimden"].ToString()) && !string.IsNullOrEmpty(drMail["SmtpHost"].ToString())) { eposta.smtp = new System.Net.Mail.SmtpClient(drMail["SmtpHost"].ToString(), Convert.ToInt32(drMail["SmtpPort"])); eposta.smtp.EnableSsl = Convert.ToBoolean(drMail["SSL_"]); eposta.smtp.Credentials = new System.Net.NetworkCredential(drMail["Kimden"].ToString(), drMail["SmtpPsw"].ToString()); } try {//ilgili yorumculra mesaj eposta.Gonder(drMail["Kimden"].ToString(), drMail["KimdenIsim"].ToString(), sdr["Kime"].ToString(), drMail["Konu"].ToString(), drMail["Mesaj"].ToString().Replace("$#url_adresi#$", Request.Url.Host + sdr["SeoUrl"].ToString())); } catch { } } sdr.Close(); } } catch { } vt.Kapat(); } } else { MPE1.Hide(); Snlg_Hata.ziyaretci.ExceptionLogla(e.Exception); e.ExceptionHandled = true; Snlg_Hata.ziyaretci.HataGosterHatali("Beklenmeyen bir hata oluştu.", true); } }
protected void Page_PreInit(object sender, EventArgs e) { if (string.IsNullOrEmpty(UCId)) UCId = "-1"; Snlg_DBConnect vt = new Snlg_DBConnect(true); dtMenuGroup = vt.DataTableOlustur("SELECT * FROM snlg_V1.TblUcApp WHERE BlokType = 'Menu' ORDER BY Title", CommandType.Text); vt.Kapat(); if (dtMenuGroup.Rows.Count < 1) { Snlg_Hata.ziyaretci.HataGosterUyari("Menü oluşturmadan önce bir menü grubu tanımlamalısınız.", true); Response.Redirect("menu-groups.aspx"); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) {//ust kategori için ddl dolduruluyor DDLKtg.Items.Clear(); DDLKtg.Items.Add(new ListItem("Tüm Kategorileri Göster", "")); DataTable dt = new DataTable(); Snlg_DBConnect vt = new Snlg_DBConnect(true); dt = vt.DataTableOlustur("SELECT snlg_V1.TblReferansKtgApp.KtgId, snlg_V1.TblReferansKtgDetay.KtgAd FROM snlg_V1.TblReferansKtgApp LEFT OUTER JOIN snlg_V1.TblReferansKtgDetay ON snlg_V1.TblReferansKtgApp.KtgId = snlg_V1.TblReferansKtgDetay.KtgId AND snlg_V1.TblReferansKtgDetay.Dil= " + Snlg_ConfigValues.defaultLangId, CommandType.Text); foreach (DataRow dr in dt.Rows) { DDLKtg.Items.Add(new ListItem(dr["KtgAd"].ToString(), dr["KtgId"].ToString())); } vt.Kapat(); } if (Page.IsPostBack && !string.IsNullOrEmpty(Request.Form["HdnSil"]) && Regex.IsMatch(Request.Form["HdnSil"].Replace(",", ""), "^\\d+$")) {//seçilen değerler varsa siliniyor if (YetkiKontrol(pageName + "-Delete")) { Snlg_DBConnect vt = new Snlg_DBConnect(true); try { using (SqlDataReader Sdr = vt.DBReaderOlustur("snlg_V1.msp_ReferansSil", CommandType.StoredProcedure, new Snlg_DBParameter[1] { new Snlg_DBParameter("@RId", SqlDbType.VarChar, Request.Form["HdnSil"]) })) { //if (Sdr.Read()) // try // { // foreach (string resim in Sdr[0].ToString().TrimEnd(',').Split(',')) // File.Delete(Server.MapPath("~/uploads/referans/rf_" + resim)); // } // catch { } } Snlg_Hata.ziyaretci.HataGosterBasarili("Seçtiğiniz referanslar silindi.", false); GVResim.DataBind(); } catch (Exception exc) { Snlg_Hata.ziyaretci.ExceptionLogla(exc); Snlg_Hata.ziyaretci.HataGosterHatali("Beklenmeyen bir hata oluştu.", false); } vt.Kapat(); } } }
protected void SdsUrlkeysGroup_Inserted(object sender, SqlDataSourceStatusEventArgs e) { if (e.Exception == null) Snlg_Hata.ziyaretci.HataGosterBasarili("Url Keys tanımlandı.", true); else { Snlg_Hata.ziyaretci.ExceptionLogla(e.Exception); e.ExceptionHandled = true; Snlg_Hata.ziyaretci.HataGosterHatali("Beklenmeyen bir hata oluştu.", true); } Snlg_DBConnect vt = new Snlg_DBConnect(true); Snlg_ConfigValues.DTurlKeyList = vt.DataTableOlustur("SELECT UrlKeyValue,UrlKeyName, Dil FROM snlg_V1.TblUrlKeys ", CommandType.Text); vt.Kapat(); Response.Redirect(Request.Url.AbsoluteUri, true); }
public void GeleriEmbed(StringBuilder SBicerik, Snlg_DBConnect vt, Snlg_InterfaceBaseClass pg) { byte x = 0; while (SBicerik.ToString().Contains("image_gallery") && x < 20) { x++;//metinde image_gallery kelimesi geçiyorsa sonsuz döngüye girmemesi için en fazla 30 kez dönülüyor int galleryPosition = SBicerik.ToString().IndexOf("image_gallery"); int tagPositionStart = SBicerik.ToString().LastIndexOf("<img", galleryPosition); int tagPositionEnd = SBicerik.ToString().IndexOf("/>", tagPositionStart) + 2; string tag = SBicerik.ToString().Substring(tagPositionStart, tagPositionEnd - tagPositionStart); StringBuilder SBGaleriHtmlKodlari = new StringBuilder(); XmlDocument xDoc = new XmlDocument(); xDoc.LoadXml(tag); XmlNode node = xDoc.SelectSingleNode("/img"); string StyleWH = ""; if (node.Attributes["width"] != null) StyleWH += " style=\"width:" + node.Attributes["width"].Value + "px;"; else StyleWH += " style=\"width:100%;"; if (node.Attributes["height"] != null) StyleWH += "height:" + node.Attributes["height"].Value + "px;\""; else StyleWH += "\""; Snlg_DBParameter[] DBPrms = new Snlg_DBParameter[2]; DBPrms[0] = new Snlg_DBParameter("@GId", SqlDbType.Int, node.Attributes["gallery_id"].Value); DBPrms[1] = new Snlg_DBParameter("@Dil", SqlDbType.SmallInt, Snlg_ConfigValues.s_ZDilId); #region ZoomGallery resim galerisi için kodlar if (node.Attributes["gallery_type"].Value == "zoom_gallery") { //bu galeri için gerekli scriptler ve css ler import edilyoir pg.ScriptOrCssFileImportHead("/scripts/JQuery_Zoom_Wizard/js/5c8a156.js"); pg.ScriptOrCssFileImportHead("/scripts/JQuery_Zoom_Wizard/css/c3732c4.css"); pg.SBJsKodlari.Append("$(document).ready(function () {$('.jquery_zoom1_thumbs img').click(function (event) { $('.jquery_zoom1 img.zoomwizard').attr('src', $(this).attr('src').replace('k_glr_', 'glr_')); });});"); //galeirnin oluşması için gerekkli html kodları oluşturuluyor. SBGaleriHtmlKodlari.Append("<div " + StyleWH + " class=\"row\">"); //resimler çekilyor DataTable DTResimler = vt.DataTableOlustur("snlg_V1.zsp_GaleridekiResimler", CommandType.StoredProcedure, DBPrms); SBGaleriHtmlKodlari.Append("<div class=\"jquery_zoom1_thumbs col-md-3\">"); //thumb'lar listeleniyor foreach (DataRow dr in DTResimler.Rows) SBGaleriHtmlKodlari.AppendFormat("<img src=\"{0}\" class=\"img-responsive\"/>", dr["Resim"].ToString()); SBGaleriHtmlKodlari.Append("</div>"); SBGaleriHtmlKodlari.Append("<div class=\"jquery_zoom1 col-md-9\"><div class=\"img-wrap img-responsive\">"); //default resim ayarlanıyor if (DTResimler.Rows.Count > 0) SBGaleriHtmlKodlari.AppendFormat("<img src=\"{0}\" class=\"zoomwizard\" />", DTResimler.Rows[0]["Resim"].ToString()); SBGaleriHtmlKodlari.Append("</div></div></div>"); } #endregion #region LightBox tarzı resim galerisi için kodlar if (node.Attributes["gallery_type"].Value == "lightbox") { //bu galeri için gerekli scriptler ve css ler import edilyor pg.ScriptOrCssFileImportHead("/scripts/bootstrap-lightbox/js/bootstrap-lightbox.js"); pg.ScriptOrCssFileImportHead("/scripts/bootstrap-lightbox/css/bootstrap-lightbox.css"); //galeirnin oluşması için gerekli html kodları oluşturuluyor. SBGaleriHtmlKodlari.Append("<div " + StyleWH + ">"); SBGaleriHtmlKodlari.Append("<div class=\"LBGallery\"><div class=\"row\">"); using (SqlDataReader sdr = vt.DBReaderOlustur("snlg_V1.zsp_GaleridekiResimler", CommandType.StoredProcedure, DBPrms)) {//galerideki resimler alınıyor while (sdr.Read()) SBGaleriHtmlKodlari.AppendFormat("<div class=\"gallery-img-wrapper col-sm-4 mb-lg\"><div class=\"gallery-img-title\">{2}</div><div class=\"gallery-img-image\"><a rel=\"{0}\" href=\"{1}\" data-title=\"{2}\" data-footer=\"{3}\" data-toggle=\"lightbox\" data-gallery=\"multiimages\"><img src=\"{1}\" title=\"{2}\" alt=\"{3}\" class=\"img-responsive\"/></a></div></div>", node.Attributes["gallery_id"].Value, sdr["Resim"].ToString(), sdr["Baslik"].ToString().Replace("\"", ""), sdr["Bilgi"].ToString().Replace("\"", "")); } SBGaleriHtmlKodlari.Append("</div></div></div>"); } #endregion #region bootstrap carousel if (node.Attributes["gallery_type"].Value == "bootstrap-carousel") { DataTable DT = vt.DataTableOlustur("snlg_V1.zsp_GaleridekiResimler", CommandType.StoredProcedure, DBPrms); //galeirnin oluşması için gerekkli html kodları oluşturuluyor. SBGaleriHtmlKodlari.AppendFormat(@" <div id='myCarousel-{0}' class='carousel slide' data-ride='carousel'> <ol class='carousel-indicators'>", node.Attributes["gallery_id"].Value); for (int i = 0; i < DT.Rows.Count; i++) SBGaleriHtmlKodlari.AppendFormat(@"<li data-target='#myCarousel-{0}' data-slide-to='{1}' {2}></li>", node.Attributes["gallery_id"].Value, i.ToString(), (i == 0 ? "class='active'" : "")); SBGaleriHtmlKodlari.Append(@" </ol> <div class='carousel-inner' role='listbox'>"); for (int i = 0; i < DT.Rows.Count; i++) { SBGaleriHtmlKodlari.AppendFormat(@" <div class='item {0}'> <a {4}><img src='{1}' alt='{2}' ></a> <div class='carousel-caption'> <h3>{2}</h3> <p>{3}</p> </div> </div>", (i == 0 ? "active" : ""), DT.Rows[i]["Resim"].ToString(), HttpContext.Current.Server.HtmlEncode(DT.Rows[i]["Baslik"].ToString()), HttpContext.Current.Server.HtmlEncode(DT.Rows[i]["Bilgi"].ToString()), (string.IsNullOrEmpty(DT.Rows[i]["LinkUrl"].ToString()) ? "" : "href='" + DT.Rows[i]["LinkUrl"].ToString() + "'")); } SBGaleriHtmlKodlari.AppendFormat(@" </div> <a class='left carousel-control' href='#myCarousel-{0}' role='button' data-slide='prev'> <span class='glyphicon glyphicon-chevron-left' aria-hidden='true'></span> <span class='sr-only'>Previous</span> </a> <a class='right carousel-control' href='#myCarousel-{0}' role='button' data-slide='next'> <span class='glyphicon glyphicon-chevron-right' aria-hidden='true'></span> <span class='sr-only'>Next</span> </a> </div> ", node.Attributes["gallery_id"].Value); } #endregion SBicerik.Replace(tag, SBGaleriHtmlKodlari.ToString()); } }
protected void TxtUrlKeysDegeri_TextChanged(object sender, EventArgs e) { if (!YetkiKontrol(pageName + "-Update")) { Snlg_Hata.ziyaretci.HataGosterHatali("Bu işlemi yapmak için yetkili değilsiniz.", false); return; } try { TextBox t = (TextBox)sender; t.Text = trReplace(t.Text); GridViewRow satir = (GridViewRow)t.NamingContainer; if (satir.RowType == DataControlRowType.DataRow) GVUrlKeys.UpdateRow(satir.RowIndex, true); Snlg_Hata.ziyaretci.HataGosterBasarili("Değişiklikler güncellendi.", false); } catch (Exception exc) { Snlg_Hata.ziyaretci.ExceptionLogla(exc); Snlg_Hata.ziyaretci.HataGosterHatali("Beklenmeyen bir hata oluştu.", false); } Snlg_DBConnect vt = new Snlg_DBConnect(true); Snlg_ConfigValues.DTurlKeyList = vt.DataTableOlustur("SELECT UrlKeyValue,UrlKeyName, Dil FROM snlg_V1.TblUrlKeys ", CommandType.Text); vt.Kapat(); }
public static void ApplicationStartMetod() { Snlg_DBConnect vt = new Snlg_DBConnect(true); Snlg_ConfigValues.DTurlKeyList = vt.DataTableOlustur("SELECT UrlKeyValue,UrlKeyName, Dil FROM snlg_V1.TblUrlKeys ", CommandType.Text); Snlg_ConfigValues.urlExtension = vt.ScalarSorguCalistir("SELECT Deger FROM snlg_V1.TblDegiskenler WHERE Degisken = 'urlExtension'", CommandType.Text).ToString(); Snlg_ConfigValues.startPage = vt.ScalarSorguCalistir("SELECT Deger FROM snlg_V1.TblDegiskenler WHERE Degisken = 'AcilisSayfasi'", CommandType.Text).ToString(); Snlg_ConfigValues.defaultLangId = vt.ScalarSorguCalistir("SELECT Deger FROM snlg_V1.TblDegiskenler WHERE Degisken = 'DefaultLang'", CommandType.Text).ToString(); Snlg_ConfigValues.adminDefaultLangId = Convert.ToInt32(vt.ScalarSorguCalistir("SELECT Deger FROM snlg_V1.TblDegiskenler WHERE Degisken = 'adminDefaultLangID'", CommandType.Text).ToString()); vt.Kapat(); }
private void BindGrdView() { Snlg_DBConnect vt = new Snlg_DBConnect(true); string sqlSorgu = string.Format(@"SELECT * FROM snlg_V1.TblUrunResim WHERE UrunId={0} ORDER BY Sira ASC",Request.QueryString["uid"].ToString()); GrdSiralama.DataSource = vt.DataTableOlustur(sqlSorgu, System.Data.CommandType.Text); GrdSiralama.DataBind(); }
protected void FVDetay_DataBound(object sender, EventArgs e) { if (FVDetay.CurrentMode == FormViewMode.ReadOnly) return; ListBox lb = (ListBox)FVDetay.FindControl("ListKtg"); lb.Items.Clear(); ListDoldur(DTKtgler.Select("UstId IS NULL"), null, lb); if (FVDetay.CurrentMode == FormViewMode.Edit) { Snlg_DBConnect vt = new Snlg_DBConnect(true); SqlDataReader SDRKtgler = vt.DBReaderOlustur("SELECT UrunId, KtgId FROM snlg_V1.TblUrun_Kategori WHERE UrunId = " + Request.QueryString["uid"], CommandType.Text); while (SDRKtgler.Read()) try { lb.Items.FindByValue(SDRKtgler["KtgId"].ToString()).Selected = true; } catch { } SDRKtgler.Close(); Repeater rpResmler=(Repeater)FVDetay.FindControl("rpResimler"); DataTable dt = vt.DataTableOlustur("SELECT * FROM snlg_V1.TblUrunResim WHERE UrunId=" + Request.QueryString["uid"], CommandType.Text); rpResmler.DataSource = dt; rpResmler.DataBind(); vt.Kapat(); } }
private void BindGrdView() { Snlg_DBConnect vt = new Snlg_DBConnect(true); string sqlSorgu = string.Format(@"select * from snlg_V1.TblResimGaleriResimlerApp WHERE GId={0} ORDER BY Sira ASC", Request.QueryString["gid"].ToString()); GrdSiralama.DataSource = vt.DataTableOlustur(sqlSorgu, System.Data.CommandType.Text); GrdSiralama.DataBind(); }
protected void DDLKtg_SelectedIndexChanged(object sender, EventArgs e) { try { sirala.Visible = true; Snlg_DBConnect vt = new Snlg_DBConnect(true); string sqlSorgu = string.Format(@"SELECT TblProjeApp.ProjeId, TblProjeApp.Sira, TblProjeDetay.Baslik, TblProjeApp.Aktif, TblProjeApp.ProjeUrl FROM snlg_V1.TblProjeApp INNER JOIN snlg_V1.TblProjeDetay ON TblProjeApp.ProjeId = TblProjeDetay.ProjeId LEFT OUTER JOIN snlg_V1.TblProje_Kategori ON TblProjeApp.ProjeId = TblProje_Kategori.ProjeId WHERE(TblProjeDetay.Dil = {0}) AND(TblProje_Kategori.KtgId ={1}) ORDER BY TblProjeApp.Sira ASC", Snlg_ConfigValues.defaultLangId, DDLKtg.SelectedValue); GrdSiralama.DataSource = vt.DataTableOlustur(sqlSorgu, System.Data.CommandType.Text); GrdSiralama.DataBind(); } catch (Exception) { GrdSiralama.DataSource = null; GrdSiralama.DataBind(); sirala.Visible = false; } }
public void BindGrvd(string id) { Snlg_DBConnect vt = new Snlg_DBConnect(true); string sqlSorgu = string.Format("SELECT * FROM snlg_V1.TblReferansApp WHERE KtgId = {0} ORDER BY Sira ASC", DDLKtg.SelectedValue); GrdSiralama.DataSource = vt.DataTableOlustur(sqlSorgu, System.Data.CommandType.Text); GrdSiralama.DataBind(); }
protected void DDLKtg_SelectedIndexChanged1(object sender, EventArgs e) { if (DDLKtg.SelectedIndex!=0) { sirala.Visible = true; Snlg_DBConnect vt = new Snlg_DBConnect(true); string sqlSorgu = string.Format(@"SELECT TblUrunApp.UrunId, TblUrunApp.Sira, TblUrunDetay.UrunAd,TblUrunApp.Resim AS DefaultResim,TblUrunApp.Fiyat, TblUrunApp.Gorunurluk, TblUrunApp.UrunKodu FROM snlg_V1.TblUrunApp INNER JOIN snlg_V1.TblUrunDetay ON TblUrunApp.UrunId = TblUrunDetay.UrunId INNER JOIN snlg_V1.TblUrun_Kategori ON TblUrunApp.UrunId = TblUrun_Kategori.UrunId WHERE (TblUrunDetay.Dil ={0}) AND (TblUrun_Kategori.KtgId ={1}) ORDER BY TblUrunApp.Sira ASC", Snlg_ConfigValues.defaultLangId, DDLKtg.SelectedValue); GrdSiralama.DataSource = vt.DataTableOlustur(sqlSorgu, System.Data.CommandType.Text); GrdSiralama.DataBind(); } else { GrdSiralama.DataSource = null; GrdSiralama.DataBind(); sirala.Visible = false; } }