예제 #1
0
        private async Task <SqlDataReader> GetPageSearchByService(SqlIOAsync sqlIO, SearchManager searcher)
        {
            SqlDataReader dataReader = null;
            //initialize parameters for general query
            string sQry = GetSearchByServiceQry(searcher.SearchResult);

            if (sQry != string.Empty && sQry != null)
            {
                SqlParameter[] oPrams = GetPageSearchByServiceParams(searcher, sqlIO);
                dataReader = await sqlIO.RunProcAsync(sQry, oPrams);

                if (dataReader != null)
                {
                    searcher.RowCount = dataReader.RecordsAffected;
                }
            }
            return(dataReader);
        }
예제 #2
0
        private async Task <SqlDataReader> GetPageSearch(SqlIOAsync sqlIO, SearchManager searcher)
        {
            SqlDataReader dataReader = null;
            //initialize parameters for general query
            //returns Web.ViewDataHelper records at a time
            bool   bIsPageSearch = true;
            string sQry          = GetQry(searcher.SearchResult, bIsPageSearch);

            if (sQry != string.Empty && sQry != null)
            {
                SqlParameter[] oPrams = GetPageSearchParams(searcher, sqlIO);
                dataReader = await sqlIO.RunProcAsync(sQry, oPrams);

                if (dataReader != null)
                {
                    searcher.RowCount = dataReader.RecordsAffected;
                }
            }
            return(dataReader);
        }
예제 #3
0
        private async Task <SqlDataReader> GetAdminPageSearch(SqlIOAsync sqlIO, SearchManager searcher)
        {
            SqlDataReader dataReader = null;
            //initialize parameters for general query
            //uint iIsForward = 1;
            //if (searcher.IsForward == "0") iIsForward = 0;
            //returns pkid, name record list (children of the parent displayed at top of list)
            string sQry          = string.Empty;
            bool   bIsPageSearch = true;

            sQry = GetQry(searcher.SearchResult, bIsPageSearch);
            if (sQry != string.Empty && sQry != null)
            {
                SqlParameter[] oPrams = GetPageSearchParams(searcher, sqlIO);
                dataReader = await sqlIO.RunProcAsync(sQry, oPrams);

                if (dataReader != null)
                {
                    searcher.RowCount = dataReader.RecordsAffected;
                }
            }
            return(dataReader);
        }