Exemple #1
0
 private async void Start()
 {
     NewExaminationM                 = new NewExaminationM();
     NewExaminationM.PatientId       = (GlobalVM.StockLayout.headerContent.Content as SelectedPatient).SelectedPatientVM.Id();
     NewExaminationM.ExaminationCode = await new Codes().Generate((int)GlobalVM.GlobalM.UserID, NewExaminationM.PatientId);
     NewExaminationM.ExaminationDate = DateTime.Now;
     Loading                     = new BackgroundWorker();
     Loading.DoWork             += new DoWorkEventHandler(LoadingModel);
     Loading.RunWorkerCompleted += new RunWorkerCompletedEventHandler(LoadingModelComplete);
     Loading.RunWorkerAsync();
 }
Exemple #2
0
 private async void LoadingModelComplete(object sender, RunWorkerCompletedEventArgs e)
 {
     if (workingConn)
     {
         foreach (object row in NewExaminationM.ExaminationList)
         {
             (row as DocumentControlM.ListElement).AcceptChanges();
         }
         NewExaminationM.AcceptChanges();
     }
     else
     {
         ConnectionMessage();
     }
     await Utilities.Loading.Hide();
 }