public void Edit(int id, int typeId, DateTime paymentDate, double amount, string comment) { Data.IncomePayment dataIncomePayment; dataIncomePayment = new Data.IncomePayment(); dataIncomePayment.Edit(id, typeId, paymentDate, amount, comment); dataIncomePayment.Dispose(); }
public void Delete(int id) { Data.IncomePayment dataIncomePayment; dataIncomePayment = new Data.IncomePayment(); dataIncomePayment.Delete(id); dataIncomePayment.Dispose(); }
public List<IPayment> GetPayments(int year, int week) { Data.IncomePayment dataIncomePayment; List<IPayment> incomePayments; dataIncomePayment = new Data.IncomePayment(); incomePayments = dataIncomePayment.GetPayments(year, week); dataIncomePayment.Dispose(); return incomePayments; }
public List<IPayment> GetPayments(int? categoryId, int? typeId, DateTime? paymentDateFrom, DateTime? paymentDateTo, double? amountFrom, double? amountTo, string comment) { Data.IncomePayment dataIncomePayment; List<IPayment> incomePayments; Nullable<int> lCategoryId, lTypeId; dataIncomePayment = new Data.IncomePayment(); lCategoryId = (categoryId == 0) ? new Nullable<int>() : categoryId; lTypeId = (typeId == 0) ? new Nullable<int>() : typeId; incomePayments = dataIncomePayment.GetPayments(lCategoryId, lTypeId, paymentDateFrom, paymentDateTo, amountFrom, amountTo, comment); dataIncomePayment.Dispose(); return incomePayments; }