示例#1
0
        private void bthSearch_Click(object sender, RoutedEventArgs e)
        {
            int    pstateid         = 0;
            string pregionids       = string.Empty;
            string pbrandids        = string.Empty;
            string psystemid        = string.Empty;
            string attachmenttypeid = string.Empty;
            string selectedhomes    = string.Empty;

            if (cmbState.SelectedValue != null)
            {
                pstateid = int.Parse(cmbState.SelectedValue.ToString());
            }
            else
            {
                pstateid = loginstateid;
            }
            if (cmbRegion.SelectedItems != null)
            {
                pregionids = cr.getIDsSelected(cmbRegion.SelectedItems);
            }
            if (cmbBrand.SelectedItems != null)
            {
                pbrandids = cr.getIDsSelected(cmbBrand.SelectedItems);
            }
            if (cmbSystemDocumentType.SelectedItems != null)
            {
                psystemid = cr.getIDsSelected(cmbSystemDocumentType.SelectedItems);
            }
            if (cmbAttachmentType.SelectedItem != null)
            {
                attachmenttypeid = cmbAttachmentType.SelectedValue.ToString();
            }
            if (cmbHome.SelectedItems != null)
            {
                selectedhomes = cr.getTextSelectedAsString(cmbHome.SelectedItems);
            }
            cr.GetSpecificationByStateRegionsBrands(pstateid, pregionids, pbrandids, dteEffectiveDate.SelectedDate ?? DateTime.Now, psystemid, attachmenttypeid, selectedhomes);
        }