Пример #1
0
        /// <summary>
        /// 查询本地数据(超级搜索)
        /// </summary>
        /// <param name="QueryText">查询文本</param>
        public List <Data.SearchResults> QueryLocalData(string QueryText, out List <Data.SearchTypes> ListTypes)
        {
            using (SQLite.SQLiteConnection conn = new SQLite.SQLiteConnection(iDB.DbFile))
            {
                List <Data.SearchResults> ResultList = new List <SearchResults>();
                ListTypes = new List <SearchTypes>();
                Data.SearchTypes stAll = new SearchTypes("All", "全部", 0);
                ListTypes.Add(stAll);
                //搜索本地病人
                Data.SearchTypes stPatient = QueryLocalPatient(conn, QueryText, ref ResultList);
                stAll.ResultsCount += stPatient.ResultsCount;
                ListTypes.Add(stPatient);
                //搜索病人医嘱
                Data.SearchTypes stAdvice = QueryLocalPatientAdvice(conn, QueryText, ref ResultList);
                stAll.ResultsCount += stAdvice.ResultsCount;
                ListTypes.Add(stAdvice);
                //搜索查房日志
                Data.SearchTypes stCheckLog = QueryLocalPatientCheckLog(conn, QueryText, ref ResultList);
                stAll.ResultsCount += stCheckLog.ResultsCount;
                ListTypes.Add(stCheckLog);


                return(ResultList);
            }
        }
Пример #2
0
        private void gridResultType_Tapped(object sender, TappedRoutedEventArgs e)
        {
            if (gridResultType.SelectedItem == null)
            {
                return;
            }
            Data.SearchTypes          st           = gridResultType.SelectedItem as Data.SearchTypes;
            List <Data.SearchResults> filterResult = SearchResultsList.FindAll(sr => sr.DataType == st.DataType || st.DataType == "All");

            this.gridResult.ItemsSource = filterResult;
        }