Exemplo n.º 1
0
	    public DataForAPI(BaseSfEtEntity sourceEntity,
						  IDataBaseAccess dataBaseAccess,
						  AdditionalDetails additionalDetails,
						  string email)
		{
			SourceEntity = sourceEntity;
			DataBaseAccess = dataBaseAccess;
			AdditionalDetails = additionalDetails;
			AdditionalDetails.ETProcessDate = sourceEntity.ETProcessDate;
			AdditionalDetails.SalesForceMarketingActivityName = sourceEntity.SalesForceMarketingActivityName;
			Email = email;

			if (sourceEntity is MarginCall)
			{
				AdditionalDetails.RequiredMargin = (sourceEntity as MarginCall).RequiredMargin;
			}
		}
Exemplo n.º 2
0
		public SendResult FillSendResult(string errorMessage, BaseSfEtEntity entity)
		{
			SendResult result = new SendResult();

			if (string.IsNullOrEmpty(errorMessage))
			{
				result.Entity = entity;
				result.HasBeenSent = true;
				result.Error = errorMessage;
			}
			else
			{
				result.Entity = entity;
				result.HasBeenSent = false;
				result.Error = errorMessage;
			}

			return result;
		}
Exemplo n.º 3
0
		public override void UpdateEntity(BaseSfEtEntity entity, bool hasBeenSent, string error)
		{
			entity.HasBeenSentToET = hasBeenSent;
			entity.ETError = error;
		}
Exemplo n.º 4
0
		public override void UpdateHighMarginThresholdBreachesToEloqua(BaseSfEtEntity entity)
		{
			UpdateRecord(entity.KeyValue, entity.HasBeenSentToET, entity.ETError, true, ContactsConnectionName, UpdateHighMarginThresholdBreachesToEloquaSP);
		}
Exemplo n.º 5
0
		public override void UpdateJapanInactivity(BaseSfEtEntity entity)
		{
			UpdateRecord(entity.KeyValue, entity.HasBeenSentToET, entity.ETError, true, ProductionConnectionName, UpdateJapanInactivitySP);
		}
Exemplo n.º 6
0
		public override void UpdateMarginCall(BaseSfEtEntity entity)
		{
			UpdateRecord(entity.KeyValue, entity.HasBeenSentToET, entity.ETError, true, ProductionConnectionName, UpdateMarginCallSP);
		}