示例#1
0
        private void menuItemSearchPatientId_Click(object sender, System.EventArgs e)
        {
            decimal patientId = decimal.Zero;
            try
            {
                patientId = Convert.ToDecimal(this.richTextBox.SelectedText);
            }
            catch(Exception)
            {
                MessageBox.Show("The patient id must be numeric!", "No valid patient id!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }

            //invoke event
            PatientIdEventArgs eventArgs = new PatientIdEventArgs(patientId);
            OnSearchPatientId(eventArgs);
        }
示例#2
0
 protected virtual void OnSearchPatientId(PatientIdEventArgs e)
 {
     if (SearchPatientId != null)
     {
         // Invokes the delegates.
         SearchPatientId(this, e);
     }
 }
示例#3
0
 protected virtual void OnImportPatient(PatientIdEventArgs e)
 {
     if (ImportPatient != null)
         ImportPatient(this, e);
 }
示例#4
0
 protected virtual void OnSearchPatientId(PatientIdEventArgs e)
 {
     if (SearchPatientId != null)
         SearchPatientId(this, e);
 }
示例#5
0
 void SearchPatientId(object sender, PatientIdEventArgs e)
 {
     this.m_searchWindow.PatientId = e.PatientId;
     this.m_searchWindow.Show(this.dockPanel);
     this.m_searchWindow.DoSearch();
 }