コード例 #1
0
        private void DoPlantSearch(string searchString)
        {
            bool activeOnly  = false;
            bool unAssocOnly = false;

            string[] args = searchString.Split('~');
            if (args.Length > 1 && args[1] == "A")
            {
                activeOnly = true;
            }
            if (args.Length > 1 && args[1] == "U")
            {
                unAssocOnly = true;
            }

            List <PLANT> plantList   = SQMModelMgr.SearchPlantList(entities, SessionManager.SessionContext.ActiveCompany().COMPANY_ID, args[0], activeOnly, unAssocOnly);
            GridView     gvPlantList = (GridView)hfBase.FindControl("gvPlantList");

            gvPlantList.DataSource = plantList;
            gvPlantList.DataBind();
            SetGridViewDisplay(gvPlantList, (Label)hfBase.FindControl("lblPlantListEmpty"), (System.Web.UI.HtmlControls.HtmlGenericControl)hfBase.FindControl("divGVScroll"), 0);
        }