예제 #1
0
        public List <AccessLogCommon> GetAccessLogList(string from_date, string to_date)
        {
            List <AccessLogCommon> acclog = new List <AccessLogCommon>();
            string sql = "sproc_access_log @flag = 's'";

            sql += string.IsNullOrEmpty(from_date) ? "" : ", @from_date=" + DAO.FilterString(from_date);
            sql += string.IsNullOrEmpty(to_date) ? "" : ", @to_date=" + DAO.FilterString(to_date);


            var dbres = DAO.ExecuteDataTable(sql);

            if (dbres != null)
            {
                foreach (DataRow dr in dbres.Rows)
                {
                    AccessLogCommon accesslog = new AccessLogCommon();
                    accesslog.pageName         = dr["page_name"].ToString();
                    accesslog.logType          = dr["log_type"].ToString();
                    accesslog.actionIpAddress  = dr["from_ip_address"].ToString();
                    accesslog.browser          = dr["browser_info"].ToString();
                    accesslog.createdBy        = dr["created_by"].ToString();
                    accesslog.createdUtcDate   = dr["created_UTC_date"].ToString();
                    accesslog.createdLocalDate = dr["created_local_date"].ToString();
                    //accesslog.fromDate = dr["created_UTC_date"].ToString();
                    //accesslog.toDate = dr["created_UTC_date"].ToString();
                    accesslog.msg = dr["remarks"].ToString();

                    acclog.Add(accesslog);
                }
            }
            return(acclog);
        }
예제 #2
0
        public ActionResult AccessLog(AccessLogCommon alc)
        {
            //AccessLogCommon alc = new AccessLogCommon();
            //alc.fromDate = fromDate;
            //alc.toDate = toDate;
            var list = _access.GetAccessLogList(alc.fromDate, alc.toDate);
            //foreach (var item in list)
            //{
            //    item.Action = StaticData.GetActions("AccessLog", "", this, "", "");
            //}
            IDictionary <string, string> param = new Dictionary <string, string>();

            param.Add("pageName", "Page Name");
            param.Add("logType", "Log Status");
            param.Add("browser", "Browser");
            param.Add("Msg", "Remarks");
            param.Add("CreatedBy", "Access By");
            param.Add("actionIpAddress", "Ip Address");
            param.Add("createdLocalDate", "Date Time");

            ProjectGrid.column = param;
            var grid = ProjectGrid.MakeGrid(list, "hidebreadcrumb", "", 0, true, "", "", "Home", "Access Log", "#", "#");

            ViewData["grid"] = grid;
            return(View(alc));
        }
예제 #3
0
        public ActionResult AccessLog(string from, string to)
        {
            AccessLogCommon alc = new AccessLogCommon();

            alc.fromDate = from;
            alc.toDate   = to;
            //var UserType = Session["UserType"].ToString();
            var list = _access.GetAccessLogList(alc.fromDate, alc.toDate);

            foreach (var item in list)
            {
                item.Action = StaticData.GetActions("AccessLog", "", this, "", "");
            }
            IDictionary <string, string> param = new Dictionary <string, string>();

            param.Add("pageName", "Page Name");
            param.Add("logType", "Log Status");
            param.Add("browser", "Browser");
            param.Add("msg", "Remarks");
            param.Add("createdBy", "Access By");
            param.Add("actionIpAddress", "Ip Address");
            param.Add("createdLocalDate", "Date Time");

            ProjectGrid.column = param;
            var grid = ProjectGrid.MakeGrid(list, "", "", 0, true, "", "", "Home", "Access Log", "#", "#");

            ViewData["grid"] = grid;
            return(View());
        }