Example #1
0
 public int AddForeignAgencyJob(ForeignAgencyJob agencyjob)
 {
     agencyjob.IsActive = true;
     _context.ForeignAgencyJobs.Add(agencyjob);
     _context.SaveChanges();
     return(agencyjob.Id);
 }
Example #2
0
        public bool RemoveForeignAgencyJob(int Id)
        {
            ForeignAgencyJob agencyjob = GetForeignAgencyJobById(Id);

            if (agencyjob == null)
            {
                return(false);
            }
            _context.Remove(agencyjob);
            _context.SaveChanges();
            return(true);
        }
Example #3
0
        public bool UpdateForeignAgencyJob(int Id, ForeignAgencyJob agencyjob)
        {
            ForeignAgencyJob existagencyjob = GetForeignAgencyJobById(Id);

            if (existagencyjob == null)
            {
                return(false);
            }
            existagencyjob.NationalityId = agencyjob.NationalityId;
            existagencyjob.IsActive      = agencyjob.IsActive;
            existagencyjob.JobTypeId     = agencyjob.JobTypeId;
            existagencyjob.Price         = agencyjob.Price;


            _context.Update(existagencyjob);
            _context.SaveChanges();
            return(true);
        }