Example #1
0
 public bool UpdatateJobOffer(JobOffer model)
 {
     try
     {
         db.Entry(model).State = EntityState.Modified;
         db.SaveChanges();
         return(true);
     }
     catch
     {
         //WriteErrorLog("Nieudana aktualizacja ogłoszenia " + DateTime.Now);
         return(false);
     }
 }
Example #2
0
 public bool SaveJobOffer(JobOffer jobOffer)
 {
     try
     {
         db.JobOffers.Add(jobOffer);
         db.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         //WriteErrorLog("Nieudany zapis ogłoszenia do bazy danych " + DateTime.Now);
         return(false);
     }
 }
Example #3
0
        public bool RemoveRecruitmentById(long id)
        {
            try
            {
                JobOffer jo = GetJobOfferByOfferNumber(id);
                db.JobOffers.Remove(jo);

                Recruitment r = db.Recruitments.Find(id);

                db.Recruitments.Remove(r);
                db.SaveChanges();

                return(true);
            }
            catch (Exception e)
            {
                string s = e.StackTrace;
                //WriteErrorLog("Nieudany usunięcie ogłoszenia " + DateTime.Now);
                return(false);
            }
        }