Ejemplo n.º 1
0
        void addEcoScooter()
        {
            Console.WriteLine();
            Console.WriteLine("ADDING ECOSCOOTER...");

            try
            {
                // Administrator
                // public Employee(DateTime birthDate, String dni, String email, String name, int telephon, String iban, int pin, String position, Decimal salary )
                Employee e = new Employee(DateTime.Parse("19/10/2000"), "12341234A", "*****@*****.**", "Rodolfo Valentino", 96123123, "ES651234567890", 1234, "Administrator", 3000);

                EcoScooter.Entities.EcoScooter ecoscooter;
                // public EcoScooter(Double discountYounger, Double fare, Double maxSpeed, Employee firstEmpl)
                ecoscooter = new EcoScooter.Entities.EcoScooter(10, 0.015, 30, e);

                service.addEcoScooter(ecoscooter);
                Console.WriteLine(ecoScooterToString(service.getEcoScooter()));

                Console.WriteLine("   Employee list:");
                foreach (Employee emp in ecoscooter.Employees)
                {
                    Console.WriteLine(employeeToString(emp));
                }
            }
            catch (Exception e)
            {
                printError(e);
            }
        }