Example #1
0
 private void borrarTodaLaDataToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (MessageBox.Show(this, "¿Seguro que quiere eliminar todo?", "Borrar data", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
     {
         service.removeAllData();
         MessageBox.Show(this, "Base de datos vaciada con exito", "Informacion", MessageBoxButtons.OK, MessageBoxIcon.Information);
         service.LogOut();
     }
 }
Example #2
0
        Program(IEcoScooterService service)
        {
            this.service = service;

            service.removeAllData();

            // Adding EcoScooter
            addEcoScooter();
            Console.WriteLine("Press any key to continue...");
            Console.ReadKey();

            // Adding Users
            addUsers();
            Console.WriteLine("Press any key to continue...");
            Console.ReadKey();

            // Testing login
            testLogin();
            Console.WriteLine("Press any key to continue...");
            Console.ReadKey();

            // More login testing
            testLogin2();
            Console.WriteLine("Press any key to continue...");
            Console.ReadKey();

            // Adding Stations
            addStations();
            Console.WriteLine("Press any key to continue...");
            Console.ReadKey();

            // Adding Scooters
            addScooters();
            Console.WriteLine("Press any key to continue...");
            Console.ReadKey();

            // Renting Scooters
            rentScooters();
            Console.WriteLine("Press any key to continue...");
            Console.ReadKey();

            // Returning Scooters
            returnScooters();
            Console.WriteLine("Press any key to continue...");
            Console.ReadKey();

            // Get User Routes
            getUserRoutes();
            Console.WriteLine("FINISH - Press any key to continue...");
            Console.ReadKey();
        }