Esempio n. 1
0
        private void GetPatientInformation()
        {
            ProgressDialog      dlgProgresss = new ProgressDialog();
            BrokerServiceClient client       = GetWizard().Tag as BrokerServiceClient;
            string pid  = comboBoxPatientId.Text;
            string ipid = textBoxIssuerOfPatientId.Text;

            dlgProgresss.Title       = "Querying";
            dlgProgresss.Description = "Getting patient information";
            dlgProgresss.Action      = () =>
            {
                _Patient = client.FindPatient(pid, ipid);
            };

            _Update                    = false;
            _OriginalPatientId         = string.Empty;
            _OriginalIssuerOfPatientId = string.Empty;
            if (dlgProgresss.ShowDialog(this) == DialogResult.OK)
            {
                if (_Patient != null)
                {
                    _Update = true;
                    UpdateUI();
                    _OriginalPatientId         = _Patient.PatientID;
                    _OriginalIssuerOfPatientId = _Patient.IssuerOfPatientID;
                    errorProvider.Clear();
                }
                else
                {
                    Messager.ShowError(this, "Patient not found.");
                }
            }
            else
            {
                if (dlgProgresss.Exception != null)
                {
                    Messager.ShowError(this, dlgProgresss.Exception);
                }
            }
        }