/// <summary>
 ///     Creates an PaymentManager object.
 /// </summary>
 /// <param name="paymentRepository">Instance of <see cref="IPaymentRepository" /></param>
 /// <param name="accountRepository">Instance of <see cref="IRepository{T}" /></param>
 /// <param name="dialogService">Instance of <see cref="IDialogService" /></param>
 public PaymentManager(IPaymentRepository paymentRepository,
     IAccountRepository accountRepository, IDialogService dialogService)
 {
     this.accountRepository = accountRepository;
     this.dialogService = dialogService;
     this.paymentRepository = paymentRepository;
 }
        public void Run(IBackgroundTaskInstance taskInstance)
        {
            var deferral = taskInstance.GetDeferral();

            try
            {
                var dbManager = new DatabaseManager(new WindowsSqliteConnectionFactory(),
                    new MvxWindowsCommonFileStore());

                paymentRepository = new PaymentRepository(dbManager);

                paymentManager = new PaymentManager(paymentRepository,
                    new AccountRepository(dbManager),
                    new RecurringPaymentRepository(dbManager),
                    null);

                ClearPayments();

                // We have to access the settings object here directly without the settings helper since this thread is executed independently.
                if (new WindowsCommonSettings().GetValue(SHOW_CASH_FLOW_ON_MAIN_TILE_KEYNAME, true))
                {
                    UpdateMainTile();
                }
            }
            finally
            {
                deferral.Complete();
            }
        }
 /// <summary>
 /// Initialize purchase controller
 /// </summary>
 /// <param name="courseCtrl">Course API</param>
 /// <param name="myCourseCtrl">MyCourse API</param>
 /// <param name="userProfileRepo">User profile repository</param>
 /// <param name="classRoomRepo">Class room repository</param>
 /// <param name="classCalendarRepo">Class calendar repository</param>
 /// <param name="lessonCatalogRepo">Lesson catalog repository</param>
 /// <param name="userActivityRepo">User activity repository</param>
 /// <param name="paymentRepo">Payment repository</param>
 public PurchaseController(CourseController courseCtrl,
     MyCourseController myCourseCtrl,
     IUserProfileRepository userProfileRepo,
     IClassRoomRepository classRoomRepo,
     IClassCalendarRepository classCalendarRepo,
     ILessonCatalogRepository lessonCatalogRepo,
     IUserActivityRepository userActivityRepo,
     IPaymentRepository paymentRepo,
     IOptions<AppConfigOptions> appConfig,
     IOptions<ErrorMessageOptions> errorMsgs,
     ILoggerFactory loggerFactory,
     IPayment payment,
     IDateTime dateTime)
 {
     _courseCtrl = courseCtrl;
     _myCourseCtrl = myCourseCtrl;
     _userprofileRepo = userProfileRepo;
     _classRoomRepo = classRoomRepo;
     _classCalendarRepo = classCalendarRepo;
     _lessonCatalogRepo = lessonCatalogRepo;
     _userActivityRepo = userActivityRepo;
     _paymentRepo = paymentRepo;
     _dateTime = dateTime;
     _appConfig = appConfig.Value;
     _errorMsgs = errorMsgs.Value;
     _logger = loggerFactory.CreateLogger<PurchaseController>();
     _payment = payment;
 }
        public StatisticMonthlyExpensesViewModel(IPaymentRepository paymentRepository)
            : base(DateTime.Today.AddMonths(-6), DateTime.Now.GetLastDayOfMonth())
        {
            monthlyExpensesDataProvider = new MonthlyExpensesDataProvider(paymentRepository);

            MonthlyExpensesModel = GetModel();
        }
        public RecurringPaymentListViewModel(IPaymentRepository paymentRepository, IDialogService dialogService)
        {
            this.paymentRepository = paymentRepository;
            this.dialogService = dialogService;

            AllPayments = new ObservableCollection<Payment>();
        }
 public StatisticCashFlowViewModel(IPaymentRepository paymentRepository, 
     ISettingsManager settingsManager,
     IMvxMessenger messenger) 
     : base(messenger)
 {
     this.settingsManager = settingsManager;
     cashFlowDataProvider = new CashFlowDataProvider(paymentRepository);
     CashFlowModel = GetCashFlowModel();
 }
        public AccountListViewModel(IAccountRepository accountRepository,
            IPaymentRepository paymentRepository,
            IDialogService dialogService)
        {
            this.accountRepository = accountRepository;
            this.dialogService = dialogService;

            BalanceViewModel = new BalanceViewModel(accountRepository, paymentRepository);
        }
 public RepositoryManager(IAccountRepository accountRepository,
     IPaymentRepository paymentRepository,
     IRepository<Category> categoryRepository,
     IPaymentManager paymentManager)
 {
     this.accountRepository = accountRepository;
     this.paymentRepository = paymentRepository;
     this.categoryRepository = categoryRepository;
     this.paymentManager = paymentManager;
 }
        public PaymentListViewModel(IPaymentRepository paymentRepository,
            IAccountRepository accountRepository,
            IDialogService dialogService, IPaymentManager paymentManager)
        {
            this.paymentRepository = paymentRepository;
            this.accountRepository = accountRepository;
            this.dialogService = dialogService;
            this.paymentManager = paymentManager;

            BalanceViewModel = new PaymentListBalanceViewModel(accountRepository, paymentRepository);
        }
        public PaymentListViewModel(IPaymentRepository paymentRepository,
            IAccountRepository accountRepository,
            IBalanceViewModel balanceViewModel,
            IDialogService dialogService)
        {
            this.paymentRepository = paymentRepository;
            this.accountRepository = accountRepository;
            this.balanceViewModel = balanceViewModel;
            this.dialogService = dialogService;

            BalanceViewModel = new PaymentListBalanceViewModel(accountRepository, paymentRepository);
        }
        public ModifyPaymentViewModel(IPaymentRepository paymentRepository,
            IAccountRepository accountRepository,
            IDialogService dialogService,
            IPaymentManager paymentManager,
            IDefaultManager defaultManager)
        {
            this.paymentRepository = paymentRepository;
            this.dialogService = dialogService;
            this.paymentManager = paymentManager;
            this.defaultManager = defaultManager;
            this.accountRepository = accountRepository;

            token = MessageHub.Subscribe<CategorySelectedMessage>(ReceiveMessage);
        }
 public BackupManager(IBackupService backupService,
     IMvxFileStore fileStore,
     IDatabaseManager databaseManager,
     ISettingsManager settingsManager,
     IPaymentRepository paymentRepository, 
     IConnectivity connectivity)
 {
     this.backupService = backupService;
     this.fileStore = fileStore;
     this.databaseManager = databaseManager;
     this.settingsManager = settingsManager;
     this.paymentRepository = paymentRepository;
     this.connectivity = connectivity;
 }
        public ModifyPaymentViewModel(IPaymentRepository paymentRepository,
            IAccountRepository accountRepository,
            IDialogService dialogService,
            IPaymentManager paymentManager, 
            ISettingsManager settingsManager, 
            IMvxMessenger messenger, IBackupManager backupManager)
        {
            this.dialogService = dialogService;
            this.paymentManager = paymentManager;
            this.settingsManager = settingsManager;
            this.backupManager = backupManager;
            this.paymentRepository = paymentRepository;
            this.accountRepository = accountRepository;

            token = messenger.Subscribe<CategorySelectedMessage>(ReceiveMessage);
        }
        public ModifyPaymentViewModel(IPaymentRepository paymentRepository,
            IAccountRepository accountRepository,
            IDialogService dialogService,
            IPaymentManager paymentManager,
            IDefaultManager defaultManager,
            INavigationService navigationService)
        {
            this.paymentRepository = paymentRepository;
            this.dialogService = dialogService;
            this.paymentManager = paymentManager;
            this.defaultManager = defaultManager;
            this.navigationService = navigationService;
            this.accountRepository = accountRepository;

            MessengerInstance.Register<Category>(this, category => SelectedPayment.Category = category);
        }
        public PaymentListViewModel(IPaymentRepository paymentRepository,
            IAccountRepository accountRepository,
            IBalanceViewModel balanceViewModel,
            IDialogService dialogService,
            INavigationService navigationService,
            IPaymentManager paymentManager)
        {
            this.paymentRepository = paymentRepository;
            this.accountRepository = accountRepository;
            this.balanceViewModel = balanceViewModel;
            this.dialogService = dialogService;
            this.navigationService = navigationService;
            this.paymentManager = paymentManager;

            BalanceViewModel = new PaymentViewModelListBalanceViewModel(accountRepository, paymentRepository);
        }
 public PaymentListViewModel(IAccountRepository accountRepository,
     IPaymentRepository paymentRepository,
     IPaymentManager paymentManager,
     IDialogService dialogService,
     ISettingsManager settingsManager,
     IEndOfMonthManager endOfMonthManager, 
     IBackupManager backupManager, 
     IModifyDialogService modifyDialogService)
 {
     this.paymentManager = paymentManager;
     this.accountRepository = accountRepository;
     this.paymentRepository = paymentRepository;
     this.dialogService = dialogService;
     this.settingsManager = settingsManager;
     this.endOfMonthManager = endOfMonthManager;
     this.backupManager = backupManager;
     this.modifyDialogService = modifyDialogService;
 }
