//Method to save the data back to the model public void Save() { if (ServiceSubmission == null) { ServiceSubmission = new ServiceSheet(); } ServiceSubmission.AdditionalFaults = m_additionalFaults; ServiceSubmission.AddressLine1 = m_addressLine1; ServiceSubmission.AddressLine2 = m_addressLine2; ServiceSubmission.AppName = m_appName; ServiceSubmission.CanvasResponseId = m_canvasResponseId; ServiceSubmission.CncControl = m_cncControl; ServiceSubmission.Customer = m_customer; ServiceSubmission.CustomerContact = m_customerContact; ServiceSubmission.CustomerName = m_customerName; ServiceSubmission.CustomerOrderNo = m_customerOrderNo; ServiceSubmission.CustomerPhoneNo = m_customerPhoneNo; ServiceSubmission.CustomerSignatureUrl = m_customerSignatureUrl; ServiceSubmission.DtDevice = m_dtDevice; //ServiceSubmission.DtEndSubmission = m_dtEndSubmission; ServiceSubmission.DtJobStart = m_dtJobStart; ServiceSubmission.DtResponse = m_dtResponse; ServiceSubmission.DtSigned = m_dtSigned; //ServiceSubmission.DtStartSubmission = m_dtStartSubmission; ServiceSubmission.FinalJobReport = m_finalJobReport; ServiceSubmission.FollowUpPartsRequired = m_followUpPartsRequired; ServiceSubmission.Image1Url = m_image1Url; ServiceSubmission.Image2Url = m_image2Url; ServiceSubmission.Image3Url = m_image3Url; ServiceSubmission.Image4Url = m_image4Url; ServiceSubmission.Image5Url = m_image5Url; ServiceSubmission.JobDescription = m_jobDescription; ServiceSubmission.JobStatus = m_jobStatus; ServiceSubmission.JobTotalMileage = m_jobTotalMileage; ServiceSubmission.JobTotalTimeOnsite = m_jobTotalTimeOnsite; ServiceSubmission.JobTotalTravelTime = m_jobTotalTravelTime; ServiceSubmission.MachineMakeModel = m_machineMakeModel; ServiceSubmission.MachineSerial = m_machineSerial; ServiceSubmission.MttEngSignatureUrl = m_mttEngSignatureUrl; ServiceSubmission.MttJobNumber = m_mttJobNumber; ServiceSubmission.Postcode = m_postcode; ServiceSubmission.QuoteRequired = m_quoteRequired; ServiceSubmission.SubmissionFormName = m_submissionFormName; ServiceSubmission.SubmissionFormVersion = m_submissionFormVersion; ServiceSubmission.SubmissionNumber = m_submissionNumber; ServiceSubmission.TotalBarrierPayments = m_totalBarrierPayments; ServiceSubmission.TotalDailyAllowances = m_totalDailyAllowances; ServiceSubmission.TotalOvernightAllowances = m_totalOvernightAllowances; ServiceSubmission.TownCity = m_townCity; ServiceSubmission.UserFirstName = m_userFirstName; ServiceSubmission.Username = m_username; ServiceSubmission.UserSurname = m_userSurname; //Need to call the save on the service days foreach (ServiceDayViewModel sd in AllServiceDays.AllServiceDayVMs) { sd.Save(); } EditMode = false; }
public ServiceSheetViewModel() { ServiceSubmission = new ServiceSheet(); }