Ejemplo n.º 1
0
 public void SaveToJobTracking(DTOJobTracking jobTracking)
 {
     using (var Entities = new SampleDBEntities())
     {
         var jobTrackingEntity = jobTracking.ToEntity();
         Entities.JobTrackings.Add(jobTrackingEntity);
         Entities.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 public void AddJob(DTOJob job)
 {
     using (SampleDBEntities Entities = new SampleDBEntities())
     {
         var jobEntity = job.ToEntity();
         Entities.Jobs.Add(jobEntity);
         Entities.SaveChanges();
     }
 }
Ejemplo n.º 3
0
 public void SaveToJobTracking(DTOJobTracking jobTracking)
 {
     using (var Entities = new SampleDBEntities())
     {
         var jobTrackingEntity = jobTracking.ToEntity();
         Entities.JobTrackings.Add(jobTrackingEntity);
         Entities.SaveChanges();
     }
 }
Ejemplo n.º 4
0
 public void AddJob(DTOJob job)
 {
     using (SampleDBEntities Entities = new SampleDBEntities())
     {
         var jobEntity = job.ToEntity();
         Entities.Jobs.Add(jobEntity);
         Entities.SaveChanges();
     }
 }
Ejemplo n.º 5
0
 public void UpdateJob(DTOJob job)
 {
     using(SampleDBEntities Entities = new SampleDBEntities())
        {
        var result = Entities.Jobs.FirstOrDefault(x => x.JobNumber == job.JobNumber);
        if (result != null)
        {
            result.status = job.status;
        }
        Entities.SaveChanges();
        }
 }
Ejemplo n.º 6
0
 public void UpdateJob(DTOJob job)
 {
     using (SampleDBEntities Entities = new SampleDBEntities())
     {
         var result = Entities.Jobs.FirstOrDefault(x => x.JobNumber == job.JobNumber);
         if (result != null)
         {
             result.status = job.status;
         }
         Entities.SaveChanges();
     }
 }