public void SaveToJobTracking(DTOJobTracking jobTracking)
 {
     using (var Entities = new SampleDBEntities())
     {
         var jobTrackingEntity = jobTracking.ToEntity();
         Entities.JobTrackings.Add(jobTrackingEntity);
         Entities.SaveChanges();
     }
 }
        public static JobTracking ToEntity(this DTOJobTracking dtoJobTracking)
        {
            JobTracking entityJobTracking = new JobTracking()
            {
                JobNumber = dtoJobTracking.JobNumber,
                status    = dtoJobTracking.status,
                Path      = dtoJobTracking.Path
            };

            return(entityJobTracking);
        }
Exemple #3
0
        private void InsertIntoJobTracking(DTOJob job)
        {
            DTOJobTracking jobTrack = new DTOJobTracking()
            {
                JobNumber = job.JobNumber,
                status    = job.status,
                Path      = job.Path
            };

            try
            {
                objBL.AddJobTracking(jobTrack);
            }
            catch (Exception ex)
            {
                Log.LogMessage("Add Job Tracking Failed");
                Log.LogMessage(ex.Message);
            }
        }
Exemple #4
0
 public void AddJobTracking(DTOJobTracking jobtrack)
 {
     objDal.SaveToJobTracking(jobtrack);
 }