예제 #1
0
        public IEnumerable GetData()
        {
            LogSearchParameters lsp = new LogSearchParameters();

            lsp.Text = txSearchTxt.Text;
            List <LogItem> items = DBController.DbLog.GetLogs(lsp);

            return(items);
        }
예제 #2
0
        public List <LogItem> GetLogs(LogSearchParameters lsp)
        {
            SetSqlFormat("select * from {0}", SynnDataProvider.TableNames.Log);
            ClearParameters();
            if (!string.IsNullOrEmpty(lsp.Text))
            {
                StartORGroup();
                AddORLikeField("Trace", lsp.Text, LikeSelectionStyle.CheckBoth);
                AddORLikeField("Message", lsp.Text, LikeSelectionStyle.CheckBoth);
                EndORGroup();
            }
            if (lsp.FromDate.HasValue)
            {
                AddSqlWhereField("Date", lsp.FromDate, ">=");
            }
            if (lsp.ToDate.HasValue)
            {
                AddSqlWhereField("Date", lsp.ToDate, "<");
            }
            var lst = new List <LogItem>();

            FillList(lst, typeof(LogItem));
            return(lst);
        }
 public List <LogItem> GetLogs(LogSearchParameters lsp)
 {
     throw new NotImplementedException();
 }