//dito naman po yung login ko na kung saan maglalog in ang user
        public void DisplayElements()
        {
            shopping itemcall = new shopping();

            string u, p;
            string user    = "******";
            string pass    = "******";
            string address = "Binan Laguna";


            Console.WriteLine("******************************");
            Console.WriteLine("Please Login");
            Console.Write("Enter Your Username: "******"Enter Your Password: "******"Enter Your Address:" + address);
            Console.WriteLine("");

            if (u == user && p == pass)
            {
                itemcall.Shopping();
            }

            else
            {
                Console.WriteLine("Wrong Password");
            }
        }
Exemple #2
0
        //shopping method dito po nakalagay ang list ng items na pwede nila maview.
        public void Shopping()
        {
            shopping      itemcall = new shopping();
            List <string> items    = new List <string>();

            Console.WriteLine("These Are The Available Items : ");
            Console.WriteLine("");
            items.Add("Categories");
            items.Add("Gadgets ");
            items.Add("Accessories ");
            items.Add("Home Entertainment ");
            foreach (string list in items)
            {
                Console.WriteLine(list);

                {
                    Console.WriteLine("Press G To view Gadgets");
                    Console.WriteLine("Press A To view Accessories");
                    Console.WriteLine("Press H To view Home Entertainment");
                    char select = Convert.ToChar(Console.ReadLine());
                    select = char.ToUpper(select);

                    switch (select)
                    {
                    case 'G':
                        gadgetscall.getGadgets();
                        break;

                    case 'A':
                        accessoriescall.getAccessories();
                        break;

                    case 'H':
                        hecall.getHomeentertainment();
                        break;

                    default:
                        Console.WriteLine("Invalid Input");
                        break;
                    }
                }
            }
        }