示例#1
0
        public void AddDebitor(string Name)
        {
            Debitor debitor = new Debitor(Name);

            debitors.Add(debitor);
            transactions.Add(debitor.GetID(), new List <Transaction>());
        }
示例#2
0
        public Debitor GetDebitorByID(int id)
        {
            var debitorByID = new Debitor("");

            foreach (var debitor in debitors)
            {
                if (debitor.GetID() == id)
                {
                    debitorByID = debitor;
                }
                else
                {
                    Console.WriteLine("ID was not found in " + nameof(GetDebitorByID));
                }
            }
            return(debitorByID);
        }
示例#3
0
 public void AddDebitor(Debitor debitor)
 {
     dp.AddDebitor(debitor.Name);
 }