Esempio n. 1
0
        // to do - why is this firing twice?
        protected void odsFoundJobs_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
        {
            ClientControlPanel ccp = null;

            if (this.PreviousPage != null)
            {
                ccp = (ClientControlPanel)this.PreviousPage.FindControl("ccp1");
                ClientControlPanel newCcp = (ClientControlPanel)this.FindControl("ccp1");
                newCcp.SearchBox.Text = ccp.SearchBox.Text;
            }
            else
            {
                ccp = (ClientControlPanel)this.FindControl("ccp1");
            }

            TextBox searchBox   = ccp.SearchBox;
            string  searchTerms = searchBox.Text.Trim();

            searchList = searchTerms.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList();

            // remove stop words
            searchList = AdminUtils.RemoveStopWords(searchList).ToList();

            e.InputParameters.Add("client", curClient);
            e.InputParameters.Add("searchTerms", searchList);
            e.InputParameters.Add("isAdmin", isAdmin);
        }