Exemplo n.º 1
0
        void SignUp(Driver driver)          //signup for new user
        {
            CustomerValidation validation = new CustomerValidation();
            Driver             driver1    = new Driver();
            Customer           customer   = new Customer();

            Console.WriteLine("Welcome to Your Cab");
            Thread.Sleep(1000);
            Console.WriteLine("Follow our simple registration process to Enjoy your ride");
            Thread.Sleep(1500);
            Console.WriteLine("Enter your first Name:");
            customer.FirstName = validation.ValidateName(1);
            Console.WriteLine("Enter your last Name:");
            customer.LastName = validation.ValidateName(2);
            Console.WriteLine("Enter your MailId:");
            customer.MailId = validation.ValidateMailId();
            Console.WriteLine("Enter your Mobile Number:");
            customer.Mobile = validation.ValidateMobileNumber();
            Console.WriteLine("Choose a location");
            customer.Location = validation.ValidateLocation();
            Console.WriteLine("Enter the referrel code to enjoy rewards");
            Console.WriteLine("Sit back...Your registration is done");
            //Customer.customerList.Add(driver1);
            Thread.Sleep(2000);
            Console.WriteLine("Enter the Pickup location in {0}", customer.Location);
            customer.pickLocation = Console.ReadLine();
            Console.WriteLine("Enter the drop location within {0} range", customer.Location);
            customer.dropLocation = Console.ReadLine();
            //Customer customer1=(Customer)ProcessRide((Driver)customer);
            Customer.customerList.Add(customer);
            int count = CustomerDbConnection(customer);

            Console.WriteLine("Press 1 to view your details...Else press any key");
            byte choice = byte.Parse(Console.ReadLine());

            if (choice == 1)
            {
                Driver.lastData += 1;
                driver.ProcessRide();
                Console.WriteLine("Press Enter to confirm your ride");
                Console.ReadLine();
                Console.WriteLine("Your ride is confirmed...We will notify you with Driver contact");
                Console.WriteLine("Happy Journey...");
            }
        }
Exemplo n.º 2
0
        void SignIn(Driver driver)              //login for existing user
        {
            CustomerValidation validation = new CustomerValidation();

            Console.WriteLine("Enter your Existing mobile number to login");
            validation.ValidateExistingLogin();
            Console.WriteLine("Welcome back...Continue your ride with us");
            ProcessRide("signin");
            Console.WriteLine("Press 1 to view your details...Else press any key");
            byte choice = byte.Parse(Console.ReadLine());

            if (choice == 1)
            {
                driver.ProcessRide();
                Console.WriteLine("Press Enter to confirm your ride");
                Console.ReadLine();
                Console.WriteLine("Your ride is confirmed...We will notify you with Driver contact");
                Console.WriteLine("Happy Journey...");
            }
        }