public void OffersList_Menu_Mark(JobOffer jobOffer) { IBombaJobRepository dbRepo = new BombaJobRepository(); dbRepo.MarkAsRead(jobOffer); this.SearchOffers(); }
public int GetJobOffersCount() { IBombaJobRepository repo = new BombaJobRepository(); return repo.GetJobOffersCount(); }
private void doJobOffers(string xmlContent) { if (this.currentOp == AppSettings.ServiceOp.ServiceOpJobs || this.currentOp == AppSettings.ServiceOp.ServiceOpSearch || this.currentOp == AppSettings.ServiceOp.ServiceOpNewestOffers) { IBombaJobRepository repo = new BombaJobRepository(); XDocument doc = XDocument.Parse(xmlContent); foreach (XElement job in doc.Descendants("job")) { var t = new JobOffer { OfferID = (int)job.Attribute("id"), CategoryID = (int)job.Attribute("cid"), HumanYn = (bool)job.Attribute("hm"), FreelanceYn = (bool)job.Attribute("fyn"), Title = (string)job.Element("jottl"), Email = (string)job.Element("joem"), CategoryTitle = (string)job.Element("jocat"), Positivism = (string)job.Element("jopos"), Negativism = (string)job.Element("joneg"), PublishDate = DateTime.ParseExact((string)job.Element("jodt"), AppSettings.DateTimeFormat, null) }; repo.AddJobOffer(t); } this.SynchronizationComplete(); } else this.SynchronizationComplete(); }
private void doTexts(string xmlContent) { IBombaJobRepository repo = new BombaJobRepository(); XDocument doc = XDocument.Parse(xmlContent); foreach (XElement txt in doc.Descendants("tctxt")) { var t = new Text { TextID = (int)txt.Attribute("id"), Title = (string)txt.Element("tctitle"), Content = (string)txt.Element("tccontent") }; repo.AddText(t); } this.syncCategories(); }
private void doCategories(string xmlContent) { IBombaJobRepository repo = new BombaJobRepository(); XDocument doc = XDocument.Parse(xmlContent); foreach (XElement cat in doc.Descendants("cat")) { var t = new Category { CategoryID = (int)cat.Attribute("id"), Title = (string)cat.Element("cttl"), OffersCount = (int)cat.Attribute("cnt") }; repo.AddCategory(t); } this.syncNewestOffers(); }