This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using BackOffice.WebUI.Controllers.Base; | |
using Watchfinder.Commands.Marketing.Channels; | |
using Watchfinder.Reads.Marketing; | |
using Watchfinder.Reads.Marketing.Views; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//scheduled trigger - one of execution | |
public class ScheduledTrigger : ITrigger | |
{ | |
public ScheduledTrigger() { } | |
public ScheduledTrigger(DateTime date) | |
{ | |
Date = date; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [NewBusiness] | |
GO | |
/****** Object: StoredProcedure [dbo].[usp_CashOfferSELECTNew] Script Date: 04/17/2012 14:53:58 ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class WorkflowController : BaseController | |
{ | |
private string _workflowReference; | |
private readonly string _modelNamespace; | |
private readonly string _modelAssembly; | |
private IWorkflowKeyStore _workflowKeyStore; | |
private IWorkflowInvokerFactory _invokerFactory; | |
protected WorkflowController(string workflowReference, string modelNamespace, string modelAssembly, IWorkflowKeyStore workflowKeyStore, IWorkflowInvokerFactory workflowInvokerFactory) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ApplicationController : WorkflowController | |
{ | |
public ApplicationController(IWorkflowKeyStore workflowKeyStore, IWorkflowInvokerFactory workflowInvokerFactory) | |
: base("face2face", "Vanquis.NewBusiness.PL.Models", "Vanquis.NewBusiness.PL.Models", workflowKeyStore, workflowInvokerFactory) { } | |
[NoCache] | |
[Authorize] | |
public ActionResult Index() | |
{ | |
LogSystem.log.Debug("ApplicationController/Index"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class InventoryController : ApiController | |
{ | |
private readonly IInventoryManagementService _inventoryManagementService; | |
private readonly IUnitOfWork _unitOfWork; | |
public InventoryController(IUnitOfWork unitOfWork) | |
{ | |
_unitOfWork = unitOfWork; //access services | |
_inventoryManagementService = _unitOfWork.Get<IInventoryManagementService>(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class JsonSerialiser : ISerialiser | |
{ | |
public string Serialize<T>(T t) | |
{ | |
var ser = new DataContractJsonSerializer(typeof(T)); | |
var ms = new MemoryStream(); | |
ser.WriteObject(ms, t); | |
string jsonString = Encoding.UTF8.GetString(ms.ToArray()); | |
ms.Close(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CardValidationService : ICardValidationService | |
{ | |
private readonly CallValidationConfiguration _config; | |
private readonly ICallValidateDataService _callValidateDataService; | |
private readonly ILogger _logger = LoggerProvider.GetLogger<CardValidationService>(); | |
public CardValidationService(CallValidationConfiguration config, ICallValidateDataService callValidateDataService) | |
{ | |
_config = config; | |
_callValidateDataService = callValidateDataService; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public bool ValidateExpiryDate(string cardExpiryDate, DateTime lastPaymentDate) | |
{ | |
if (cardExpiryDate == null || !CardDateUtil.FormatIsValid(cardExpiryDate)) return false; | |
DateTime expiryDate = CardDateUtil.ConvertToDateTime(cardExpiryDate, SetDayOfMonth.LastDayOfMonth); | |
var invalidExpiryDate = lastPaymentDate.AddMonths(3); //TODO: pass as variable | |
var inDate = expiryDate >= invalidExpiryDate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CardValidationService : ICardValidationService | |
{ | |
private readonly CallValidationConfiguration _config; | |
private readonly ICallValidateDataService _callValidateDataService; | |
private readonly ILogger _logger = LoggerProvider.GetLogger<CardValidationService>(); | |
public CardValidationService(CallValidationConfiguration config, ICallValidateDataService callValidateDataService) | |
{ | |
_config = config; | |
_callValidateDataService = callValidateDataService; |
OlderNewer