public CostController(ILogRepository repoLog, IExpenseRepository repoExpense, IRentRepository repoRent, IInvoiceRepository repoInvoice) : base(repoLog) { RepoExpense = repoExpense; RepoRent = repoRent; RepoInvoice = repoInvoice; }
public PosPaymentOrchestration(IExpenseRepository expenseRepository, ExpenseService expenseService, IExpenseRecipientRepository expenseRecipientRepository, ExpenseRecipientService expenseRecipientService) { _expenseRepository = expenseRepository; _expenseService = expenseService; _expenseRecipientRepository = expenseRecipientRepository; _expenseRecipientService = expenseRecipientService; }
public ExpensesController(ICommonRepository commonRepo, IExpenseRepository expenseRepo, IMapper mapper) { _commonRepo = commonRepo; _expenseRepo = expenseRepo; _mapper = mapper; }
public void ExpenseUpdateTest() { Expense expense = null; using (var lifetime = container.BeginLifetimeScope()) { IExpenseRepository expenseRepository = lifetime.Resolve <IExpenseRepository>(); DefaultCommandBus commandBus = lifetime.Resolve <DefaultCommandBus>(); IMappingEngine mapper = lifetime.Resolve <IMappingEngine>(); expense = expenseRepository.Get(c => c.Amount == 120); Assert.IsNotNull(expense, "Error: Expense was not found"); expense.Amount = 150; } using (var lifetime = container.BeginLifetimeScope()) { IExpenseRepository expenseRepository = lifetime.Resolve <IExpenseRepository>(); DefaultCommandBus commandBus = lifetime.Resolve <DefaultCommandBus>(); IMappingEngine mapper = lifetime.Resolve <IMappingEngine>(); CreateOrUpdateExpenseCommand command = mapper.Map <CreateOrUpdateExpenseCommand>(expense); ICommandHandler <CreateOrUpdateExpenseCommand> commnadHandler = lifetime.Resolve <ICommandHandler <CreateOrUpdateExpenseCommand> >(); ICommandResult result = commandBus.Submit(command, commnadHandler); Assert.IsNotNull(result, "Error: Expense was not updated"); Assert.IsTrue(result.Success, "Error: Expense was not updated"); } }
public async Task <Message> Execute(Message message, TelegramBotClient client, IExpenseRepository expenseRepository, IUserAccountRepository userAccountRepository, ICategoryRepository categoryRepository) { var chatId = message.Chat.Id; var messageId = message.MessageId; expenseRepository.AddExpense(new Expense { UserAccount = userAccountRepository.Accounts.FirstOrDefault(), ExpenseId = 1, ExpenseDateTime = DateTime.Now, Category = categoryRepository.Categories.FirstOrDefault(), Amount = 13m, Description = "just two Expense" }); var tempStr = string.Format(SimpleTxtResponse.ExpenseTemplate, expenseRepository.Expenses.FirstOrDefault().Amount, expenseRepository.Expenses.FirstOrDefault().Category.CategoryName, expenseRepository.Expenses.FirstOrDefault().Description, "/del1"); var outStr = string.Format(SimpleTxtResponse.LastExpenses, tempStr); //TODO: Telegram.Bot.Exceptions.ApiRequestException return(await client.SendTextMessageAsync(chatId, outStr)); }
public static async Task SeedUsers(UserManager <User> userManager, RoleManager <Role> roleManager, IWalletRepository WalletRepository, IExpenseRepository expenseRepository, IUserInfoRepository userInfoRepository, ITopicRepository topicRepository) { if (!userManager.Users.Any()) { var user = new User() { UserName = "******", Email = "*****@*****.**", EmailConfirmed = true }; await userManager.CreateAsync(user, "123456qwerty123"); var IR = await EnsureRole(userManager, roleManager, user.Id.ToString(), "admin"); if (IR.Succeeded) { await SeedWallets(user.Id, WalletRepository); await SeedTopics(user.Id, topicRepository); await SeedExpenses(user.Id, expenseRepository); await SeedUserInfo(user.Id, userInfoRepository); } } }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public MainViewModel(IExpenseRepository expenseRepository, IProgressService progressService, INavigationService navigationService) { _expenseRepository = expenseRepository; _progressService = progressService; _navigationService = navigationService; _refreshCommand = new RelayCommand(Refresh, () => CanRefresh); _addExpenseCommand = new RelayCommand(AddExpense, () => CanAddExpense); _removeExpense = new RelayCommand <ExpenseModel>(RemoveExpense); _save = new RelayCommand <ExpenseModel>(Save); if (IsInDesignMode) { ExpenseCollections = expenseRepository.GetExampleCollections(); ActiveCollection = ExpenseCollections[0]; NewExpenseDescription = "my description is longer than the place avaliable"; NewExpenseAmount = 5.2; NewExpenseDate = DateTime.Now; } else { Initialize(); SetExpenseDefaults(); } _removeExpenseCollection = new RelayCommand <ExpenseCollectionModel>(RemoveExpenseCollection, CanRemoveExpenseCollection); _saveExpenseCollection = new RelayCommand <ExpenseCollectionModel>(SaveExpenseCollection, CanSaveExpenseCollection); _addExpenseCollectionCommand = new RelayCommand(AddExpenseCollection, () => CanAddExpenseCollection); _useExpenseAsTemplateCommand = new RelayCommand <ExpenseModel>(UseExpenseAsTemplate); Messenger.Default.Register <ExpenseCollectionModel>(this, Messages.Select, EvaluateSelectMessage); }
public ExpenseController(ICommandBus commandBus, IMappingEngine mapper, ICategoryRepository categoryRepository, IExpenseRepository expenseRepository) { this.commandBus = commandBus; this.mapper = mapper; this.categoryRepository = categoryRepository; this.expenseRepository = expenseRepository; }
public ExpenseController(IExpenseItemRepository expenseitem, IExpenseRepository expense, IExpenseHistoryRepository expensehistory) { ExpenseRepository = expense; expenseItemRepository = expenseitem; ExpenseHistoryRepository = expensehistory; }
public HomeService(IInformationRepository informationRepository, IUserRepository userRepository, IUserInformationRepository userInformationRepository, IConfiguration config, IMailService mailService, IHomeRepository homeRepository, IFCMService fcmService, IFriendshipRepository friendshipRepository, IShoppingListRepository shoppingListRepository, INotepadRepository notepadRepository, IExpenseRepository expenseRepository, IUserExpenseRepository userExpenseRepository) { _informationRepository = informationRepository; _userRepository = userRepository; _userInformationRepository = userInformationRepository; _config = config; _mailService = mailService; _homeRepository = homeRepository; _fcmService = fcmService; _friendshipRepository = friendshipRepository; _shoppingListRepository = shoppingListRepository; _notepadRepository = notepadRepository; _expenseRepository = expenseRepository; _userExpenseRepository = userExpenseRepository; }
public DriverAllowanceService(IDriverAllowanceRepository driverAllowanceRepository, IUnitOfWork unitOfWork, IDispatchRepository dispatchRepository, ICustomerRepository customerRepository, ILocationRepository locationRepository, IContainerTypeRepository containerTypeRepository, IAllowanceDetailRepository allowanceDetailRepository, IExpenseRepository _expenseRepository, IOrderRepository orderHRespository, IContainerRepository orderDRepository, IOrderRepository orderHRepository, IDepartmentRepository departmentRepository, ITextResourceRepository textResourceRepository) { this._driverAllowanceRepository = driverAllowanceRepository; this._customerRepository = customerRepository; this._locationRepository = locationRepository; this._containerTypeRepository = containerTypeRepository; this._unitOfWork = unitOfWork; this._dispatchRepository = dispatchRepository; this._allowanceDetailRepository = allowanceDetailRepository; this._expenseRepository = _expenseRepository; this._orderDRepository = orderDRepository; this._orderHRepository = orderHRepository; this._departmentRepository = departmentRepository; this._textResourceRepository = textResourceRepository; }
public ExpenseController(IExpenseRepository expenseRepository, IRegularRepository regularRepository, IAccountancyRepository accountancyRepository) { _expenseRepository = expenseRepository; _regularRepository = regularRepository; _accountancyRepository = accountancyRepository; }
public ExpenseService(ApplicationDbContext context, IExpenseRepository expenseRepository, ICarRepository carRepository, IMapper mapper) { _expenseRepository = expenseRepository; _carRepository = carRepository; _context = context; _mapper = mapper; }
public MainWindowViewModel() { // TODO: There might be a better way to do this. this.NavigationService = ServiceLocator.Current.GetService <INavigationService>() as NavigationService; this.Repository = ServiceLocator.Current.GetService <IExpenseRepository>(); this.ViewService = ServiceLocator.Current.GetService <IViewService>(); this.ViewService.BusyChanged += ViewService_BusyChanged; this.EmployeeViewModel = ServiceLocator.Current.GetService <EmployeeViewModel>(); this.LogInViewModel = new LogInControlViewModel(this, new RelayCommand(async(_) => await this.LogInAsync())); //NOTE: Automatically logging in hardcoded alias for now this.LogInViewModel.LogInCommand.Execute(this); this.NewChargeCommand = new RelayCommand((_) => this.NewCharge()); this.ShowChargesCommand = new RelayCommand(async(_) => await this.ShowChargesAsync()); this.ShowSavedReportsCommand = new RelayCommand(async(_) => await this.ShowSavedReportsAsync()); this.ShowPendingReportsCommand = new RelayCommand(async(_) => await this.ShowPendingReportsAsync()); this.ShowPastReportsCommand = new RelayCommand(async(_) => await this.ShowPastReportsAsync()); this.ResetDataCommand = new RelayCommand(async(_) => await this.ResetDataAsync()); this.NewReportCommand = new RelayCommand((_) => this.NewReport()); this.ApproveReportsCommand = new RelayCommand(async(_) => await this.ShowReportsForApprovalAsync()); this.SummaryViewCommand = new RelayCommand(async(_) => await this.ShowSummaryViewAsync()); this.NavigationService.ShowChargeRequested += (_, ea) => { this.ShowCharge(ea.Data); }; this.NavigationService.ShowChargesRequested += async(_, __) => { await this.ShowChargesAsync(); }; this.NavigationService.ShowExpenseReportRequested += (_, ea) => { this.ShowExpenseReportAsync(ea.Data); }; this.NavigationService.ShowPastExpenseReportsRequested += async(_, __) => { await this.ShowPastReportsAsync(); }; this.NavigationService.ShowPendingExpenseReportsRequested += async(_, __) => { await this.ShowPendingReportsAsync(); }; this.NavigationService.ShowSavedExpenseReportsRequested += async(_, __) => { await this.ShowSavedReportsAsync(); }; //this.ShowLogin = true; }
public CompanyService(ICompanyRepository companyRepository, IExpenseRepository expenseRepository, IProfitRepository profitRepository, IUnitOfWork unitOfWork) { _companyRepository = companyRepository; _expenseRepository = expenseRepository; _profitRepository = profitRepository; _unitOfWork = unitOfWork; }
public Calculation(IExpenseRepository expenseRepository, ITableRepository tableRepository, ICalculationMethod calculationMethod, IOptymizer optymizer) { this.tableRepository = tableRepository; this.calculationMethod = calculationMethod; this.optymizer = optymizer; this.expenseRepository = expenseRepository; }
// // GET: /Member/ public BankBalanceController(IBankAccountRepository BankaccountParam, IConstantRepository ConstantParam, IBankBalanceRepository BankBalanceParam, IIncomeRepository IncomeParam, IExpenseRepository ExpenseParam) { BankAccountRepository = BankaccountParam; ConstantRepository = ConstantParam; BankBalanceRepository = BankBalanceParam; IncomeRepository = IncomeParam; ExpenseRepository = ExpenseParam; ViewBag.Supervisor = false; int memberID = Convert.ToInt16(System.Web.HttpContext.Current.Session["personID"]); if (memberID > 0) { if (MembershipRepositroy.IsUser(memberID)) { user user = MembershipRepositroy.GetUserByID(memberID); if ((user.role.Name == "WebMaster") || (user.role.Name == "Pastor") || (user.role.Name == "Admin") || (user.role.Name == "FinanceLead")) //creator access { ViewBag.Supervisor = true; } if (user.role.Name == "WebMaster") //creator access { ViewBag.WebMaster = true; } if (user.role.Name == "FinanceStaff") //creator access { ViewBag.Supervisor2 = true; } } } }
/// <summary> /// Constructor /// </summary> /// <param name="expenseRepository">IExpenseRepository dependency</param> /// <param name="securityHelper">ISecurityHelper dependency</param> /// <param name="notificationChannelRepository">INotificationChannelRepository dependency.</param> /// <param name="notificationService">notificationService dependency</param> public ExpensesController(IExpenseRepository expenseRepository, ISecurityHelper securityHelper, INotificationChannelRepository notificationChannelRepository, INotificationService notificationService) { if (expenseRepository == null) { throw new ArgumentNullException("expenseRepository"); } if (securityHelper == null) { throw new ArgumentNullException("securityHelper"); } if (notificationService == null) { throw new ArgumentNullException("notificationService"); } if (notificationChannelRepository == null) { throw new ArgumentNullException("notificationChannelRepository"); } _expenseRepository = expenseRepository; _securityHelper = securityHelper; _notificationChannelRepository = notificationChannelRepository; _notificationService = notificationService; }
public ExpensesController(IExpenseRepository repository, ICategoryRepository categoryRepository, UserManager <IdentityUser> userManager, IChartService service) { _repository = repository; _userManager = userManager; _categoryRepository = categoryRepository; _service = service; }
public ExpenseReportViewModel() { this._repository = ServiceLocator.Current.GetService <IExpenseRepository>(); this._employeeViewModel = ServiceLocator.Current.GetService <EmployeeViewModel>(); this.NavigationService = ServiceLocator.Current.GetService <INavigationService>(); this.ViewService = ServiceLocator.Current.GetService <IViewService>(); employeeId = this._employeeViewModel.EmployeeId; employeeName = this._employeeViewModel.Name; approver = this._employeeViewModel.Manager; costCenter = 50992; purpose = string.Empty; this.SaveReportCommand = new RelayCommand( async(_) => { await this.SaveAsync(); }); this.DeleteReportCommand = new RelayCommand( async(_) => { await this.DeleteAsync(); }); this.SubmitReportCommand = new RelayCommand( async(_) => { await this.SubmitAsync(); }); }
public ExpenseController(ILogger <ExpenseController> logger, IUserRepository userRepository, IExpenseRepository expenseRepository, IExpenseNameRepository expenseNameRepository) { _logger = logger; _userRepository = userRepository; _expenseRepository = expenseRepository; _expenseNameRepository = expenseNameRepository; }
public ExpensesController( IExpenseRepository expenseRepository, ILogFactory logFactory) { logger = logFactory.GetLogger <ExpensesController>(); _expenseRepository = expenseRepository; }
public ManagerController(IExpenseRepository repo, IExpenseItemRepository item, IExpenseHistoryRepository historyrepo) { HistoryRepository = historyrepo; repository = repo; itemrepo = item; }
public DriverReportController(ILogRepository repoLog, IExpenseRepository repoExpense, IDriverRepository repoDriver, IRentRepository repoRent) : base(repoLog) { RepoExpense = repoExpense; RepoDriver = repoDriver; RepoRent = repoRent; }
public ExpenseService() { if (Repository == null) { Repository = new ExpenseRepository(); } }
public CreateExpenseHandler(IExpenseRepository expenseRepository, IMapper mapper, IUnitOfWorkRepository unitOfWorkRepository) { _mapper = mapper; _unitOfWorkRepository = unitOfWorkRepository; _expenseRepository = expenseRepository; }
public BankTransferOrchestration(IExpenseRepository expenseRepository, ExpenseService expenseService, ISavingsTransactionRepository savingsTransactionRepository, SavingsService savingsService) { _expenseRepository = expenseRepository; _expenseService = expenseService; _savingsTransactionRepository = savingsTransactionRepository; _savingsService = savingsService; }
public ChargeViewModel() { this._repository = ServiceLocator.Current.GetService <IExpenseRepository>(); this._viewService = ServiceLocator.Current.GetService <IViewService>(); this.NavigationService = ServiceLocator.Current.GetService <INavigationService>(); this.ViewService = ServiceLocator.Current.GetService <IViewService>(); this.DeleteChargeCommand = new RelayCommand( async(_) => { if (!(await this._viewService.ConfirmAsync("Delete Charge", "Are you sure you want to delete this charge?"))) { return; } this.Delete(); this.NavigationService.ShowCharges(); }); this.SaveChargeCommand = new RelayCommand( (_) => { this.Save(); this.NavigationService.ShowCharges(); }); this.CancelCommand = new RelayCommand( (_) => { this.NavigationService.ShowCharges(); }); }
public ExpenseReportsViewModel() { this.EmployeeViewModel = ServiceLocator.Current.GetService <EmployeeViewModel>(); this.NavigationService = ServiceLocator.Current.GetService <INavigationService>(); this._repository = ServiceLocator.Current.GetService <IExpenseRepository>(); this.ViewService = ServiceLocator.Current.GetService <IViewService>(); this._expenseReports = new ObservableCollection <ExpenseReportViewModel>(); this._groupedExpenseReports = new ObservableCollection <GroupInfoList <object> >(); this.SortTypes = new ObservableCollection <SortType>(); this.SortTypes.Add(SortType.Age); this.SortTypes.Add(SortType.Amount); this.ViewReportCommand = new RelayCommand( (report) => { this.ViewReport(report as ExpenseReportViewModel); }); this.NewReportCommand = new RelayCommand( o => { NavigationService.CreateNewReport(); }); this.ApproveReportCommand = new RelayCommand( async(report) => { await this.ApproveExpenseReportAsync(report as ExpenseReportViewModel); this.LoadReportsForApproval(); }); this._viewService = ServiceLocator.Current.GetService <IViewService>(); }
public ExpenseService(IMapper mapper, IBudgetRepository budgetRepo, IExpenseRepository expenseRepo, IDetailedCategoryRepository detailedCRepo) { _mapper = mapper; _budgetRepo = budgetRepo; _expenseRepo = expenseRepo; _detailedCRepo = detailedCRepo; }
public CowTransactionBusinessLogic(ICowTransactionRepository repo, IUserRepository userRepo, ICowRepository cowRepo, IIncomeRepository incomeRepo, IExpenseRepository expenseRepo) { _repo = repo; _userRepo = userRepo; _cowRepo = cowRepo; _incomeRepo = incomeRepo; _expenseRepo = expenseRepo; }
public ExpenseEntityForm(IExpenseRepository expenseRepository, IExpenseCategoryRepository expenseCategoryRepository) { _expenseRepository = expenseRepository; _expenseCategoryRepository = expenseCategoryRepository; InitializeComponent(); this.Load += ExpenseEntityForm_Load; PopulateExpenseCategoryCombo(); }
public ExpensesService(IExpenseRepository expenseRepository) { _expenseRepository = expenseRepository; }
public ChargeViewModel() { this._repository = ServiceLocator.Current.GetService<IExpenseRepository>(); this.NavigationService = ServiceLocator.Current.GetService<INavigationService>(); this.ViewService = ServiceLocator.Current.GetService<IViewService>(); this.DeleteChargeCommand = new RelayCommand( async (_) => { if (!(await this.ViewService.ConfirmAsync("Delete Charge", "Are you sure you want to delete this charge?"))) { return; } await this.DeleteAsync(); this.NavigationService.ShowCharges(); }); this.SaveChargeCommand = new RelayCommand( async (_) => { await this.SaveAsync(); this.NavigationService.ShowCharges(); }); this.CancelCommand = new RelayCommand( (_) => { this.NavigationService.ShowCharges(); }); }
public SummaryItemsViewModel(EmployeeViewModel employeeViewModel) { this._employeeViewModel = employeeViewModel; this._repository = ServiceLocator.Current.GetService<IExpenseRepository>(); this.GroupedSummaryItems = new ObservableCollection<GroupInfoList<object>>(); this.SortTypes = new ObservableCollection<SortType>(); this.SortTypes.Add(SortType.Age); this.SortTypes.Add(SortType.Amount); }
public ExpenseService(IExpenseRepository repo, IAuctionTransactionFactory factory) { _repo = repo; _factory = factory; }
public ExpenseController(ICommandBus commandBus, ICategoryRepository categoryRepository, IExpenseRepository expenseRepository) { this.commandBus = commandBus; this.categoryRepository = categoryRepository; this.expenseRepository = expenseRepository; }
public ClaimController() { this.repository = new ExpenseRepository(); }
public ExpenseReportsViewModel() { this.EmployeeViewModel = ServiceLocator.Current.GetService<EmployeeViewModel>(); this.NavigationService = ServiceLocator.Current.GetService<INavigationService>(); this._repository = ServiceLocator.Current.GetService<IExpenseRepository>(); this.ViewService = ServiceLocator.Current.GetService<IViewService>(); this._expenseReports = new ObservableCollection<ExpenseReportViewModel>(); this._groupedExpenseReports = new ObservableCollection<GroupInfoList<object>>(); this.SortTypes = new ObservableCollection<SortType>(); this.SortTypes.Add(SortType.Age); this.SortTypes.Add(SortType.Amount); this.ViewReportCommand = new RelayCommand( (report) => { this.ViewReport(report as ExpenseReportViewModel); }); }
public ExpenseService(IExpenseRepository _expenseRepository) { expenseRepository = _expenseRepository; }
public ExpenseReportViewModel() { this._repository = ServiceLocator.Current.GetService<IExpenseRepository>(); this._employeeViewModel = ServiceLocator.Current.GetService<EmployeeViewModel>(); this.NavigationService = ServiceLocator.Current.GetService<INavigationService>(); this.ViewService = ServiceLocator.Current.GetService<IViewService>(); employeeId = this._employeeViewModel.EmployeeId; employeeName = this._employeeViewModel.Name; approver = this._employeeViewModel.Manager; costCenter = 50992; purpose = string.Empty; this.SaveReportCommand = new RelayCommand( async (_) => { await this.SaveAsync(); }); this.DeleteReportCommand = new RelayCommand( async (_) => { await this.DeleteAsync(); }); this.SubmitReportCommand = new RelayCommand( async (_) => { await this.SubmitAsync(); }); }
public ExpensesActionView(IExpenseRepository expenseRepository, IExpenseCategoryRepository expenseCategoryRepository) { _expenseRepository = expenseRepository; _expenseCategoryRepository = expenseCategoryRepository; }
public ExpenseController() { this.expenseRepo = new ExpenseRepository(new CompanyContext()); this.projectRepo = new ProjectRepository(new CompanyContext()); }
public ReceiptController() { this.repository = new ExpenseRepository(); }
public MainWindowViewModel() { // TODO: There might be a better way to do this. this.NavigationService = ServiceLocator.Current.GetService<INavigationService>() as NavigationService; this.Repository = ServiceLocator.Current.GetService<IExpenseRepository>(); this.ViewService = ServiceLocator.Current.GetService<IViewService>(); this.ViewService.BusyChanged += ViewService_BusyChanged; this.EmployeeViewModel = ServiceLocator.Current.GetService<EmployeeViewModel>(); this.LogInViewModel = new LogInControlViewModel(this, new RelayCommand(async (_) => await this.LogInAsync())); //NOTE: Automatically logging in hardcoded alias for now this.LogInViewModel.LogInCommand.Execute(this); this.NewChargeCommand = new RelayCommand((_) => this.NewCharge()); this.ShowChargesCommand = new RelayCommand(async (_) => await this.ShowChargesAsync()); this.ShowSavedReportsCommand = new RelayCommand(async (_) => await this.ShowSavedReportsAsync()); this.ShowPendingReportsCommand = new RelayCommand(async (_) => await this.ShowPendingReportsAsync()); this.ShowPastReportsCommand = new RelayCommand(async (_) => await this.ShowPastReportsAsync()); this.ResetDataCommand = new RelayCommand(async (_) => await this.ResetDataAsync()); this.NewReportCommand = new RelayCommand((_) => this.NewReport()); this.ApproveReportsCommand = new RelayCommand(async (_) => await this.ShowReportsForApprovalAsync()); this.SummaryViewCommand = new RelayCommand(async (_) => await this.ShowSummaryViewAsync()); this.NavigationService.ShowChargeRequested += (_, ea) => { this.ShowCharge(ea.Data); }; this.NavigationService.ShowChargesRequested += async (_, __) => { await this.ShowChargesAsync(); }; this.NavigationService.ShowExpenseReportRequested += (_, ea) => { this.ShowExpenseReportAsync(ea.Data); }; this.NavigationService.ShowPastExpenseReportsRequested += async (_, __) => { await this.ShowPastReportsAsync(); }; this.NavigationService.ShowPendingExpenseReportsRequested += async (_, __) => { await this.ShowPendingReportsAsync(); }; this.NavigationService.ShowSavedExpenseReportsRequested += async (_, __) => { await this.ShowSavedReportsAsync(); }; //this.ShowLogin = true; }
public ChargesViewModel() { this.EmployeeViewModel = ServiceLocator.Current.GetService<EmployeeViewModel>(); this.NavigationService = ServiceLocator.Current.GetService<INavigationService>(); this._repository = ServiceLocator.Current.GetService<IExpenseRepository>(); this.ViewService = ServiceLocator.Current.GetService<IViewService>(); this.GroupedCharges = new ObservableCollection<GroupInfoList<object>>(); this.SortTypes = new ObservableCollection<SortType>(); this.SortTypes.Add(SortType.Age); this.SortTypes.Add(SortType.Amount); this.ViewChargeCommand = new RelayCommand( (charge) => { this.ViewCharge(charge as ChargeViewModel); }); this.ChargesSelectionChangedCommand = new RelayCommand( (selectionChange) => { this.ChargesSelectionChanged(selectionChange); }); }
public ExpenseBusinessLogic(IExpenseRepository expenseRepo, IExpenseTypeRepository typeRepo, IUserRepository userRepository) { _expenseRepo = expenseRepo; _typeRepo = typeRepo; _userRepository = userRepository; }
public ExpenseService() { _expenseRepository = DependencyService.Get<IExpenseRepository>(); }