Beispiel #1
0
 public int GetJobNumber()
 {
     using (var Entites = new SampleDBEntities())
     {
          int jobnumber = Convert.ToInt32(Entites.spGetUniqueId().FirstOrDefault());
          return jobnumber;
     }
 }
Beispiel #2
0
 public int GetJobNumber()
 {
     using (var Entites = new SampleDBEntities())
     {
         int jobnumber = Convert.ToInt32(Entites.spGetUniqueId().FirstOrDefault());
         return(jobnumber);
     }
 }
Beispiel #3
0
 public void SaveToJobTracking(DTOJobTracking jobTracking)
 {
     using (var Entities = new SampleDBEntities())
     {
         var jobTrackingEntity = jobTracking.ToEntity();
         Entities.JobTrackings.Add(jobTrackingEntity);
         Entities.SaveChanges();
     }
 }
Beispiel #4
0
 public void AddJob(DTOJob job)
 {
     using (SampleDBEntities Entities = new SampleDBEntities())
     {
         var jobEntity = job.ToEntity();
         Entities.Jobs.Add(jobEntity);
         Entities.SaveChanges();
     }
 }
Beispiel #5
0
 public void SaveToJobTracking(DTOJobTracking jobTracking)
 {
     using (var Entities = new SampleDBEntities())
     {
         var jobTrackingEntity = jobTracking.ToEntity();
         Entities.JobTrackings.Add(jobTrackingEntity);
         Entities.SaveChanges();
     }
 }
Beispiel #6
0
 public void AddJob(DTOJob job)
 {
     using (SampleDBEntities Entities = new SampleDBEntities())
     {
         var jobEntity = job.ToEntity();
         Entities.Jobs.Add(jobEntity);
         Entities.SaveChanges();
     }
 }
Beispiel #7
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();
        }
 }
Beispiel #8
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();
     }
 }