Exemplo n.º 1
0
        public static void CreateAndAdd(int ID, DateTime DeadLine, string Description, decimal Amount)
        {
            Debt MyDebt = new Debt(ID, DeadLine, Description, Amount);

            Debts.Add(MyDebt);
            UpdateId();
        }
Exemplo n.º 2
0
        public static void Undo(Balance Account)
        {
            Debt MyDebt = CopyDebts[CopyDebts.Count - 1];

            Account.Amount += MyDebt.Amount;
            Debts.Add(MyDebt);
            CopyDebts.RemoveAt(CopyDebts.Count - 1);
            UpdateId();
        }
Exemplo n.º 3
0
        public static void Pay(Debt MyDebt, Balance Account)
        {
            Account.Amount -= MyDebt.Amount;
            Debt Debtcopy = (Debt)MyDebt.Clone();

            CopyDebts.Add(Debtcopy);
            Debts.RemoveAll(x => x.ID == MyDebt.ID);
            UpdateId();
        }
Exemplo n.º 4
0
 public static void Edit(Debt MyDebt, decimal Amount, string Description, DateTime DT)
 {
     MyDebt.Amount      = Amount;
     MyDebt.Description = Description;
     MyDebt.DeadLine    = DT;
 }