protected internal EvidencesVM(Action Loaded) { this.Loaded = Loaded; SelectedPatient = GlobalVM.StockLayout.headerContent.Content as SelectedPatient; EvidencesM = new EvidencesM(); EvidencesM.PatientId = (GlobalVM.StockLayout.headerContent.Content as SelectedPatient).SelectedPatientVM.SelectedPatientM.Id; Loading = new BackgroundWorker(); Loading.DoWork += new DoWorkEventHandler(LoadingModel); Loading.RunWorkerCompleted += new RunWorkerCompletedEventHandler(LoadingModelComplete); Loading.RunWorkerAsync(); }
private void ExecuteComplete(object sender, RunWorkerCompletedEventArgs e) { if (workingConn) { EvidencesM.Erased.Clear(); foreach (EvidencesM.Evidence row in EvidencesM.Evidences) { row.AcceptChanges(); } EvidencesM.AcceptChanges(); dialog = new Dialog(false, "Módosítások mentése", async() => await Utilities.Loading.Hide()); dialog.content = new TextBlock("A módosítások mentése sikeresen megtörtént"); dialog.Start(); } else { ConnectionMessage(); } }