private void LogError(string errorMessage) { var errorLog = new LowFareAirLinesError { Agent = Reservation.Agent.ID, AirLine = LowFareAirLinesErrorLogger.Volaris, Date = DateTime.Now, ServiceName = "AirPriceService", ErrorMessage = errorMessage }; LowFareAirLinesErrorLogger.Instance.Log(errorLog); }
private void Log(LowFareAirLinesError error, string connectionString) { Database dataBase = DatabaseFactory.CreateDatabase(connectionString); DbCommand dbComand = dataBase.GetStoredProcCommand("InsertLowFareAirLinesError"); dataBase.AddInParameter(dbComand, "Agent", DbType.String, error.Agent); dataBase.AddInParameter(dbComand, "ErrorMessage", DbType.String, error.ErrorMessage); dataBase.AddInParameter(dbComand, "AirLine", DbType.String, error.AirLine); dataBase.AddInParameter(dbComand, "Date", DbType.DateTime, error.Date); dataBase.AddInParameter(dbComand, "ServiceName", DbType.String, error.ServiceName); int result = dataBase.ExecuteNonQuery(dbComand); }
private void LogError(string errorMessage) { var errorLog = new LowFareAirLinesError { Agent = "N/A", AirLine = LowFareAirLinesErrorLogger.Volaris, Date = DateTime.Now, ServiceName = "LowSearchService", ErrorMessage = errorMessage }; LowFareAirLinesErrorLogger.Instance.Log(errorLog); }
private void LogError(string errorMessage) { var errorLog = new LowFareAirLinesError { Agent = Reservation.Agent.ID, AirLine = LowFareAirLinesErrorLogger.Volaris, Date = DateTime.Now, ServiceName = "AirTicketPaymentService", ErrorMessage = errorMessage }; var result = _errorMessageDictionary.FirstOrDefault(d => errorMessage.ToLower().Contains(d.Key)); ErrorMessage = result.Key != null ? result.Value : "No se pudo concluir el pago de la reservación, debido a que la tarjeta fue declinada."; LowFareAirLinesErrorLogger.Instance.Log(errorLog); }
public void Log(LowFareAirLinesError error) { try { Log(error, CommonENT.MYCTSDB_CONNECTION); } catch (Exception exee) { try { Log(error, CommonENT.MYCTSDBBACKUP_CONNECTION); } catch (Exception exe) { } } }
public void Log(LowFareAirLinesError error) { DataAccess.Log(error); }