Beispiel #1
0
        private void doSearch()
        {
            this.Cursor = Cursors.WaitCursor;

            using (CSpatialSubs oSpatialSubs = new CSpatialSubs())
            {
                // check if taxlots is in the data frame
                if (!oSpatialSubs.doesMapLayerExist(SConst.Taxlots, this.App))
                {
                    //CMedToolsSubs.addFeatureLayerToMap(m_pApp, CConst.Taxlots, false);
                    oSpatialSubs.addSingleLayerToMap(m_pApp, SConst.LayerLocation, SConst.TaxlotLayerName);
                }
            }

            string sWhere = "";

            switch (m_iSearchType)
            {
            case 0:     //Int32.Parse(SearchType.OWNER):
                sWhere = "FEEOWNER LIKE '%" + txtOwner.Text.Replace(",", " ") + "%'";
                break;

            //case 1: //Int32.Parse(SearchType.SITUS):
            //    sWhere = "SITEADD = '" + txtSitus.Text + "'";
            //    break;
            case 2:     //Int32.Parse(SearchType.MAPLOT):
                sWhere = "MAPLOT = '" + txtMaplot.Text + "'";
                break;

            case 3:     //Int32.Parse(SearchType.ACCOUNT):
                sWhere = "ACCOUNT = " + txtAccount.Text + "";
                break;

            case 4:     //Int32.Parse(SearchType.MAPNUMBER):
                sWhere = "MAPNUM = '" + txtMapnum.Text + "'";
                break;

            default:

                break;
            }

            if (sWhere.Length > 0)
            {
                getResults(sWhere);
            }

            this.Cursor = Cursors.Default;
        }