Exemplo n.º 1
0
        private static string GenerateMessage(DatabaseLogic.DataController dc, Item item)
        {
            List <Magazine> l       = dc.GetEntries <Magazine>().Where(m => m.Genre == item || m.marketOwner == item).ToList();
            string          message = $"\nCannot delete {item.Name}\nDependees:\n";

            foreach (Magazine m in l)
            {
                message += $"{m.Id} {m.Name}\n";
            }

            return(message);
        }
Exemplo n.º 2
0
        private static string GenerateMessage(DatabaseLogic.DataController dc, Person person)
        {
            List <Magazine> l       = dc.GetEntries <Magazine>().Where(m => m.userOwner == person || m.Author == person).ToList();
            string          message = $"\nCannot delete {person.FirstName} {person.LastName}\nDependees:\n";

            foreach (Magazine m in l)
            {
                message += $"{m.Id} {m.Name}\n";
            }

            return(message);
        }