示例#1
0
 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);
        }
示例#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);
            }
        }
示例#4
0
 public void AddJobTracking(DTOJobTracking jobtrack)
 {
     objDal.SaveToJobTracking(jobtrack);
 }