public void Test_CreateLogSystem()
 {
     LogSystemVO logVO = new LogSystemVO();
     logVO.Action = MsgVO.LogTitleName.登入記錄.ToString();
     logVO.Fucntion = MsgVO.LogTitleName.登入記錄.ToString();
     logVO.SubFucntion = MsgVO.LogTitleName.登入記錄.ToString();
     logVO.IpAddress = "127.0.0.1";
     logVO.UpdateId = "admin";
     logVO.UpdateDate = DateTime.Now;
     m_LogService.CreateLogSystem(logVO);
 }
    public void AddSystemLogLogin(string UserId)
    {
        LogSystemVO logVO = new LogSystemVO();
        logVO.Action = MsgVO.LogTitleName.登入記錄.ToString();
        logVO.Fucntion = MsgVO.LogTitleName.登入記錄.ToString();
        logVO.SubFucntion = MsgVO.LogTitleName.登入記錄.ToString();
        logVO.IpAddress = m_HttpHelper.GetUserIp(HttpContext.Current);
        logVO.UpdateId = UserId;
        logVO.UpdateDate = DateTime.Now;

        m_LogService.CreateLogSystem(logVO);
    }
    /// <summary>
    /// 加入 system log
    /// </summary>
    /// <param name="action">異動行為</param>
    public void AddSystemLog(MsgVO.Action action, object obj, string function, string note)
    {
        SessionHelper sHelper = new SessionHelper();

        LoginUserVO userVO = sHelper.LoginUser;

        LogSystemVO logVO = new LogSystemVO();

        if (userVO != null)
        {
            logVO.UpdateId = userVO.UserId;
        }

        logVO.UpdateDate = DateTime.Now;
        logVO.Action = action.ToString();
        logVO.UpdateClassName = obj.GetType().ToString();
        logVO.Fucntion = function;
        logVO.SubFucntion = logVO.SubFucntion;
        logVO.Note = note;
        logVO.IpAddress = m_HttpHelper.GetUserIp(HttpContext.Current);
        m_LogService.CreateLogSystem(logVO);
    }
Пример #4
0
 /// <summary>
 /// 新增系統紀錄
 /// </summary>
 /// <param name="logSystemVO">被新增的系統紀錄</param>
 /// <returns>新增後的系統紀錄</returns>
 public LogSystemVO CreateLogSystem(LogSystemVO logSystemVO)
 {
     return LogDao.CreateLogSystem(logSystemVO);
 }
Пример #5
0
        /// <summary>
        /// 新增系統紀錄
        /// </summary>
        /// <param name="logSystemVO">被新增的系統紀錄</param>
        /// <returns>新增後的系統紀錄</returns>
        public LogSystemVO CreateLogSystem(LogSystemVO logSystemVO)
        {
            NHibernateDao.Insert(logSystemVO);

            return logSystemVO;
        }
Пример #6
0
    private void FillLog(MenuFuncVO m)
    {
        AuthFactory authFactory = new AuthFactory();
        IAuthService authService = authFactory.GetAuthService();

        MenuFuncVO parentMenu = authService.GetMenuFuncById(m.ParentMenu.MenuFuncId);
        string functionName = parentMenu.MenuFuncName;
        string subfunctionName = m.MenuFuncName;
        m_Log.Debug("functionName:" + functionName + " >> " + m.MenuFuncName);
        SessionHelper sessionHelper = new SessionHelper();
        LogSystemVO logSystemVO = new LogSystemVO();
        logSystemVO.Fucntion = functionName;
        logSystemVO.SubFucntion = subfunctionName;
        sessionHelper.LogVO = logSystemVO;
    }