Exemplo n.º 1
0
        /// <summary>
        /// 查询系统日志总记录数
        /// </summary>
        /// <param name="sd">开始时间</param>
        /// <param name="ed">结束时间</param>
        /// <param name="UserName">用户名</param>
        /// <param name="LogContent">日志内容</param>
        /// <returns></returns>
        public int QuerySystemLogCount(DateTime sd, DateTime ed, string UserName, string LogContent)
        {
            if (_DataServer == null)
            {
                return(0);
            }
            DTSystemLogInfo dtSys = new DTSystemLogInfo();

            dtSys.LogTime.Value           = sd.ToString("yyyy-MM-dd HH:mm:ss");
            dtSys.LogTime.Value2          = ed.ToString("yyyy-MM-dd HH:mm:ss");
            dtSys.LogTime.RelationalOptor = WYDBC.Relational.Between;
            if (UserName != "")
            {
                dtSys.UserName.Value           = UserName;
                dtSys.UserName.RelationalOptor = WYDBC.Relational.Like;
            }
            if (LogContent != "")
            {
                dtSys.LogContent.Value           = LogContent;
                dtSys.LogContent.RelationalOptor = WYDBC.Relational.Like;
            }
            int rs = _DataServer.GetRowCount(dtSys);

            return(rs);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 分页查询系统日志
        /// </summary>
        /// <param name="sd">开始时间</param>
        /// <param name="ed">结束时间</param>
        /// <param name="UserName">用户名</param>
        /// <param name="LogContent">日志内容</param>
        /// <returns></returns>
        public ArrayList QuerySystemLogPage(DateTime sd, DateTime ed, int pagenumber, int pagesize, string UserName, string LogContent)
        {
            if (_DataServer == null)
            {
                return(null);
            }
            DTSystemLogInfo dtSys = new DTSystemLogInfo();

            dtSys.LogTime.Value           = sd.ToString("yyyy-MM-dd HH:mm:ss");
            dtSys.LogTime.Value2          = ed.ToString("yyyy-MM-dd HH:mm:ss");
            dtSys.LogTime.RelationalOptor = WYDBC.Relational.Between;
            dtSys.LogTime.Orderby         = 2;
            if (UserName != "")
            {
                dtSys.UserName.Value           = UserName;
                dtSys.UserName.RelationalOptor = WYDBC.Relational.Like;
            }
            if (LogContent != "")
            {
                dtSys.LogContent.Value           = LogContent;
                dtSys.LogContent.RelationalOptor = WYDBC.Relational.Like;
            }
            //,dtSys.ID.FieldName
            ArrayList rs = _DataServer.GetResult(dtSys, dtSys.LogTime.FieldName, pagenumber, pagesize);

            return(rs);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 查询系统日志的结果
        /// </summary>
        public ArrayList QuerySystemLog()
        {
            if (_DataServer == null)
            {
                return(null);
            }
            DTSystemLogInfo dtSys = new DTSystemLogInfo();

            dtSys.LogTime.Orderby = 2;
            ArrayList rs = _DataServer.GetResult(dtSys);

            return(rs);
        }