Esempio n. 1
0
        public override void OnWizardNext(object sender, WizardPageEventArgs e)
        {
            if (!IsValid())
            {
                e.Cancel = true;
                return;
            }
            else
            {
                ProgressDialog      dlgProgresss = new ProgressDialog();
                BrokerServiceClient client       = GetWizard().Tag as BrokerServiceClient;

                UpdateMpps();
                dlgProgresss.Title       = "Update MPPS";
                dlgProgresss.Description = "Updating...";
                dlgProgresss.Action      = () =>
                {
                    client.UpdateMPPS(MainForm.Mpps.MPPSSOPInstanceUID, MainForm.Mpps);
                };

                if (dlgProgresss.ShowDialog(this) == DialogResult.Cancel)
                {
                    if (dlgProgresss.Exception != null)
                    {
                        e.Cancel = true;
                        Messager.ShowError(this, dlgProgresss.Exception);
                    }
                }

                dlgProgresss.Title       = "Update Patient";
                dlgProgresss.Description = "Updating...";
                dlgProgresss.Action      = () =>
                {
                    client.UpdatePatient(MainForm.Mpps.Patient.PatientID, MainForm.Mpps.Patient.IssuerOfPatientID, MainForm.Mpps.Patient);
                };

                if (dlgProgresss.ShowDialog(this) == DialogResult.Cancel)
                {
                    if (dlgProgresss.Exception != null)
                    {
                        e.Cancel = true;
                        Messager.ShowError(this, dlgProgresss.Exception);
                    }
                }
            }
            base.OnWizardNext(sender, e);
        }