Ejemplo n.º 1
0
 public override GetAttorneyInfoResult GetExceptionResult(Query message, Exception ex)
 {
     Log.Error(ex, ex.Message);
     message.Result.SystemInfo.Status = Mapper.Map <StatusInfo>(_systemInfoHelper.StatusInfoFail(ex));
     _systemInfoHelper.SaveAnswer(Mapper.Map <SystemInfoDto>(message.Result.SystemInfo), message.LogAction);
     return(message.Result);
 }
Ejemplo n.º 2
0
 public override CustomerPatentValidityResponce GetExceptionResult(Query message, Exception ex)
 {
     Log.Error(ex, ex.Message);
     message.Responce.StatusInfo = Mapper.Map <StatusInfo>(_systemInfoHelper.StatusInfoFail(ex));
     _systemInfoHelper.SaveAnswer(Mapper.Map <SystemInfoDto>(message.Responce), message.LogAction);
     return(message.Responce);
 }
Ejemplo n.º 3
0
            public override void Logging(Query message)
            {
                var infoSuccess = _systemInfoHelper.StatusInfoSuccess();

                message.Result.SystemInfo.Status = Mapper.Map <StatusInfo>(infoSuccess);
                _systemInfoHelper.SaveAnswer(Mapper.Map <SystemInfoDto>(message.Result.SystemInfo), message.LogAction);
            }
Ejemplo n.º 4
0
 public override CheckPatentStatementResult GetExceptionResult(Query message, Exception ex)
 {
     Log.Error(ex, ex.Message);
     message.Result.IsSuccess         = false;
     message.Result.StatusRu          = "Ошибка: " + Environment.NewLine + ex.Message;
     message.Result.SystemInfo.Status = Mapper.Map <StatusInfo>(_systemInfoHelper.StatusInfoFail(ex));
     _systemInfoHelper.SaveAnswer(Mapper.Map <SystemInfoDto>(message.Result.SystemInfo), message.LogAction);
     return(message.Result);
 }
Ejemplo n.º 5
0
            public override void Logging(Command message)
            {
                var messageLog =
                    $"вх. № {message.Result.DocumentNumber}, штрих-код {message.Result.DocumentID}";
                var infoSuccess = _systemInfoHelper.StatusInfoSuccess(messageLog);

                message.Result.SystemInfo.Status = Mapper.Map <StatusInfo>(infoSuccess);
                _systemInfoHelper.SaveAnswer(Mapper.Map <SystemInfoDto>(message.Result.SystemInfo), message.LogAction);
            }
Ejemplo n.º 6
0
            public override GetBtBasePatentListResult GetExceptionResult(Query message, Exception ex)
            {
                Log.Error(ex, ex.Message);
                message.Result.List = null;
                var statusFail = _systemInfoHelper.StatusInfoFail(ex);

                message.Result.SystemInfo.Status = Mapper.Map <StatusInfo>(statusFail);
                _systemInfoHelper.SaveAnswer(Mapper.Map <SystemInfoDto>(message.Result.SystemInfo), message.LogAction);
                return(message.Result);
            }
Ejemplo n.º 7
0
 public override MessageSendResult GetExceptionResult(Command message, Exception ex)
 {
     Log.Error(ex, ex.Message);
     message.Result.SystemInfo.Status = Mapper.Map <StatusInfo>(_systemInfoHelper.StatusInfoFail(ex));
     _systemInfoHelper.SaveAnswer(Mapper.Map <SystemInfoDto>(message.Result.SystemInfo), message.LogAction);
     message.Result.DocumentNumber = null;
     message.Result.DocumentDate   = null;
     message.Result.DocumentUID    = -1;
     return(message.Result);
 }
Ejemplo n.º 8
0
            public override RequisitionSendResult GetExceptionResult(Command message, Exception ex)
            {
                var errorMessage = ex.InnerException?.Message ?? ex.Message;

                Log.Error(ex.InnerException ?? ex, errorMessage);
                message.Result.SystemInfo.Status = Mapper.Map <StatusInfo>(_systemInfoHelper.StatusInfoFail(ex));
                _systemInfoHelper.SaveAnswer(Mapper.Map <SystemInfoDto>(message.Result.SystemInfo), message.LogAction);
                message.Result.RequisitionStatus = -1;
                message.Result.DocumentID        = -1;
                message.Result.DocumentNumber    = string.Empty;
                return(message.Result);
            }