Пример #1
0
        protected void LogFilterListPairAudit(dynamic filter, dynamic model)
        {
            if (!IoC.Resolve <ISettings>().AuditEnabled)
            {
                return;
            }
            try
            {
                _activityType = Type.Retrieved;

                var logModel = _auditLogFilterHelper.GetActivityLogEditModel(this.Request, model, _activityType.ToString());

                if (logModel != null)
                {
                    _activityLogService.LogFilterModelPair(logModel, filter, model);
                }
                else
                {
                    var logger = IoC.Resolve <ILogManager>().GetLogger("BasePage");
                    logger.Info("Session is null while Saving Audit Data");
                }
            }
            catch (Exception ex)
            {
                var logger = IoC.Resolve <ILogManager>().GetLogger("BaseUserControl");
                logger.Error("Error in BaseUserControl LogFilterListPairAudit", ex);
            }
        }
Пример #2
0
        protected void LogFilterListPairAudit(ModelType modelType, dynamic filter, dynamic model, string filePath, string requestType)
        {
            if (!IoC.Resolve <ISettings>().AuditEnabled)
            {
                return;
            }
            try
            {
                _activityType = modelType == ModelType.Edit
                        ? Type.Updated
                        : (modelType == ModelType.Edit ? Type.Created : Type.Retrieved);

                var logModel = _auditLogFilterHelper.GetActivityLogEditModel(filePath, requestType, model, _activityType.ToString());
                _activityLogService.LogFilterModelPair(logModel, filter, model);
            }
            catch (Exception ex)
            {
                var logger = IoC.Resolve <ILogManager>().GetLogger("BaseWebService");
                logger.Error("Error in BaseWebService LogFilterListPairAudit", ex);
            }
        }