예제 #1
0
        public static void ListDrugs(List <Drug> drugs)
        {
            NarkoKartelContext c = new NarkoKartelContext();

            Console.WriteLine("Drugs:");
            foreach (var drug in drugs)
            {
                Console.WriteLine(ConstantStrings.Line);
                Console.WriteLine($"| {drug.Name} - quantity: {drug.Quantity}");
            }
            Console.WriteLine(ConstantStrings.Line);
            Console.WriteLine(ConstantStrings.UnderLine);
            Console.WriteLine();
        }
예제 #2
0
        public static void ListBuyers(List <Buyer> buyers)
        {
            NarkoKartelContext c = new NarkoKartelContext();

            Console.WriteLine("Buyers:");
            foreach (var buyer in buyers)
            {
                Dealer dealer = c.Dealers.Single(e => e.Id == buyer.DealerId);

                Console.WriteLine(ConstantStrings.Line);
                Console.WriteLine($"| {buyer.Nickname} is buying from {dealer.Nickname}");
            }
            Console.WriteLine(ConstantStrings.Line);
            Console.WriteLine(ConstantStrings.UnderLine);
            Console.WriteLine();
        }
예제 #3
0
 public Commands()
 {
     c     = new NarkoKartelContext();
     money = c.Money.Single(e => e.MoneyKey == ConstantStrings.MoneyKey);
 }
예제 #4
0
 public Commands(NarkoKartelContext cont)
 {
     c = cont;
     //money = c.Money.Single(e => e.MoneyKey == ConstantStrings.MoneyKey);
 }