Ejemplo n.º 1
0
        public void GeneratePaymentAdvice()
        {
            if (allIncomes.Count > 0)
            {
                paymentAdvice = new PaymentAdvice()
                {
                    Date         = DateTime.Now,
                    ChequeNumber = AllIncomes.Where(i => i.IncomeId == allIncomesSelectedId).FirstOrDefault()?.ChequeNumber,
                    CompanyName  = AllIncomes.Where(i => i.IncomeId == allIncomesSelectedId).FirstOrDefault()?.AssociatedCompany.Name,
                };
            }

            //PaymentAdvice.Add(pa);
        }
Ejemplo n.º 2
0
        private async void deleteI_E(object obj)
        {
            try
            {
                if (allIncomesSelectedId == null || allIncomesSelectedId < 0)
                {
                    MessageBox.Show("Please Select an income to delete");
                    return;
                }

                if (MessageBox.Show("Are you sure you want to delete the selected Income", "Confirm Delete", MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes)
                {
                    db.Incomes.Remove(db.Incomes.Find(allIncomesSelectedId));
                    await db.SaveChangesAsync();

                    AllIncomes.Remove(db.Incomes.Find(allIncomesSelectedId));
                    AllIncomesShadow.Remove(db.Incomes.Find(allIncomesSelectedId));
                    RefreshIncome();
                }
            }
            catch
            {
            }
        }
Ejemplo n.º 3
0
 public FinancialIncome GetIncome(string income)
 {
     return(AllIncomes.Find(I => I.Name == income));
 }
Ejemplo n.º 4
0
 public void AddNewIncome(FinancialIncome income)
 {
     AllIncomes.Add(income);
 }