Example #17
0
 public PaymentEntityForm(IPaymentRepository paymentRepository)
 {
     _paymentRepository = paymentRepository;
     InitializeComponent();
     this.Load += PaymentEntityForm_Load;
 }
 public PremiumPaymentService(ITransactionRepository transactionRepository, IPaymentRepository paymentRepository)
     : base(transactionRepository, paymentRepository)
 {
 }
 public CategorySummaryDataProvider(IPaymentRepository paymentRepository, ICategoryRepository categoryRepository)
 {
     this.paymentRepository = paymentRepository;
     this.categoryRepository = categoryRepository;
 }
Example #20
0
 public ReservationsController(IReservationRepository reserveRepo,
                               IRoomRepository roomRepo, ICustomerRepository CustomerRepo, IPaymentRepository paymentRepo)
 {
     _reserveRepo  = reserveRepo;
     _roomRepo     = roomRepo;
     _paymentRepo  = paymentRepo;
     _customerRepo = CustomerRepo;
 }
Example #21
0
 public PaymentService(IPaymentRepository paymentRepository, ILogger <PaymentRepository> logger)
 {
     _paymentRepository = paymentRepository;
     _logger            = logger;
 }
Example #22
0
 public PaymentController(IPaymentRepository paymentRepository)
 {
     this.paymentRepository = paymentRepository;
 }
