本文整理汇总了C#中Data.EntityFramework.BLL.TriglavBL类的典型用法代码示例。如果您正苦于以下问题:C# TriglavBL类的具体用法?C# TriglavBL怎么用?C# TriglavBL使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TriglavBL类属于Data.EntityFramework.BLL命名空间,在下文中一共展示了TriglavBL类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
using (TriglavBL temp = new TriglavBL())
{
Directory directory = FSDirectory.Open(new DirectoryInfo("J:/Triglav_Web_App/Triglav/Web/Lucene/LuceneIndex"));
Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_29);
var writer = new IndexWriter(directory, analyzer, true, IndexWriter.MaxFieldLength.LIMITED);
List<Post> sviPostovi = temp.getAllPosts(1);
foreach (var post in sviPostovi)
{
var document = new Document();
document.Add(new Field("id", Convert.ToString(post.id), Field.Store.YES, Field.Index.NOT_ANALYZED));
document.Add(new Field("Naslov", post.Naslov, Field.Store.YES, Field.Index.ANALYZED));
document.Add(new Field("Sadrzaj", post.Sadrzaj, Field.Store.YES, Field.Index.ANALYZED));
document.Add(new Field("Sazetak", post.Sazetak, Field.Store.YES, Field.Index.ANALYZED));
document.Add(new Field("Tagovi", post.Tagovi, Field.Store.YES, Field.Index.ANALYZED));
document.Add(new Field("DatumKreiranja", Convert.ToString(post.DatumKreiranja), Field.Store.YES, Field.Index.ANALYZED));
document.Add(new Field("DatumZadnjeIzmjene", Convert.ToString(post.DatumZadnjeIzmjene), Field.Store.YES, Field.Index.ANALYZED));
document.Add(new Field("DatumZadnjeAktivnosti", Convert.ToString(post.DatumZadnjeAktivnosti), Field.Store.YES, Field.Index.ANALYZED));
document.Add(new Field("BrojOdgovora", Convert.ToString(post.BrojOdgovora), Field.Store.YES, Field.Index.ANALYZED));
document.Add(new Field("Likes", Convert.ToString(post.Likes), Field.Store.YES, Field.Index.ANALYZED));
document.Add(new Field("Unlikes", Convert.ToString(post.Unlikes), Field.Store.YES, Field.Index.ANALYZED));
document.Add(new Field("VlasnikId", Convert.ToString(post.VlasnikID), Field.Store.YES, Field.Index.ANALYZED));
document.Add(new Field("Unlikes", Convert.ToString(post.Unlikes), Field.Store.YES, Field.Index.ANALYZED));
writer.AddDocument(document);
}
writer.Optimize();
writer.Close();
}
}
开发者ID:fitba,项目名称:km-2013-projects-team-troglav,代码行数:34,代码来源:LuceneTestSearch.aspx.cs
示例2: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Button btn_PitanjeNovo = (Button)Master.FindControl("btn_NovoPitanje");
if (btn_PitanjeNovo != null)
using (TriglavBL temp = new TriglavBL())
{
if (Request.QueryString != null)
{
if (Request.QueryString["NazivClanka"] != null)
{
post = new Data.EntityFramework.DAL.Post();
txt_Naslov.Text = Request.QueryString["NazivClanka"];
}
else
{
post = new Data.EntityFramework.DAL.Post();
}
}
else
{
post = new Data.EntityFramework.DAL.Post();
}
}
LoadPitanje(post.id);
}
开发者ID:fitba,项目名称:km-2013-projects-team-troglav,代码行数:26,代码来源:QA_PitanjeNovo.aspx.cs
示例3: btn_Like_Click
protected void btn_Like_Click(object sender, ImageClickEventArgs e)
{
using (TriglavBL temp = new TriglavBL())
{
user_likes = temp.getUserLikes(korisnik.id, post.id);
if (user_likes == null)
{
user_likes = new Data.EntityFramework.DAL.User_Likes();
user_likes.PostId = post.id;
user_likes.UserId = korisnik.id;
user_likes.DaumRated = DateTime.Now;
user_likes.DatumLajkanja = DateTime.Now;
user_likes.isLiked = 1;
user_likes.Rate = 0;
temp.SaveUser_Likes(user_likes);
}
else
{
Int32 LikesBefore = temp.getVoteUserLikes(user_likes.UserId.Value, user_likes.PostId.Value);
user_likes.DatumLajkanja = DateTime.Now;
user_likes.isLiked = 1;
temp.UpdateUser_Likes(user_likes, LikesBefore);
}
}
LoadClanak(post.id);
}
开发者ID:elvis-kadic,项目名称:FIT_KMS,代码行数:27,代码来源:QA_Pitanje.aspx.cs
示例4: btn_TagoviPretraga_Click
protected void btn_TagoviPretraga_Click(object sender, EventArgs e)
{
if (txt_TagoviPretraga.Text != "")
{
using (TriglavBL temp = new TriglavBL())
{
List<Tag> listaTagova = new List<Tag>();
string[] tags = txt_TagoviPretraga.Text.Split(',');
Tag TAG;
foreach (var tagname in tags)
{
TAG = temp.getTagByName(tagname);
if (TAG != null)
{
listaTagova.Add(TAG);
}
}
if (listaTagova != null)
{
lbl_NaslovStranice.Text = "Rezultat pretrage tagova: " + txt_TagoviPretraga.Text;
rpt_Tagovi.DataSource = listaTagova;
rpt_Tagovi.DataBind();
}
}
}
}
开发者ID:fitba,项目名称:km-2013-projects-team-troglav,代码行数:26,代码来源:QA_Tagovi.aspx.cs
示例5: btn_SaveKorisnik_Click
protected void btn_SaveKorisnik_Click(object sender, EventArgs e)
{
if (ValidacijaKorisnika())
{
using (TriglavBL temp = new TriglavBL())
{
korisnik.Nadimak = txt_KorisnickoIme.Text;
korisnik.Lozinka = txt_Lozinka.Text;
korisnik.BrojGodina = Convert.ToInt32(txt_BrojGodina.Text);
korisnik.OMeni = txt_OMeni.Text;
korisnik.DatumKreiranja = DateTime.Now;
korisnik.SlikaURL = img_Foto.ImageUrl;
korisnik.Reputacija = 0;
korisnik.Pregleda = 0;
korisnik.Likes = 0;
korisnik.Unlikes = 0;
korisnik.BrojZlatnih = 0;
korisnik.BrojSrebrenih = 0;
korisnik.BrojBronzanih = 0;
korisnik.BedzID = 10;
korisnik.BedzNaziv = temp.getBedzByID(10).Naziv;
korisnik.BedzSlika = temp.getBedzByID(10).SlikaURL;
korisnik.BedzOpis = temp.getBedzByID(10).Opis;
temp.SaveKorisnik(korisnik);
ResetPoljaRegistracija();
PostaviKorisnikaUSesiju();
}
}
}
开发者ID:elvis-kadic,项目名称:FIT_KMS,代码行数:30,代码来源:RegistrationForm.aspx.cs
示例6: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
using (TriglavBL temp = new TriglavBL())
{
if (Request.QueryString != null)
{
if (Request.QueryString["PostID"] != null)
{
postId = Int32.Parse(Request.QueryString["PostID"]);
post = temp.getPostByID(postId);
}
else
{
Response.Redirect("/Public/Home.aspx");
}
}
dl_WikiPoveznice.DataSource = Data.Lucene.Pretraga.getClanciPretrage(post.Tagovi).Take(5);
dl_WikiPoveznice.DataBind();
dl_QAPoveznice.DataSource = Data.Lucene.Pretraga.getPitanjaPretrage(post.Tagovi).Take(5);
dl_QAPoveznice.DataBind();
}
btn_Clanak.BackColor = System.Drawing.Color.LightGray;
btn_Razgovor.BackColor = System.Drawing.Color.White;
btn_Citaj.BackColor = System.Drawing.Color.LightGray;
btn_VidiIzvornik.BackColor = System.Drawing.Color.LightGray;
btn_VidiIzmjene.BackColor = System.Drawing.Color.LightGray;
}
开发者ID:elvis-kadic,项目名称:FIT_KMS,代码行数:30,代码来源:ClanakRazgovor.aspx.cs
示例7: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Button btn_Bedzevi = (Button)Master.FindControl("btn_Bedzevi");
//btn_Bedzevi.BackColor = Color.LightGreen;
using (TriglavBL temp = new TriglavBL())
{
dl_bedzevi.DataSource = temp.getSviBedzeviBybrojKorisnika();
dl_bedzevi.DataBind();
}
}
开发者ID:fitba,项目名称:km-2013-projects-team-troglav,代码行数:10,代码来源:QA_Bedzevi.aspx.cs
示例8: GetDirectoryClanci
/// <summary>
/// Directory Članci
/// </summary>
/// <param name="postVrstaId"></param>
/// <returns></returns>
public static Directory GetDirectoryClanci()
{
using (TriglavBL temp = new TriglavBL())
{
Directory directoryClanci = FSDirectory.Open(new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory +"Clanci"));
Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_30);
var writer = new IndexWriter(directoryClanci, analyzer, true, IndexWriter.MaxFieldLength.LIMITED);
List<Post> sviPostovi = temp.getAllClanci();
foreach (var post in sviPostovi)
{
//Add & boost
var clanak = new Document();
clanak.Add(new Field("id", Convert.ToString(post.id), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS, Field.TermVector.NO));
clanak.Add(new Field("PostVrsta", Convert.ToString(post.PostVrsta), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
clanak.Add(new Field("Naslov", post.Naslov, Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS));
clanak.GetField("Naslov").Boost = (2.0F);
clanak.Add(new Field("Sadrzaj", post.Sadrzaj, Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS));
clanak.GetField("Sadrzaj").Boost = (1.2F);
if (post.Sazetak != null)
{
clanak.Add(new Field("Sazetak", post.Sazetak, Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS));
clanak.GetField("Sazetak").Boost = (1.5F);
}
clanak.Add(new Field("Tagovi", post.Tagovi, Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS));
clanak.GetField("Tagovi").Boost = (2.5F);
clanak.Add(new Field("VlasnikId", Convert.ToString(post.VlasnikID), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
clanak.Add(new Field("VlasnikNadimak", Convert.ToString(post.VlasnikNadimak), Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.WITH_POSITIONS_OFFSETS));
clanak.Add(new Field("DatumKreiranja", Convert.ToString(post.DatumKreiranja), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
clanak.Add(new Field("DatumZadnjeIzmjene", Convert.ToString(post.DatumZadnjeIzmjene), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
clanak.Add(new Field("DatumZadnjeAktivnosti", Convert.ToString(post.DatumZadnjeAktivnosti), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
clanak.Add(new Field("PrihvaceniOdgovori", Convert.ToString(post.PrihvaceniOdgovori), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
clanak.Add(new Field("BrojOdgovora", Convert.ToString(post.BrojOdgovora), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
clanak.Add(new Field("BrojKomentara", Convert.ToString(post.BrojKomentara), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
clanak.Add(new Field("BrojOmiljenih", Convert.ToString(post.BrojOmiljenih), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
clanak.Add(new Field("BrojPregleda", Convert.ToString(post.BrojPregleda), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
clanak.Add(new Field("BrojPoena", Convert.ToString(post.BrojPoena), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
clanak.Add(new Field("Likes", Convert.ToString(post.Likes), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
clanak.Add(new Field("Unlikes", Convert.ToString(post.Unlikes), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
clanak.Add(new Field("PromijenioID", Convert.ToString(post.PromijenioID), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
clanak.Add(new Field("RoditeljskiPostID", Convert.ToString(post.RoditeljskiPostID), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
clanak.Add(new Field("BrojRangiranja", Convert.ToString(post.BrojRangiranja), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
clanak.Add(new Field("PrihvacenaIzmjena", Convert.ToString(post.PrihvacenaIzmjena), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
clanak.Add(new Field("Broj_Razgovora", Convert.ToString(post.Broj_Razgovora), Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS));
writer.AddDocument(clanak);
}
writer.Optimize();
writer.Dispose();
return directoryClanci;
}
}
开发者ID:elvis-kadic,项目名称:FIT_KMS,代码行数:60,代码来源:Indexing.cs
示例9: btn_PoGlasovima_Click
protected void btn_PoGlasovima_Click(object sender, EventArgs e)
{
using (TriglavBL temp = new TriglavBL())
{
dl_Pitanja.DataSource = temp.getPitanjaByVotes();
dl_Pitanja.DataBind();
btn_MojiTagovi.BackColor = Color.LightGray;
btn_Najnovija.BackColor = Color.LightGray;
btn_PoGlasovima.BackColor = Color.LightGreen;
}
}
开发者ID:elvis-kadic,项目名称:FIT_KMS,代码行数:11,代码来源:QA_Neodgovoreni.aspx.cs
示例10: btn_Najnoviji_Click
protected void btn_Najnoviji_Click(object sender, EventArgs e)
{
//lbl_NaslovStranice.Text = "Najnoviji tagovi";
using (TriglavBL temp = new TriglavBL())
{
rpt_Tagovi.DataSource = temp.getPItanjaTagoviByDate();
rpt_Tagovi.DataBind();
}
btn_Popularni.BackColor = Color.LightGray; ;
btn_PoAbecedi.BackColor = Color.LightGray;
btn_Najnoviji.BackColor = Color.LightGreen;
}
开发者ID:elvis-kadic,项目名称:FIT_KMS,代码行数:12,代码来源:QA_Tagovi.aspx.cs
示例11: Btn_Odobri_Click
protected void Btn_Odobri_Click(object sender, EventArgs e)
{
using (TriglavBL temp = new TriglavBL())
{
post_odobreni.PrihvacenaIzmjena = 1;
temp.UpdatePost(post_odobreni);
post.PrihvaceniOdgovori++;
temp.UpdatePost(post);
Response.Redirect("/Public/Clanak.aspx?PostID=" + post.id);
}
}
开发者ID:elvis-kadic,项目名称:FIT_KMS,代码行数:12,代码来源:ClanakStareIzmjene.aspx.cs
示例12: btn_PoAbecedi_Click
protected void btn_PoAbecedi_Click(object sender, EventArgs e)
{
lbl_NaslovStranice.Text = "Tagovi po abecednom redu";
using (TriglavBL temp = new TriglavBL())
{
rpt_Tagovi.DataSource = temp.getPitanjaTagoviAbeceda();
rpt_Tagovi.DataBind();
}
btn_Popularni.BackColor = Color.LightGray;
btn_PoAbecedi.BackColor = Color.LightGreen;
btn_Najnoviji.BackColor = Color.LightGray;
}
开发者ID:fitba,项目名称:km-2013-projects-team-troglav,代码行数:12,代码来源:QA_Tagovi.aspx.cs
示例13: btn_PoReputaciji_Click
protected void btn_PoReputaciji_Click(object sender, EventArgs e)
{
lbl_NaslovStranice.Text = "Korisnici po reputaciji";
using (TriglavBL temp = new TriglavBL())
{
dl_Korisnici.DataSource = temp.getKorisniciByReputacija();
dl_Korisnici.DataBind();
btn_PoReputaciji.BackColor = Color.LightGreen;
btn_NoviKorisnici.BackColor = Color.LightGray;
btn_Moderatori.BackColor = Color.LightGray;
}
}
开发者ID:elvis-kadic,项目名称:FIT_KMS,代码行数:12,代码来源:QA_Korisnici.aspx.cs
示例14: btn_Posljednje_Click
protected void btn_Posljednje_Click(object sender, EventArgs e)
{
lbl_NaslovStranice.Text = "Najnovija pitanja";
using (TriglavBL temp = new TriglavBL())
{
dl_Pitanja.DataSource = temp.getPitanjaByDate();
dl_Pitanja.DataBind();
btn_Posljednje.BackColor = Color.White;
btn_Istaknuti.BackColor = Color.LightGray;
btn_Neodgovorena.BackColor = Color.LightGray;
btn_Korisnik.BackColor = Color.LightGray;
}
}
开发者ID:fitba,项目名称:km-2013-projects-team-troglav,代码行数:13,代码来源:QA_Pitanja.aspx.cs
示例15: dl_bedzevi_ItemDataBound
protected void dl_bedzevi_ItemDataBound(object sender, DataListItemEventArgs e)
{
int id = (int)DataBinder.Eval(e.Item.DataItem, "id");
using (TriglavBL temp = new TriglavBL())
{
Bedz b = temp.getBedzByID(id);
List<Data.EntityFramework.DAL.Korisnik> listaNositelja = temp.NositeljiBedzevaByBedzID(id);
Label lbl_BrojKorisnika = (Label)e.Item.FindControl("lbl_BrojKorisnika");
lbl_BrojKorisnika.Text = "Bedz posjeduje: " + listaNositelja.Count() +" korisnika";
}
}
开发者ID:fitba,项目名称:km-2013-projects-team-troglav,代码行数:13,代码来源:QA_Bedzevi.aspx.cs
示例16: btn_SaveClanak_Click
protected void btn_SaveClanak_Click(object sender, EventArgs e)
{
if (SaveValidation())
{
using (TriglavBL temp = new TriglavBL())
{
post.PostVrsta = 1;
post.PodKategorija = Convert.ToInt32(ddl_Podkategorija.SelectedValue);
post.Naslov = txt_Naslov.Text;
post.Sazetak = txt_Sazetak.Text;
post.Sadrzaj = txt_Sadrzaj.Text;
post.Tagovi = txt_Tagovi.Text;
post.BrojKomentara = 0;
post.BrojOdgovora = 0;
post.BrojOmiljenih = 0;
post.BrojPoena = 0;
post.BrojPregleda = 0;
post.BrojRangiranja = 0;
post.DatumKreiranja = DateTime.Now;
post.DatumZadnjeAktivnosti = DateTime.Now;
post.DatumZadnjeIzmjene = DateTime.Now;
post.Likes = 0;
post.Unlikes = 0;
post.PrihvacenaIzmjena = 0;
post.PrihvaceniOdgovori = 0;
post.SlikaURL = img_Foto.ImageUrl;
korisnik = (Data.EntityFramework.DAL.Korisnik)Session["LogiraniKorisnik"];
if (korisnik != null)
{
post.VlasnikID = korisnik.id;
post.VlasnikNadimak = korisnik.Nadimak;
}
else
{
Response.Write("<script>alert('Greška! Molimo vas da se logirate!');</script>");
//Response.Redirect("/Login.aspx");
return;
}
Response.Write("<script>alert(Vaš članak je uspješno sačuvan!');</script>");
temp.SavePost(post);
PoveziTagove();
Response.Redirect("/Public/Clanak.aspx?PostID=" + post.id);
}
}
else
{
return;
}
}
开发者ID:fitba,项目名称:km-2013-projects-team-troglav,代码行数:50,代码来源:ClanakNovi.aspx.cs
示例17: btn_Istaknuti_Click
protected void btn_Istaknuti_Click(object sender, EventArgs e)
{
lbl_NaslovStranice.Text = "Istaknuta pitanja";
using (TriglavBL temp = new TriglavBL())
{
dl_Pitanja.DataSource = temp.getPitanjaByVotes();
dl_Pitanja.DataBind();
btn_Posljednje.BackColor = Color.LightGray;
btn_Istaknuti.BackColor = Color.White;
btn_Hot.BackColor = Color.LightGray;
btn_OveSedmice.BackColor = Color.LightGray;
//btn_OvogMjeseca.BackColor = Color.LightGray;
}
}
开发者ID:elvis-kadic,项目名称:FIT_KMS,代码行数:14,代码来源:QA_Home.aspx.cs
示例18: Napunipolja
private void Napunipolja()
{
using (TriglavBL temp = new TriglavBL())
{
img_Bedz.ImageUrl = bedz.SlikaURL;
lbl_Naziv.Text = bedz.Naziv;
lbl_Opis.Text = bedz.Opis;
List<Data.EntityFramework.DAL.Korisnik> listaNositelja = temp.NositeljiBedzevaByBedzID(bedz.id);
lbl_BrojKorisnika.Text = "Bedz posjeduje: " + listaNositelja.Count() + " korisnika";
dl_Korisnici.DataSource = listaNositelja;
dl_Korisnici.DataBind();
}
}
开发者ID:fitba,项目名称:km-2013-projects-team-troglav,代码行数:14,代码来源:QA_Bedz.aspx.cs
示例19: btn_OveSedmice_Click
protected void btn_OveSedmice_Click(object sender, EventArgs e)
{
using (TriglavBL temp = new TriglavBL())
{
lbl_NaslovStranice.Text = "Top članci ove sedmice";
dl_Clanci.DataSource = temp.getClanciBySedmica().Take(5);
dl_Clanci.DataBind();
btn_Posljednje.BackColor = Color.LightGray;
btn_Istaknuti.BackColor = Color.LightGray;
btn_Hot.BackColor = Color.LightGray;
btn_OveSedmice.BackColor = Color.White;
btn_OvogMjeseca.BackColor = Color.LightGray;
}
}
开发者ID:fitba,项目名称:km-2013-projects-team-troglav,代码行数:14,代码来源:Home.aspx.cs
示例20: btn_OveSedmice_Click
protected void btn_OveSedmice_Click(object sender, EventArgs e)
{
lbl_NaslovStranice.Text = "Top pitanja ove sedmice";
using (TriglavBL temp = new TriglavBL())
{
Post p = temp.getPostByID(88);
dl_Pitanja.DataSource = temp.getPitanjaBySedmica();
dl_Pitanja.DataBind();
btn_Posljednje.BackColor = Color.LightGray;
btn_Istaknuti.BackColor = Color.LightGray;
btn_Hot.BackColor = Color.LightGray;
btn_OveSedmice.BackColor = Color.White;
btn_OvogMjeseca.BackColor = Color.LightGray;
}
}
开发者ID:fitba,项目名称:km-2013-projects-team-troglav,代码行数:15,代码来源:QA_Home.aspx.cs
注:本文中的Data.EntityFramework.BLL.TriglavBL类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论