private void Start(bool imported, int ID) { ExaminationEditM = new ExaminationEditM(); ExaminationEditM.Imported = imported; ExaminationEditM.Id = ID; ExaminationEditM.PatientId = (GlobalVM.StockLayout.headerContent.Content as SelectedPatient).SelectedPatientVM.SelectedPatientM.Id; Loading = new BackgroundWorker(); Loading.DoWork += new DoWorkEventHandler(LoadingModel); Loading.RunWorkerCompleted += new RunWorkerCompletedEventHandler(LoadingModelComplete); }
private async void LoadingModelComplete(object sender, RunWorkerCompletedEventArgs e) { if (workingConn) { ExaminationEditM.AcceptChanges(); } else { ConnectionMessage(); } await Utilities.Loading.Hide(); }