Friday 12 July 2013

C# .Net (CONSOLE APPLIACTION) Online Shopping using 5 compoment (project) - SOA Lab - IT Department - Final Year


ONLINE SHOPPING PROGRAM USING C#

DOWNLOAD AS TEXT FILE

DOWNLOAD AS WORD FILE

DOWNLOAD C# PROJECT FILE


program.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using computer;
using com_det;
using invoice;
using orderclass;
using customer;

namespace Exp1
{
    class Program
    {
        static void Main(string[] args)
        {
            //string i;
            int h;

            Console.WriteLine(" Online Shopping ");
            Console.WriteLine(" Computer Sales !!!! ");
            Console.WriteLine(" 1. View Catalogue ");
            Console.WriteLine(" 2. Exit ");
            Console.WriteLine(" Enter your choice ");

            h = Convert.ToInt32(Console.ReadLine());

            switch (h)
            {
                case 1:
                    {

                    ara:

                        com ob1 = new com();
                        ob1.display();

                        co_det ob2=new co_det();
                        ob2.display();

                        cus ob3 = new cus();
                        ob3.display();

                        Console.WriteLine(" Do you want to view catalog (Y/N)");
                        string ch;
                        ch = Console.ReadLine();
                        if (ch == "y" || ch == "Y")
                        {
                            goto ara;
                        }

                        else
                        {

                            corder ob4 = new corder();
                            ob4.display();

                            inv ob5 = new inv();
                            ob5.display();

                        }

                        break;
                        
                    }
                   

                default:
                    {
                        Console.WriteLine(" INVALID SELECTION ");
                        Console.ReadLine();
                    }
                    break;


            }

        }
    }
}



computer.cs


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace computer
{
    public class com
    {
        int a;

        public void display()
        {
            Console.WriteLine(" COMPUTERS BRAND ");
            Console.WriteLine(" 1. Sony ");
            Console.WriteLine(" 2. Dell ");
            Console.WriteLine(" 3. HCL ");
            Console.WriteLine(" 4. Samsung ");
        }
    }
}



com_det.cs


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace com_det
{
    class co_det
    {
        int d;

        public void display()
        {
            Console.WriteLine(" SELECT YOUR DESIRED COMPUTER ");
            d = Convert.ToInt32(Console.ReadLine());


            switch (d)
            {
                case 1:
                    {
                        Console.WriteLine(" You have Selected SONY ");
                        Console.WriteLine(" Model - SV101");
                        Console.WriteLine(" ITEM ID : 001");
                        Console.WriteLine(" Price  : Rs. 27,550 only /- ");
                        break;
                    }

                case 2:
                    {
                        Console.WriteLine(" You have Selected DELL ");
                        Console.WriteLine(" Model - Inspiron ");
                        Console.WriteLine(" ITEM ID : 002");
                        Console.WriteLine(" Price  : Rs. 29,550 only /- ");
                        break;
                    }

                case 3:
                    {
                        Console.WriteLine(" You have Selected HCL ");
                        Console.WriteLine(" Model - ME ");
                        Console.WriteLine(" ITEM ID : 003");
                        Console.WriteLine(" Price  : Rs. 25,550 only /- ");
                        break;
                    }


                case 4:
                    {
                        Console.WriteLine(" You have Selected SAMSUNG ");
                        Console.WriteLine(" Model - ChromeBook ");
                        Console.WriteLine(" ITEM ID : 004");
                        Console.WriteLine(" Price  : Rs. 15,550 only /- ");
                        break;
                    }

                default:
                    Console.WriteLine(" Invalid Selection");
                    break;


            }
        }

    }

}




customer.cs


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace customer
{
    public class cus
    {
        string name;
        string add;
        string phno;
        string email;

        public void display()
        {
            int q;
            Console.WriteLine(" Do you want to Continue ...! ");
            Console.WriteLine(" Fill the customer form ");
            Console.WriteLine();
            Console.WriteLine(" 1. YES ");
            Console.WriteLine(" 2. NO ");

            q = Convert.ToInt32(Console.ReadLine());


            switch (q)
            {
                case 1:
                    {
                        Console.WriteLine(" Enter your name : ");
                        name=Console.ReadLine();

                        Console.WriteLine(" Enter your address : ");
                        add=Console.ReadLine();

                        Console.WriteLine(" Enter your Phone Number : ");
                        phno=Console.ReadLine();


                        Console.WriteLine(" CONFIRM YOUR SHIPPING DETAILS ");
                        Console.WriteLine(" Name    : "+name);
                        Console.WriteLine(" Address : "+add);
                        Console.WriteLine(" Phone   : "+phno);
                        Console.ReadLine();

                        break;
                    }

            }


        }

    }
}


invoice.cs


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace invoice
{
    class inv
    {

        public void display()
        {
            Console.WriteLine(" Your Product will be delivered on : "+DateTime.Now.Date.AddDays(2).ToString("dd-MM-yyyy"));
            Console.ReadLine();
        }


    }
}



orderclass.cs



using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace orderclass
{
    public class corder
    {

        int s;

        public void display()
        {
            Console.WriteLine(" Select your payment method ");
            Console.WriteLine(" 1. CHEQUE");
            Console.WriteLine(" 2. CASH ");

            s = Convert.ToInt32(Console.ReadLine());



            switch (s)
            {
                case 1:
                    {
                        Console.WriteLine(" Enter your account number : ");
                        Console.ReadLine();
                        Console.WriteLine(" Name of the bank : ");
                        Console.ReadLine();
                        Console.WriteLine();
                        Console.WriteLine(" Your Order is Confirmed ");

                    }
                    break;


                case 2:

                    Console.WriteLine(" Your orderis confirmed ");
                    break;



           
           
            }
        }
    }
}





OUTPUT:




No comments:

Don't You Think this Awesome Post should be shared ??
| C# .Net (CONSOLE APPLIACTION) Online Shopping using 5 compoment (project) - SOA Lab - IT Department - Final Year |
Back To Top Related Posts Plugin for WordPress, Blogger...