public void JobRecordEmailFilling()
        {
            _jobModel = new JobModel();
            CS_Job job = _jobModel.GetJobById(_view.JobID.Value);

            this._jobModel = new JobModel()
                    {
                        NewJob = job,
                        NewCustomer = job.CS_CustomerInfo,
                        NewJobDivision = job.CS_JobDivision.ToList(),
                        NewPresetInfo = job.CS_PresetInfo,
                        NewLostJobInfo = job.CS_LostJobInfo,
                        NewSpecialPricing = job.CS_SpecialPricing,
                        NewJobInfo = job.CS_JobInfo,
                        NewLocationInfo = job.CS_LocationInfo,
                        NewJobDescription = job.CS_JobDescription,
                        NewScopeOfWork = job.CS_ScopeOfWork.ToList(),
                        NewPhotoReport = job.CS_JobPhotoReport.ToList(),
                        NewRequestedEquipment = _jobModel.GetEquipmentRequestedVOByJob(_view.JobID.Value),
                        JobStatusID = job.CS_JobInfo.LastJobStatus.ID,
                        NewJobStatusHistory = job.CS_JobInfo.CS_Job_JobStatus.FirstOrDefault(e => e.Active)
                    };

            string subject = _callCriteriaModel.GenerateSubjectForCallCriteria(
             job,
             job.CS_JobInfo,
             job.CS_CustomerInfo,
             job.CS_LocationInfo,
             "Initial Advise");

            IList<EmailVO> receipts = _callCriteriaModel.ListValidReceiptsByCallLog(job.CS_CallLog.FirstOrDefault(e => e.CallTypeID == (int)Globals.CallEntry.CallType.InitialLog).ID, job.ID);

            _view.EmailVOReceipts = receipts;
            _view.EmailSubject = subject;
            _view.EmailBody = _jobModel.BodyEmailJobRecordTable();
        }
 public void LoadJobEntity()
 {
     try
     {
         if (_view.JobId.HasValue)
         {
             _model = new JobModel();
             _view.JobLoad = _model.GetJobData(_view.JobId.Value);
             _view.RequestedEquipmentTypeList = _model.GetEquipmentRequestedVOByJob(_view.JobId.Value);
         }
     }
     catch (Exception ex)
     {
         Logger.Write(string.Format("There was an error while trying to load the Job Record!\n{0}\n{1}", ex.InnerException, ex.StackTrace));
         _view.DisplayMessage("There was an error while trying to load the Job Record.", false);
     }
 }