public OfferDetailsViewModel(TabberViewModel tab, JobOffer offer)
 {
     this.DisplayName = " | #" + offer.OfferID;
     this.tabvm = tab;
     this.CurrentJobOffer = offer;
     this.DisplayOffer(offer);
 }
        public SendMessageViewModel(TabberViewModel _tabm, JobOffer jo)
        {
            this.tabm = _tabm;
            this.currentOffer = jo;
            this.DisplayName = " | #" + this.currentOffer.OfferID;

            if (this.dbRepo == null)
                this.dbRepo = new BombaJobRepository();
        }
Example #3
0
 public void AddJobOffer(JobOffer ent)
 {
     using (ISession session = NHibernateHelper.OpenSession())
     {
         JobOffer t = this.GetJobOfferById(ent.OfferID);
         if (t != null)
         {
             ent.ID = t.ID;
             this.UpdateEntity(ent);
         }
         else
             this.AddEntity(ent);
     }
 }
 private void DisplayOffer(JobOffer jo)
 {
     this.CurrentJobOffer = jo;
     if (jo.HumanYn)
     {
         this.OfferPositiv = Properties.Resources.offer_Human_Positiv;
         this.OfferNegativ = Properties.Resources.offer_Human_Negativ;
     }
     else
     {
         this.OfferPositiv = Properties.Resources.offer_Company_Positiv;
         this.OfferNegativ = Properties.Resources.offer_Company_Negativ;
     }
 }
 public void OffersList_Menu_ShareTwitter(JobOffer jobOffer)
 {
     Caliburn.Micro.Execute.OnUIThread(() => IoC.Get<IWindowManager>().ShowTwitterLogin(jobOffer));
 }
 public void OffersList_Menu_Message(JobOffer jobOffer)
 {
     if (this.tabm != null)
         this.tabm.OffersList_Menu_Message(jobOffer);
 }
 public void OffersList_Menu_Mark(JobOffer jobOffer)
 {
     IBombaJobRepository dbRepo = new BombaJobRepository();
     dbRepo.MarkAsRead(jobOffer);
     this.SearchOffers();
 }
 public void OffersList_Menu_View(JobOffer jobOffer)
 {
     if (this.tabm != null)
         this.tabm.OffersList_Menu_View(jobOffer);
 }
Example #9
0
 public void UpdateJobOffer(JobOffer ent)
 {
     this.UpdateEntity(ent);
 }
Example #10
0
 public void RemoveJobOffer(JobOffer ent)
 {
     this.DeleteEntity(ent);
 }
Example #11
0
 public void MarkAsRead(JobOffer ent)
 {
     ent.ReadYn = true;
     this.UpdateJobOffer(ent);
 }
 public TwitterLoginViewModel(JobOffer jobOffer)
 {
     this.currentOffer = jobOffer;
     this.DisplayName = Properties.Resources.appName;
     this.wbTwitter = new WebBrowser();
 }
Example #13
0
 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();
 }