protected void Page_Load(object sender, EventArgs e) { RepeaterSolMenu.DataSource = kod.GetDataTable("select * from makaleKategori"); RepeaterSolMenu.DataBind(); Repeatermakaleler.DataSource = kod.GetDataTable("select * from makaleler"); Repeatermakaleler.DataBind(); string urunlerSorgu = ""; if (Request.QueryString["kId"] != null) { urunlerSorgu = "SELECT makaleAltKategori.makaleAltKategori , makaleAltKategori.makaleKategoriId, makaleler.* FROM(makaleAltKategori INNER JOIN makaleler ON makaleAltKategori.makaleAltKategori = makaleler.makaleAltKategori)where (makaleDurum ='1' AND makaleKategoriId=" + Request.QueryString["kId"] + ") ORDER BY makaleId DESC"; } else if (Request.QueryString["akId"] != null) { urunlerSorgu = "Select Top 20 * from makaleler where (makaleDurum='1' AND makaleAltKategori =" + Request.QueryString["akId"] + ") ORDER BY makaleId DESC"; } else if (Request.QueryString["uId"] != null) { Response.Redirect("makaledetay.aspx?uId= " + Request.QueryString["uId"]); } else { urunlerSorgu = "Select Top 20 * from makaleler where makaleDurum = '1' ORDER BY makaleId DESC"; } Repeatermakaleler.DataSource = kod.GetDataTable(urunlerSorgu); Repeatermakaleler.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { RepeaterSolMenu.DataSource = kod.GetDataTable("select kategoriId, kategoriAd from kategoriler"); RepeaterSolMenu.DataBind(); string urunlerSorgu = ""; if (Request.QueryString["kId"] != null) { urunlerSorgu = "SELECT proje.*, altkategori.altKategoriId , altkategori.kategoriId FROM(altkategori INNER JOIN proje ON altkategori.altKategoriId = proje.altKategoriId) where (projeDurum ='1' AND kategoriId=" + Request.QueryString["kId"] + ") Order BY ProjeId DESC"; } else if (Request.QueryString["akId"] != null) { urunlerSorgu = "Select Top 20 * from proje where (projeDurum='1' AND altKategoriId =" + Request.QueryString["akId"] + ") Order BY ProjeId DESC "; } else if (Request.QueryString["uId"] != null) { urunlerSorgu = "Select Top 20 * from proje where projeDurum = '1' Order BY ProjeId DESC"; PanelUrunler.Visible = false; PanelTekUrun.Visible = true; tekUrunGoster(Request.QueryString["uId"]); } else if (Request.QueryString["ak_ak_Id"] != null) { urunlerSorgu = "Select Top 20 * from proje where (projeDurum='1' AND altKategorininAltKategori_Id =" + Request.QueryString["ak_ak_Id"] + ") Order BY ProjeId DESC"; } else { urunlerSorgu = "Select Top 20 * from proje where projeDurum = '1' Order BY projeId DESC"; } RepeaterUrunler.DataSource = kod.GetDataTable(urunlerSorgu); RepeaterUrunler.DataBind(); }