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