public BudgetsViewModel(IBudgetService budgetService, INavigationService navigationService, IBudgetSynchronizationService budgetSynchronizationService) { this._budgetService = budgetService; this._navigationService = navigationService; this._budgetSynchronizationService = budgetSynchronizationService; var canOpenBudget = this.WhenAny(f => f.SelectedBudget, budget => budget.Value != null); this.OpenBudget = ReactiveCommand.CreateAsyncTask(canOpenBudget, async _ => { await this._budgetSynchronizationService.SynchronizeBudgetInBackground(this.SelectedBudget); this._navigationService.NavigateToViewModel<BudgetsViewModel>(); }); this.ReloadBudgets = ReactiveCommand.CreateAsyncTask(async _ => { IReadOnlyCollection<Budget> budgets = await this._budgetService.GetBudgetsAsync(); var result = new ReactiveObservableCollection<Budget>(); result.AddRange(budgets); return result; }); this.ReloadBudgets.ToProperty(this, f => f.Budgets, out this._budgetsHelper); }
public BooksController(IBudgetService bookService, IRepository<Book> templateRepository) { _bookService = bookService; _templateRepository = templateRepository; }
public ProjectsController(IBudgetService budgets, IWorkService works, UserManager <User> userManager, ICategoryService categories) { this.budgets = budgets; this.projects = works; this.categories = categories; this.userManager = userManager; }
public static List <Models.Category> PrepareBudgetModel(IBudgetService budgetService, IExchangeRateService exchangeRateService, ICurrencyService currencyService, CountryProgramme countryProg, ProjectDonor pd, Currency displayCurrency) { List <Model.BudgetCategory> bcList = budgetService.GetBudgetCategories(pd); List <Model.ProjectBudget> budgetLines; List <Models.Category> categories = new List <Models.Category>(); Models.Category category; int i = 0; foreach (Model.BudgetCategory bc in bcList) { budgetLines = budgetService.GetProjectBLByCategory(pd, bc); if (budgetLines.Count > 0) { category = new Models.Category(); category.EntityBudgetCategory = bc; category.Id = bc.Id.ToString(); if (i == 0) { category.ProjectDonorId = (Guid)bc.ProjectDonorId; category.Currencies = new SelectList(currencyService.GetCurrencies(countryProg.Id), "Id", "ShortName", displayCurrency.Id); category.CurrencyId = displayCurrency.Id; } AddCategoryLinesWithNumbers(exchangeRateService, category, budgetLines, displayCurrency, countryProg); categories.Add(category); } } if (categories.Count > 0) { ComputeTotals(categories); } return(categories); }
public BudgetingController(IBudgetService budgetService, IOrganizationService organizationService, ICurrentMarket currentMarket, ICustomerService customerService) { _budgetService = budgetService; _organizationService = organizationService; _currentMarket = currentMarket; _customerService = customerService; }
public CheckoutViewModelFactory( LocalizationService localizationService, PaymentMethodViewModelFactory paymentMethodViewModelFactory, IAddressBookService addressBookService, IContentLoader contentLoader, IOrderGroupFactory orderGroupFactory, UrlResolver urlResolver, ServiceAccessor <HttpContextBase> httpContextAccessor, ShipmentViewModelFactory shipmentViewModelFactory, ICustomerService customerService, IOrganizationService organizationService, IBudgetService budgetService, CustomerContextFacade customerContext) { _localizationService = localizationService; _paymentMethodViewModelFactory = paymentMethodViewModelFactory; _addressBookService = addressBookService; _contentLoader = contentLoader; _orderGroupFactory = orderGroupFactory; _urlResolver = urlResolver; _httpContextAccessor = httpContextAccessor; _shipmentViewModelFactory = shipmentViewModelFactory; _customerService = customerService; _budgetService = budgetService; _organizationService = organizationService; _customerContext = customerContext; }
public AccountsController(IEmployeeService empService, IExpenseReportService rptService, Employee employee,IBudgetService budget) { employeeService = empService; reportService = rptService; this.employee = employee; budgetTracker = budget; }
public ProjectionsModel(IBudgetService budgetsService) { this.budgetsService = budgetsService; this.FromMonth = DateTime.Now.ToMonthStart(); this.ToMonth = this.FromMonth.AddMonths(6); this.Projections = new List <MonthProjection>(); }
public BudgetController(IFinancialPlannerRepository financialPlannerRepository, IBudgetService budgetService, ISetViewModelsService setViewModelsService) { FinancialPlannerRepository = financialPlannerRepository; BudgetService = budgetService; SetViewModelsService = setViewModelsService; }
public SupervisorController(IEmployeeService empService, IExpenseReportService rptService, Employee employee,IBudgetService budget) { employeeService = empService; reportService = rptService; this.employee = employee; deptBudget = budget; }
public SupervisorController() { reportService = new ExpenseReportService(); employeeService = new EmployeeService(); employee = employeeService.GetEmployee((int)Membership.GetUser().ProviderUserKey); deptBudget = new DepartmentBudgetService(employee.Department); deptBudget.SetBudgetSpent(TODAY.Month, TODAY.Year); }
public CategoryController(ILogger <ExpenseController> logger, UserManager <ApplicationUser> userManager, IBudgetService budgetSerivce, IMainCService mainCService, IDetailedCService detailedCService) { _logger = logger; _userManager = userManager; _budgetService = budgetSerivce; _mainCService = mainCService; _detailedCService = detailedCService; }
public AccountsController() { reportService = new ExpenseReportService(); employeeService = new EmployeeService(); config = new ConfigurationDAL(); budgetTracker = new CompanyBudgetService(decimal.Parse((string)config.GetAppSetting(COMPANY_BUDGET_KEY))); employee = employeeService.GetEmployee((int)Membership.GetUser().ProviderUserKey); }
public BudgetPlannerTowManagerMock(IBudgetPlanTowService budgetPlanTowService = null, IBudgetService budgetService = null, IMappingEngine mapper = null) : base(budgetPlanTowService, budgetService, mapper) { }
public AddEditBudgetPresenter(IAddEditBudgetView view, IBudgetService budgetService, IAccountService accountService, ICategoryService categoryService) { _view = view; _budgetService = budgetService; _accountService = accountService; _categoryService = categoryService; }
//DI in action public DataController(IAccountService AccService, IBudgetService BudgetService, IHouseholdService HouseholdService, ISecurityService SecurityService, ILoggingService LoggingService) { _accService = AccService ?? throw new ArgumentNullException(nameof(AccService)); _budgetService = BudgetService ?? throw new ArgumentNullException(nameof(BudgetService)); _hhService = HouseholdService ?? throw new ArgumentNullException(nameof(HouseholdService)); _securityService = SecurityService ?? throw new ArgumentNullException(nameof(SecurityService)); _logService = LoggingService ?? throw new ArgumentNullException(nameof(LoggingService)); }
public DeliverableControllerMock(IUserService userService = null, ILogService loggerService = null, IDeliverableService deliverableService = null, IProductService productService = null, IPropertyService propertyService = null, IIntergrationService _intergrationService = null, IBudgetService _iBudgetService = null, ITrackApprovalService iTrackApprovalService = null, IImageService imageService = null, IApprovalService approvalService = null, IInternationalService internationalService = null) : base(userService, loggerService, deliverableService, productService, propertyService, _intergrationService, _iBudgetService, iTrackApprovalService, imageService, approvalService, internationalService) { }
public BudgetController(IMapper mapper, IUriService uriService, IIdentityService identityService, IBudgetService budgetService, IPeriodService periodService) { _mapper = mapper; _identityService = identityService; _uriService = uriService; _budgetService = budgetService; _periodService = periodService; }
public BudgetController(IBudgetService budgetService) { if (budgetService == null) { throw new ArgumentNullException(nameof(budgetService)); } _budgetService = budgetService; }
public DebtController(IMapper mapper, IUriService uriService, IIdentityService identityService, IBudgetService budgetService, IDebtService debtService, IDebtPaymentService debtPaymentService) { _mapper = mapper; _uriService = uriService; _identityService = identityService; _budgetService = budgetService; _debtService = debtService; _debtPaymentService = debtPaymentService; }
public MasterBudgetController(IPermissionService permissionService, IBudgetService budgetService, ICurrencyService currencyService, IMasterBudgetService masterBudgetService, IProjectService projectService, IUserContext userContext) : base(userContext, permissionService) { this.budgetService = budgetService; this.currencyService = currencyService; this.masterBudgetService = masterBudgetService; this.projectService = projectService; }
public BudgetController( IBudgetService budgetService, IExpenseCategoryService expenseCategoryService, UserManager <AppUser> userManager) { _budgetService = budgetService; _expenseCategoryService = expenseCategoryService; _userManager = userManager; }
public BudgetDetailsViewModelFactory( ILoggerFactory loggerFactory, IBudgetService budgetService, IBudgetTransactionListViewModelFactory budgetTransactionListViewModelFactory) { m_loggerFactory = loggerFactory; m_budgetService = budgetService; m_budgetTransactionListViewModelFactory = budgetTransactionListViewModelFactory; }
public void CreateTest_should_create_new_budget() { _service = new BudgetService(_budgetRepository); _service.Create(new BudgetAddViewModel() { Amount = 1000, Month = "2017/01" }); _budgetRepository.Received().Save(Arg.Is <Budgets>(x => x.Amount == 1000 && x.YearMonth == "2017/01")); }
public CreditController(IMapper mapper, IUriService uriService, IIdentityService identityService, IBudgetService budgetService, ICreditService creditService, ICreditPaymentService creditPaymentService) { _mapper = mapper; _uriService = uriService; _identityService = identityService; _budgetService = budgetService; _creditService = creditService; _creditPaymentService = creditPaymentService; }
public ProjectBudgetController(IBudgetService budSvc, IProjectService _projectService, ICurrencyService currencyService, IExchangeRateService exchangeRateService, IUserContext userContext) : base(userContext) { this.budSvc = budSvc; this.projectService = _projectService; this.currencyService = currencyService; this.exchangeRateService = exchangeRateService; }
public BudgetCreateViewModel( ILoggerFactory loggerFactory, IBudgetService budgetService, IBudgetTransactionListViewModelFactory budgetTransactionListViewModelFactory) : base(budgetService, budgetTransactionListViewModelFactory, 0) { m_logger = loggerFactory.CreateLogger <BudgetCreateViewModel>(); Name = "New Budget"; SelectedPeriod = BudgetPeriod.Fortnightly; }
public OrganizationController(IOrganizationService organizationService, IAddressBookService addressService, IBudgetService budgetService, ISettingsService settingsService) { _organizationService = organizationService; _addressService = addressService; _budgetService = budgetService; _settingsService = settingsService; }
public TransactionsController(IBudgetService budgetService, IMapper mapper, ILogger <BudgetsController> logger, UserManager <Infrastructure.Entities.BudgetUser> userManager, IRepository <Infrastructure.Entities.Transaction> transactionRepository, IRepository <Infrastructure.Entities.Budget> budgetRepository) { _budgetService = budgetService; _mapper = mapper; _logger = logger; _userManager = userManager; _transactionRepository = transactionRepository; _budgetRepository = budgetRepository; }
public void IntializeDepartmentService() { IBudgetDAL budgetDAL = new MockBudgetDAL(); department = new Department(); department.DepartmentId = 1; department.DepartmentName = "Test Department"; department.MonthlyBudget = 10000; deptBudgetService = new DepartmentBudgetService(department,budgetDAL); }
public void IntializeCompanyBudgetService() { IBudgetDAL budgetDAL = new MockBudgetDAL(); department = new Department(); department.DepartmentId = 1; department.DepartmentName = "Test Department"; department.MonthlyBudget = 10000; companyBudgetService = new CompanyBudgetService(30000, budgetDAL); }
public RegisterModel( UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, ILogger <RegisterModel> logger, IEmailSender emailSender, IBudgetService budgetService) { _userManager = userManager; _signInManager = signInManager; _logger = logger; _emailSender = emailSender; this.budgetService = budgetService; }
public BudgetController(IPermissionService permissionService, IBudgetService budgetService, IProjectService projectService, IMasterBudgetService masterBudgetService, IExchangeRateService exchangeRateService, IStaffService staffService, IUserContext userContext, ICurrencyService currencyService, IOrderRequest orderRequestService) : base(userContext, permissionService) { this.budgetService = budgetService; this.masterBudgetService = masterBudgetService; this.projectService = projectService; this.exchangeRateService = exchangeRateService; this.staffService = staffService; this.currencyService = currencyService; this.orderRequestService = orderRequestService; }
public ExpensesCategoryController( IExpenseCategoryService expenseCategoryService, ExpenseTrackerDbContext context, ILogger <ExpensesCategoryController> logger, UserManager <AppUser> userManager, IBudgetService budgetService) { _expenseCategoryService = expenseCategoryService; _context = context; _logger = logger; _userManager = userManager; _budgetService = budgetService; }
public PaydayEventStartViewModel( ILoggerFactory loggerFactory, IBudgetService budgetService, int budgetId) { m_logger = loggerFactory.CreateLogger <PaydayEventStartViewModel>(); m_budgetService = budgetService; Budget budget = m_budgetService.Get(budgetId); AmountPaid = budget.InitialTransaction.Amount; At = DateTime.Now; }
public BudgetEditViewModel( ILoggerFactory loggerFactory, IBudgetService budgetService, IBudgetTransactionListViewModelFactory budgetTransactionListViewModelFactory, int budgetId) : base(budgetService, budgetTransactionListViewModelFactory, budgetId) { m_logger = loggerFactory.CreateLogger <BudgetEditViewModel>(); Budget budget = m_budgetService.Get(m_budgetId); Name = budget.Name; SelectedPeriod = budget.Period; }
public BudgetDetailsBaseViewModel( IBudgetService budgetService, IBudgetTransactionListViewModelFactory budgetTransactionListViewModelFactory, int budgetId) { m_budgetService = budgetService; m_budgetTransactionListViewModelFactory = budgetTransactionListViewModelFactory; m_budgetId = budgetId; Periods = Enum.GetValues(typeof(BudgetPeriod)).Cast <BudgetPeriod>(); TransactionListViewModel = m_budgetTransactionListViewModelFactory.Create(m_budgetId); }
public OrderRequestController(IPermissionService permissionService, IOrderRequest orderRequestService, IUserContext userContext, INotificationService notificationService, ILocationService locationService, IItemService itemService, IProcurementPlanService ppService, IExchangeRateService exchangeRateService, ICurrencyService currencyService, IBudgetService budgetService) : base(userContext, permissionService) { this.orderRequestService = orderRequestService; this.notificationService = notificationService; this.locationService = locationService; this.itemService = itemService; this.ppService = ppService; this.exchangeRateService = exchangeRateService; this.currencyService = currencyService; this.budgetService = budgetService; }
public ExpensesController( IExpenseService expenseService, IViewRenderService viewRenderService, IBudgetService budgetService, IEmailService emailService, IExpenseCategoryService expenseCategoryService, UserManager <AppUser> userManager) { _emailService = emailService; _expenseCategoryService = expenseCategoryService; _expenseService = expenseService; _budgetService = budgetService; _userManager = userManager; }
public BudgetTransactionListViewModelFactory( ILoggerFactory loggerFactory, IAccountService accountService, IBudgetService budgetService, IAccountLinkViewModelFactory accountLinkViewModelFactory, IBudgetTransactionItemViewModelFactory budgetTransactionItemViewModelFactory, IDeleteConfirmationViewService deleteConfirmationViewService) { m_loggerFactory = loggerFactory; m_accountService = accountService; m_budgetService = budgetService; m_accountLinkViewModelFactory = accountLinkViewModelFactory; m_budgetTransactionItemViewModelFactory = budgetTransactionItemViewModelFactory; m_deleteConfirmationViewService = deleteConfirmationViewService; }
public BudgetController(IBudgetFactory factory, IRepository<BudgetTemplate> templateRepository, IBudgetService budgetService) { _factory = factory; _templateRepository = templateRepository; _budgetService = budgetService; }
public BudgetListingPresenter(IBudgetListingView view, IBudgetService budgetService) { _view = view; _budgetService = budgetService; }
public BudgetController(IBudgetService budgetService) { _budgetService = budgetService; }
public MainWindowController(IBudgetService service) { _service = service; }
public ResultReport(IResultService resultService, IBudgetService budgetService, IAccountInfoService accountInfoService) { _resultService = resultService; _accountInfoService = accountInfoService; _budgetService = budgetService; }
public PdfGenerator(IResultService resultService, IBudgetService budgetService, IAccountInfoService accountInfoService) { _resultService = resultService; _accountInfoService = accountInfoService; _budgetService = budgetService; }