public DataViewUI() { InitializeComponent(); _dataContext = new AccountingDataContext(); _expenseService = new ExpenseService(new ExpenseRepository(_dataContext)); _incomeService = new IncomeService(new IncomeRepository(_dataContext)); }
/// <summary> /// Ctor that also sets the data member of the month being viewed /// with the value given /// </summary> /// <param name="dtMonth">The month to view data for</param> public MonthChartUI(DateTime dtMonth) { m_dtMonth = dtMonth; InitializeComponent(); _dataContext = new AccountingDataContext(); _expenseService = new ExpenseService(new ExpenseRepository(_dataContext)); _incomeService = new IncomeService(new IncomeRepository(_dataContext)); }
/// <summary> /// Standard Default Ctor /// </summary> public InputINUI() { InitializeComponent(); _dataContext = new AccountingDataContext(); _incomeCategoryService = new IncomeCategoryService(new IncomeCategoryRepository(_dataContext)); _paymentMethodService = new PaymentMethodService(new PaymentMethodRepository(_dataContext)); _incomeService = new IncomeService(new IncomeRepository(_dataContext)); }
/// <summary> /// Sets the intial state and current state expense properties of the form /// </summary> /// <param name="income">The income the form was opened for</param> public IncomeViewer(Income income) { InitializeComponent(); currentIncome = income; originalIncome = currentIncome.Copy(); _dataContext = new AccountingDataContext(); _incomeService = new IncomeService(new IncomeRepository(_dataContext)); _incomeCategoryService = new IncomeCategoryService(new IncomeCategoryRepository(_dataContext)); _paymentMethodService = new PaymentMethodService(new PaymentMethodRepository(_dataContext)); }
public MonthService(AccountingDataContext accountingDataContext) { _expenseService = new ExpenseService(new ExpenseRepository(accountingDataContext)); _incomeService = new IncomeService(new IncomeRepository(accountingDataContext)); }