private async void viewCheckup(object sender, ItemClickEventArgs e)
 {
     var checkup = e.ClickedItem as RoutineCheck;
     var dialog  = new CheckupDetailedView()
     {
         AppointmentID          = checkup.Appointment.AppointmentId,
         CheckupDate            = (DateTimeOffset)checkup.Date,
         CheckupTime            = checkup.Date.TimeOfDay,
         PatientId              = checkup.Patient.Id,
         PatientName            = checkup.Patient.FullName,
         NurseId                = checkup.Nurse.NurseId,
         NurserName             = checkup.Nurse.FullName,
         SystolicReading        = checkup.SystolicReading,
         DiastolicBloodPressure = checkup.DiastolicBloodPressure,
         Weight           = checkup.Weight,
         Temperature      = checkup.Temperature,
         InitialDiagnosis = checkup.InitialDiagnosis,
         User             = this.User
     };
     var result = await dialog.ShowAsync();
 }
Ejemplo n.º 2
0
        private async void viewCheckup(object sender, ItemClickEventArgs e)
        {
            var checkup = e.ClickedItem as RoutineCheck;
            var cvm     = new RoutineCheckupViewModel();
            var dialog  = new CheckupDetailedView()
            {
                AppointmentID          = checkup.Appointment.AppointmentId,
                CheckupDate            = (DateTimeOffset)checkup.Date,
                CheckupTime            = checkup.Date.TimeOfDay,
                PatientId              = checkup.Patient.Id,
                PatientName            = checkup.Patient.FullName,
                NurseId                = checkup.Nurse.NurseId,
                NurserName             = checkup.Nurse.FullName,
                SystolicReading        = checkup.SystolicReading,
                DiastolicBloodPressure = checkup.DiastolicBloodPressure,
                Weight           = checkup.Weight,
                Temperature      = checkup.Temperature,
                InitialDiagnosis = checkup.InitialDiagnosis,
                User             = this.User
            };
            var result = await dialog.ShowAsync();

            switch (result)
            {
            case ContentDialogResult.Secondary:
                if (dialog.ChangesMade)
                {
                    this.ring.IsActive = true;
                    await this.viewModel.LoadPatientCheckups(this.Patient);

                    var mess = new MessageDialog("Your changes have been stored");
                    this.ring.IsActive = false;
                    await mess.ShowAsync();
                }

                break;
            }
        }