Example #23
0
 public PaymentService(IPaymentRepository repository, IBankClient bankClient, IPaymentMapper paymentMapper)
 {
     _repository    = repository;
     _bankClient    = bankClient;
     _paymentMapper = paymentMapper;
 }
 public BalanceViewModel(IAccountRepository accountRepository,
                         IPaymentRepository paymentRepository)
 {
     AccountRepository = accountRepository;
     PaymentRepository = paymentRepository;
 }
 public ProfileSubscriptionValidUntilResolver(IPaymentRepository repository)
 {
     _repository = repository;
 }
 public PaymentService(IPaymentCreditCardFacade paymentCreditCardFacade, IPaymentRepository paymentRepository, IMediatrHandler mediatorHandler)
 {
     _paymentCreditCardFacade = paymentCreditCardFacade;
     _paymentRepository       = paymentRepository;
     _mediatorHandler         = mediatorHandler;
 }
Example #27
0
 public PaymentService(IPaymentRepository paymentRepo,
                       IConverterManager converterManager)
 {
     _paymentRepository = paymentRepo;
     _converterManager  = converterManager;
 }
 public PaymentMethodController()
 {
     _paymentMethodRepository = new PaymentMethodRepository();
 }
Example #29
0
 public PaymentsPairingController(IWebSession webSession, ILog log, IPurchaseOrderRepository orderRepository, IPaymentRepository paymentRepository, IOrdersFacade ordersFacade)
     : base(webSession, log)
 {
     m_orderRepository   = orderRepository;
     m_paymentRepository = paymentRepository;
     m_ordersFacade      = ordersFacade;
 }
Example #30
0
 public DataService(IPaymentRepository repository, IPaymentProcessorService service)
 {
     _repository = repository;
     _service    = service;
 }
Example #31
0
 public PaymentManager(IPaymentRepository paymentRepository, IBankClient bankClient)
 {
     _paymentRepository = paymentRepository;
     _bankClient        = bankClient;
 }
Example #32
0
 public PaymentService(IPaymentTypeRepository paymentTypeRepository, IPaymentCategoryRepository paymentCategoryRepository, IPaymentRepository paymentRepository, IBankAccountRepository bankAccountRepository)
 {
     this.paymentTypeRepository     = paymentTypeRepository;
     this.paymentCategoryRepository = paymentCategoryRepository;
     this.paymentRepository         = paymentRepository;
     this.bankAccountRepository     = bankAccountRepository;
 }
Example #33
0
 public PlayerBankAccountQueries(IPaymentRepository repository)
 {
     _repository = repository;
 }
Example #34
0
 public MachineSerivce(IPaymentRepository paymentRepository, IDrinkCanRepository drinkCanRepository)
 {
     _paymentRepository  = paymentRepository;
     _drinkCanRepository = drinkCanRepository;
 }
