Пример #1
0
        public void InsertSystemReportCurrentUserActivity(System.Web.UI.Page page, string action, string objectInfo)
        {
            try
            {
                BusinessActivityLogger businessActivityLogger = new BusinessActivityLogger();
                string username        = string.Empty;
                string className       = "BSystemReports";
                string methodName      = "InsertSystemReportCurrentUserActivity";
                string pageId          = Utility.GetCurrentPageID(page);
                string clientIPAddress = string.Empty;

                if (System.Web.HttpContext.Current != null && System.Web.HttpContext.Current.Request != null)
                {
                    username = BUser.CurrentUser.UserName;
                    if (System.Web.HttpContext.Current.Request.UserHostAddress != null)
                    {
                        clientIPAddress = System.Web.HttpContext.Current.Request.UserHostAddress;
                    }
                }

                businessActivityLogger.Info(username, className, methodName, action, pageId, clientIPAddress, objectInfo);
            }
            catch (Exception ex)
            {
                BaseBusiness <GTS.Clock.Model.Report.SystemReportTypesDataContext> .LogException(ex, "BSystemReports", "InsertSystemReportCurrentUserActivity");

                throw ex;
            }
        }