示例#1
0
        private async void viewAppointment(object sender, ItemClickEventArgs e)
        {
            var appnt  = e.ClickedItem as Appointment;
            var dialog = new AppointmentDetailedDialog()
            {
                AppointmentId   = appnt.AppointmentId,
                AppointmentDate = (DateTimeOffset)appnt?.Date,
                AppointmentTime = appnt.Date.TimeOfDay,
                PatientId       = appnt.Patient.Id.ToString(),
                PatientName     = appnt.Patient.FullName,
                DoctorId        = appnt.Doctor.DoctorId.ToString(),
                DoctorName      = appnt.Doctor.FullName,
                Description     = appnt.Description,
                User            = this.User
            };
            var result = await dialog.ShowAsync();

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

                    this.ring.IsActive = false;
                }

                break;
            }
        }
 private async void viewAppointment(object sender, ItemClickEventArgs e)
 {
     var appnt  = e.ClickedItem as Appointment;
     var dialog = new AppointmentDetailedDialog()
     {
         AppointmentId   = appnt.AppointmentId,
         AppointmentDate = (DateTimeOffset)appnt?.Date,
         AppointmentTime = appnt.Date.TimeOfDay,
         PatientId       = appnt.Patient.Id.ToString(),
         PatientName     = appnt.Patient.FullName,
         DoctorId        = appnt.Doctor.DoctorId.ToString(),
         DoctorName      = appnt.Doctor.FullName,
         Description     = appnt.Description,
         User            = this.User
     };
     var result = await dialog.ShowAsync();
 }