Example #35
0
 public PaymentController(IPaymentRepository repository)
 {
     this._repository = repository;
 }
Example #36
0
 public PaymentService(IPaymentRepository paymentRepository, IUnitOfWork unitOfWork)
 {
     _paymentRepository = paymentRepository;
     _unitOfWork = unitOfWork;
 }
Example #37
0
 public PaymentService(IPaymentRepository paymentRepository)
 {
     _paymentRepository = paymentRepository;
 }
 public PaymentListBalanceViewModel(IAccountRepository accountRepository,
     IPaymentRepository paymentRepository)
     : base(accountRepository, paymentRepository)
 {
 }
Example #39
0
            public MembershipTransactionFetcher(IServiceOrderRepository serviceOrderRepository, IServiceBookingRepository serviceBookingRepository, IPurchaseOrderRepository purchaseOrderRepository, IPointRedemptionRepository pointRedemptionRepository, IPaymentRepository paymentRepository)
            {
                _serviceOrderRepository    = serviceOrderRepository;
                _serviceBookingRepository  = serviceBookingRepository;
                _purchaseOrderRepository   = purchaseOrderRepository;
                _pointRedemptionRepository = pointRedemptionRepository;
                _paymentRepository         = paymentRepository;

                _membershipTransactions = new List <MembershipTransactionDto>();
            }
 public PaymentService(IPaymentRepository paymentRepository, IOrderRepository orderRepository)
 {
     _paymentRepository = paymentRepository;
     _orderRespository  = orderRepository;
 }
 public PaymentManager(IPaymentRepository paymentRepository, IAccountRepository accountRepository)
 {
     this.paymentRepository = paymentRepository;
     this.accountRepository = accountRepository;
 }
Example #42
0
 public CategorySummaryDataProvider(IPaymentRepository paymentRepository, ICategoryRepository categoryRepository)
 {
     this.paymentRepository  = paymentRepository;
     this.categoryRepository = categoryRepository;
 }
        public StatisticCashFlowViewModel(IPaymentRepository paymentRepository)
        {
            cashFlowDataProvider = new CashFlowDataProvider(paymentRepository);

            CashFlowModel = GetCashFlowModel();
        }
 public PaymentService(IPaymentRepository PaymentRepository, IVehicleService VehicleService)
 {
     _paymentRepository = PaymentRepository;
     _vehicleService    = VehicleService;
 }
 public StatisticCategorySpreadingViewModel(IPaymentRepository paymentRepository,
     IRepository<Category> categoryRepository)
 {
     speadingDataProvider = new CategorySpreadingDataProvider(paymentRepository, categoryRepository);
 }
 public PaymentsController(IPaymentRepository paymentRepository)
 {
     this.paymentRepository = paymentRepository;
 }
