Esempio n. 1
0
            public void Change()
            {
                int Z = -1;

                Console.WriteLine("1. Име.");
                Console.WriteLine("2. Цена на изкууване.");
                Console.WriteLine("3. Цена на продаване.");
                Console.WriteLine("4. Брой.");
                Console.WriteLine("5. Описание.");
                Console.WriteLine("0. Назад.");
                Z = Inputs.Int("Въведи цяло число: ", 0, 6);

                switch (Z)
                {
                case 1: name = Inputs.String("Въведи име: "); break;

                case 2: buyPrice = Inputs.Double("Въведи цена:"); break;

                case 3: sellPrice = Inputs.Double("Въведи цена:"); break;

                case 4: count = Inputs.Int("Въведи брой:", 0, 30000); break;

                case 5: description = Inputs.String("Въведи описание:"); break;

                case 0: return;
                }
            }
Esempio n. 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Задача №3. (60в). Нахождение u по описанным правилам.");
            double x = Inputs.Double("Введите координату x: ");
            double y = Inputs.Double("Введите координату y: ");

            Console.WriteLine($"u = {Area(x, y)}");
            Console.ReadKey();
        }
Esempio n. 3
0
            public void AddItem(Item item, bool T)
            {
                string name;
                double buyPrice;
                double sellPrice;
                int    count;
                string description;

                if (T)
                {
                    name        = Inputs.String("Име на продукта:");
                    buyPrice    = Inputs.Double("Цена на изкупуване: ");
                    sellPrice   = Inputs.Double("Цена на продаване: ");
                    count       = Inputs.Int("Брой: ", 0, 30000);
                    description = Inputs.String("Описание на продукта: ");
                    item        = new Item(name, buyPrice, sellPrice, count, description);
                }

                items.Add(item);
                lenght++;
            }
Esempio n. 4
0
            private static void AdminMenu(ItemList[] itemLists, List <Order> orderList)
            {
                int Z = -1;

                while (Z != 0)
                {
                    Console.WriteLine("1. Списъци с продукти.");
                    Console.WriteLine("2. Налични пари.");
                    Console.WriteLine("3. Сделки.");
                    Console.WriteLine("4. Продукти на свършване.");
                    Console.WriteLine("5. Добави пари.");
                    Console.WriteLine("6. Създай нова база от данни.");
                    Console.WriteLine("0. Назад");
                    Z = Inputs.Int("Въведи цяло число: ", 0, 6);
                    switch (Z)
                    {
                    case 1: ProductTypes(itemLists, orderList); break;

                    case 2: Bujet.Display(); break;

                    case 3: Order.DisplayList(orderList); break;

                    case 4: for (int i = 0; i < 4; i++)
                        {
                            itemLists[i].CheckCount();
                        }
                        break;

                    case 5: Bujet.AddToMoney(Inputs.Double("Количество пари: ")); break;

                    case 6: DataBase.Create(); break;

                    case 0: return;
                    }
                }
            }