예제 #1
0
        public void AddItem(int iid, int cid, int scid, string iname, string cname, string scname, int stock, string idesc, string scdesc, string rem, int iprice)
        {
            SubCategory cat = new SubCategory(cid, cname, scid, scname, scdesc);

            Item item = new Item(iid, iname, idesc, stock, rem, iprice);

            ls.Add(cat);
            litem.Add(item);
            Console.WriteLine("Given details  are added..!!\n\n ");
            Console.WriteLine("\n Do u want to add more items ? Press 1");
            int cho = int.Parse(Console.ReadLine());

            if (cho == 1)
            {
                Console.WriteLine("\nEnter SubCategory Id to enter more items in it :");
                int    sub = int.Parse(Console.ReadLine());
                ItemBo ib  = new ItemBo();
                ib.AddMoreItems(sub);
            }
        }