Example #47
0
        // + -move forth, -move back
        private void MoveTime(int days)
        {
            using (var context = kernel.Get<BankDbContext>())
            {
                _creditRepo = new CreditRepository(context);
                _paymentRepo = new PaymentRepository(context);
                _clientRepo = new ClientRepository(context);
                var daysDiff = TimeSpan.FromDays(days);
                timeDifference += daysDiff;
                var credits = _creditRepo.GetAll(); //.ToList();
                var test = credits.Count();
                foreach (var item in credits)
                {
                   item.StartDate -= daysDiff;
                    item.CountFineFromThisDate -= daysDiff;
                }
                //var crArray = credits.Select(
                //    x =>
                //        new Credit {
                //            CreditId = x.CreditId,
                //            AccountId = x.AccountId,
                //            CreditTypeId = x.CreditTypeId,
                //            RequestId = x.RequestId,
                //            AllreadyPaid = x.AllreadyPaid,
                //            AmountOfPaymentPerMonth = x.AmountOfPaymentPerMonth,
                //            StartDate = x.StartDate - daysDiff,
                //            IsRepaid = x.IsRepaid,
                //            HasDelays = x.HasDelays,
                //            PaidForFine = x.PaidForFine,
                //            CountFineFromThisDate = x.CountFineFromThisDate - daysDiff//,

                //            //Account = x.Account,
                //            //CreditType = x.CreditType,
                //            //Request = x.Request//,
                //            //Payments = x.Payments
                //        }).ToArray();//
                _creditRepo.Update(credits.ToArray() /*crArray*/);

                var payments = _paymentRepo.GetAll().ToList();
                payments.ForEach(x => x.Date -= daysDiff);
                _paymentRepo.Update(payments.ToArray());

                var clients = _clientRepo.GetAll().ToList();
                foreach (var item in clients)
                {
                    item.Birthday -= daysDiff;
                }
                //var clArray =
                //    clients.Select(
                //        x =>
                //        new Client()
                //        {
                //            ClientId = x.ClientId,
                //            UserId = x.UserId,
                //            LastName = x.LastName,
                //            Name = x.Name,
                //            Patronymic = x.Patronymic,
                //            Birthday = x.Birthday - daysDiff,
                //            Mobile = x.Mobile,
                //            Email = x.Email,
                //            PassportNo = x.PassportNo,
                //            PassportIdentificationNo = x.PassportIdentificationNo,
                //            PassportAuthority = x.PassportAuthority,
                //            PassportExpirationDate = x.PassportExpirationDate - daysDiff,
                //            PlaceOfResidence = x.PlaceOfResidence,
                //            RegistrationAddress = x.RegistrationAddress,
                //            User = x.User
                //        }).ToArray();
                _clientRepo.Update(clients.ToArray());

                context.SaveChanges();
                //_context.Dispose();
            }
            //using (var kernel = new StandardKernel(new TimeTravelBindings()))
            //{
            //    _context = kernel.Get<BankDbContext>();
            //}
        }
 public BalanceViewModel(IAccountRepository accountRepository,
     IPaymentRepository paymentRepository)
 {
     AccountRepository = accountRepository;
     PaymentRepository = paymentRepository;
 }
 public ListStatisticFactory(IPaymentRepository paymentRepository,
     IRepository<Category> categoryRepository)
 {
     this.paymentRepository = paymentRepository;
     this.categoryRepository = categoryRepository;
 }
 public EndOfMonthManager(IPaymentRepository paymentRepository)
 {
     this.paymentRepository = paymentRepository;
 }
Example #51
0
            public MembershipTransactionFetcher(IServiceOrderRepository serviceOrderRepository, IServiceBookingRepository serviceBookingRepository, IPurchaseOrderRepository purchaseOrderRepository, IPointRedemptionRepository pointRedemptionRepository, IPaymentRepository paymentRepository)
            {
                _serviceOrderRepository = serviceOrderRepository;
                _serviceBookingRepository = serviceBookingRepository;
                _purchaseOrderRepository = purchaseOrderRepository;
                _pointRedemptionRepository = pointRedemptionRepository;
                _paymentRepository = paymentRepository;

                _membershipTransactions = new List<MembershipTransactionDto>();
            }
 public CancelPaymentHandler(IAccountRepository accountRespository, IPaymentRepository paymentRespository)
     : base(accountRespository, paymentRespository)
 {
 }
Example #53
0
 public PaymentCharge(IPaymentRepository paymentRepository, IMappingProvider mappingProvider, IRetryHelper retryHelper)
 {
     _paymentRepository = paymentRepository;
     _mappingProvider   = mappingProvider;
     _retryHelper       = retryHelper;
 }
Example #54
0
 public RegisterUnitOfWork(IPaymentRepository paymentRepository, IProductRepository productRepository)
 {
     _paymentRepository = paymentRepository;
     _productRepository = productRepository;
 }
 public StatisticCategorySummaryViewModel(IPaymentRepository paymentRepository,
     IRepository<Category> categoryRepository)
 {
     categorySummaryDataDataProvider = new CategorySummaryDataProvider(paymentRepository, categoryRepository);
 }
Example #56
0
 public UnitOfWork(ApplicationDbContext context, IPaymentRepository paymentRepository, IPaymentStateRepository _paymentState)
 {
     _Dbcontext    = context;
     payments      = paymentRepository;
     paymentStates = _paymentState;
 }
 public PaymentValidations(IPaymentRepository repository)
 {
     _repository = repository;
 }
Example #58
0
 public DuplicateRequestValidator(IPaymentRepository repository)
 {
     _repository = repository;
 }
Example #59
0
 public UsersController(IPaymentRepository payments)
 {
     _payments = payments;
 }
Example #60
0
 /// <summary>
 ///     Creates a PaymentService object.
 /// </summary>
 /// <param name="unitOfWork">Instance of <see cref="IUnitOfWork" /></param>
 /// <param name="paymentRepository">Instance of <see cref="IPaymentRepository" /></param>
 public PaymentService(IUnitOfWork unitOfWork, IPaymentRepository paymentRepository)
 {
     this.unitOfWork        = unitOfWork;
     this.paymentRepository = paymentRepository;
 }