本文整理汇总了C#中Data.EntityFramework.BLL.TriglavBL.GetClanciByPodKategorija方法的典型用法代码示例。如果您正苦于以下问题:C# TriglavBL.GetClanciByPodKategorija方法的具体用法?C# TriglavBL.GetClanciByPodKategorija怎么用?C# TriglavBL.GetClanciByPodKategorija使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Data.EntityFramework.BLL.TriglavBL
的用法示例。
在下文中一共展示了TriglavBL.GetClanciByPodKategorija方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
using (TriglavBL temp = new TriglavBL())
{
Directory lc = Data.Lucene.Indexing.GetDirectoryClanci(); // ovo brisati samo indeksiranje proba
Directory lp = Data.Lucene.Indexing.GetDirectoryPitanja(); // ovo brisati samo indeksiranje proba
txt_TrenutnoUredjujemo.Text = "Trenutno uređujemo " + temp.getCountAllPosts(1) + " članaka!";
if (Request.QueryString["Pretraga"] != null)
{
//Pretraga Wiki preporuke term & call function
string term = Request.QueryString["Pretraga"];
string func = "searchWithClick('" + term + "');";
ClientScript.RegisterStartupScript(this.GetType(), term, func, true);
dl_Clanci.DataSource = Data.Lucene.Pretraga.searchClanci(Request.QueryString["Pretraga"]);
dl_Clanci.DataBind();
dl_Pitanja.DataSource = Data.Lucene.Pretraga.searchPitanja(Request.QueryString["Pretraga"]);
dl_Pitanja.DataBind();
lbl_TrazenaRijec.Text = "Tražili ste pojam: " + Request.QueryString["Pretraga"];
lbl_BrojRezlutataPretrage.Text = "Za vas smo pronašli " + dl_Clanci.Items.Count + " rezultata ";
btn_Posljednje.BackColor = Color.LightGray;
btn_Istaknuti.BackColor = Color.LightGray;
btn_Hot.BackColor = Color.LightGray;
btn_OveSedmice.BackColor = Color.LightGray;
btn_OvogMjeseca.BackColor = Color.LightGray;
}
else if (Request.QueryString["TagID"] != null)
{
//Tag Wiki preporuke term & call function
string term = temp.getTagByID(Convert.ToInt32(Request.QueryString["TagID"])).Naziv;
string func = "searchWithClick('" + term + "');";
ClientScript.RegisterStartupScript(this.GetType(), term, func, true);
dl_Clanci.DataSource = Data.Lucene.Pretraga.getClanciByTag(Convert.ToInt32(Request.QueryString["TagID"]));
dl_Clanci.DataBind();
dl_Pitanja.DataSource = Data.Lucene.Pretraga.getPitanjaByTag(Convert.ToInt32(Request.QueryString["TagID"]));
dl_Pitanja.DataBind();
lbl_TrazenaRijec.Text = "Tražili ste poveznicu: " + temp.getTagByID(Convert.ToInt32(Request.QueryString["TagID"])).Naziv;
lbl_BrojRezlutataPretrage.Text = "Za vas smo pronašli " + dl_Clanci.Items.Count + " rezultata";
}
else if (Request.QueryString["PodKategorijaID"] != null)
{
//Pretraga Wiki preporuke term & call function
string term = temp.getPodKategorijaByID(Convert.ToInt32(Request.QueryString["PodKategorijaID"])).Naslov;
string func = "searchWithClick('" + term + "');";
ClientScript.RegisterStartupScript(this.GetType(), term, func, true);
dl_Clanci.DataSource = temp.GetClanciByPodKategorija(Convert.ToInt32(Request.QueryString["PodKategorijaID"]));
dl_Clanci.DataBind();
dl_Pitanja.DataSource = temp.GetPitanjaByPodKategorija(Convert.ToInt32(Request.QueryString["PodKategorijaID"]));
dl_Pitanja.DataBind();
lbl_TrazenaRijec.Text = "Tražili ste članke sa podkategorijom: " + temp.getPodKategorijaByID(Convert.ToInt32(Request.QueryString["PodKategorijaID"])).Naslov;
lbl_BrojRezlutataPretrage.Text = "Za vas smo pronašli " + dl_Clanci.Items.Count + " rezultata";
}
else if (Request.QueryString["KategorijaID"] != null)
{
//Pretraga Wiki preporuke term & call function
string term = temp.getPodKategorijaByID(Convert.ToInt32(Request.QueryString["KategorijaID"])).Naslov;
string func = "searchWithClick('" + term + "');";
ClientScript.RegisterStartupScript(this.GetType(), term, func, true);
dl_Clanci.DataSource = temp.GetClanciByKategorija(Convert.ToInt32(Request.QueryString["KategorijaID"]));
dl_Clanci.DataBind();
dl_Pitanja.DataSource = temp.GetPitanjaByKategorija(Convert.ToInt32(Request.QueryString["KategorijaID"]));
dl_Pitanja.DataBind();
lbl_TrazenaRijec.Text = "Tražili ste članke sa kategorijom: " + temp.getKategorijaByID(Convert.ToInt32(Request.QueryString["KategorijaID"])).Naslov;
lbl_BrojRezlutataPretrage.Text = "Za vas smo pronašli " + dl_Clanci.Items.Count + " rezultata";
}
else
{
korisnik = (Data.EntityFramework.DAL.Korisnik)Session["LogiraniKorisnik"];
if (korisnik != null)
{
//Sistem preporuke
listaMojihClanaka = temp.GetPreporukaClanaka(korisnik.id);
listaMojihPitanja = temp.GetPreporukaPitanja(korisnik.id);
if (listaMojihClanaka != null || listaMojihPitanja != null)
{
//Pretraga Wiki preporuke term & call function
string term = "Knowledge management";
string func = "searchWithClick('" + term + "');";
ClientScript.RegisterStartupScript(this.GetType(), term, func, true);
dl_Clanci.DataSource = listaMojihClanaka.Take(5);
dl_Clanci.DataBind();
dl_Pitanja.DataSource = listaMojihPitanja.Take(5);
dl_Pitanja.DataBind();
}
else
{
//Pretraga Wiki preporuke term & call function
string term = "Knowledge management";
string func = "searchWithClick('" + term + "');";
ClientScript.RegisterStartupScript(this.GetType(), term, func, true);
listaMojihClanaka = temp.getClanciByDate();
listaMojihPitanja = temp.getPitanjaByDate();
//.........这里部分代码省略.........