Пример #1
0
        public void AddTablet()
        {
            List <Tablet> tablet = new List <Tablet>();

            tablet.Add(new Tablet(1, "citrizen", 5, 500));
            tablet.Add(new Tablet(2, "paracetamol", 10, 200));
            tablet.Add(new Tablet(3, "ativan", 7, 300));
            tablet.Add(new Tablet(4, "colpal", 8, 500));
            Tablet[] tabletInfo = TabletBLL.showTablet(tablet);
            foreach (var t in tabletInfo)
            {
                Console.WriteLine(t.ToString());
            }
            Console.WriteLine("  ");
            Console.WriteLine("  ");
            Console.WriteLine("-----------------------");
            Console.WriteLine("The above mentioned this are the available medicine stock");
            Console.WriteLine("-----------------------");
            Console.WriteLine("  ");
            Console.WriteLine("  ");
            Console.Write("Tablet Id:");
            int tid = Convert.ToInt32(Console.ReadLine());

            Console.Write("Tablet Name:");
            string tname = Console.ReadLine();

            Console.Write("Tablet Cost:");
            int tcost = Convert.ToInt32(Console.ReadLine());

            Console.Write("Tablet Stock:");
            int    tstock = Convert.ToInt32(Console.ReadLine());
            string tab    = TabletBLL.addTablet(tid, tname, tcost, tstock, tablet);

            Console.WriteLine(tab);
            Tablet[] tabletInfo1 = TabletBLL.showTablet(tablet);
            foreach (var t in tabletInfo1)
            {
                Console.WriteLine(t.ToString());
            }
            Console.WriteLine("  ");
            Console.WriteLine("Please choose from below if you wish to continue with other services");
            Console.WriteLine("-----------------------");
            Console.WriteLine("1.Add tablet to stock");
            Console.WriteLine("2.update tablet stock");
            Console.WriteLine("3.view order history");
            Console.WriteLine("4.Exit");
            shopop();
        }