protected virtual void OnSearch(SearchHL7MFNEventArgs e)
 {
     if (Search != null)
     {
         // Invokes the delegates.
         Search(this, e);
     }
 }
        private void buttonSearch_Click(object sender, System.EventArgs e)
        {
            ComparisonFilter messageTimeStampComparisonFilter = ComparisonFilter.None;
            DateTime messageTimeStamp = DateTime.Now;
            string[] arString = null;
            decimal[] arDecimal = null;
            IList<string> searchDals = new List<string>();

            foreach (ListViewItem item in listViewDals.CheckedItems)
                searchDals.Add(item.Text);

            if (this.checkBoxMessageTimeStamp.Checked)
            {
                messageTimeStampComparisonFilter = StringToComparisonFilter((string)this.comboBoxMessageTimeStamp.Text);
                messageTimeStamp = this.dateTimePickerMessageTimeStamp.Value;
            }
            if (this.checkBoxDoctorNumbers.Checked)
            {
                arString = this.textBoxDoctorNumbers.Text.Split(',');
                arDecimal = new decimal[arString.Length];
                try
                {
                    for (int i = 0; i < arString.Length; i++)
                        arDecimal[i] = Decimal.Parse(arString[i].Trim());
                }
                catch(FormatException)
                {
                    errorProvider.SetError(this.textBoxDoctorNumbers, "The DoctorNumber(s) must be numeric!");
                    return;
                }
            }

            //invoke event
            SearchHL7MFNEventArgs eventArgs = new SearchHL7MFNEventArgs(
                messageTimeStampComparisonFilter,
                messageTimeStamp,
                arDecimal,
                searchDals,
                cboBiztalkSendPorts.SelectedItem as string,
                chkShowOnlyLastBiztalkHL7s.Checked);
            OnSearch(eventArgs);
        }
Esempio n. 3
0
 void m_searchHL7MFNWindow_Search(object sender, SearchHL7MFNEventArgs e)
 {
     //FetchData(e);
 }