Esempio n. 1
0
        public ActionResult Create([Bind(Include = "ID,nombre,DiplomadoID")] Modulo modulo)
        {
            string Ntalleres = Request.Form["NumeroTalleres"];

            int orden = db.Tallers.Where(m => m.Modulo.DiplomadoID == modulo.DiplomadoID).Count();
            if (ModelState.IsValid)
            {
                db.Moduloes.Add(modulo);
                db.SaveChanges();

                if (Ntalleres != null && Ntalleres != "")
                {
                    int num = Convert.ToInt32(Ntalleres);
                    for (var k = 0; k < num; k++)
                    {
                        Taller taller = new Taller();
                        taller.ModuloID = modulo.ID;
                        taller.nombre = "Taller " + (k + 1).ToString();
                        taller.orden = (orden + k + 1);
                        taller.cantidadDias = 1;
                        db.Tallers.Add(taller);
                    }

                }
                db.SaveChanges();

                return RedirectToAction("Details", "Diplomado", new { id =  modulo.DiplomadoID });
            }

            ViewBag.DiplomadoID = new SelectList(db.Diplomadoes, "ID", "nombre", modulo.DiplomadoID);
            return View(modulo);
        }
        private void Buscarbutton_Click(object sender, EventArgs e)
        {
            if (Validar(1))
            {
                MessageBox.Show("Ingrese un ID");
                return;
            }
            else
            {
                int    id     = Convert.ToInt32(TallerIdnumericUpDown.Value);
                Taller taller = BLL.TalleresBLL.Buscar(id);

                if (taller != null)
                {
                    NombretextBox.Text = taller.ToString();
                }
                else
                {
                    MessageBox.Show("No se encontro", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                errorProvider.Clear();
            }
        }
Esempio n. 3
0
        private void SendCorreoTaller(Taller user)
        {
            var chars       = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
            var stringChars = new char[10];
            var random      = new Random();

            for (int i = 0; i < stringChars.Length; i++)
            {
                stringChars[i] = chars[random.Next(chars.Length)];
            }

            var finalString = new String(stringChars);

            if (_tallerService.insertCodigo(user, finalString))
            {
                var message     = new MimeMessage();
                var bodyBuilder = new BodyBuilder();

                message.From.Add(new MailboxAddress("MechaFinder Support", "*****@*****.**"));

                message.To.Add(new MailboxAddress("To: " + user.nombreTaller, user.correo));

                message.ReplyTo.Add(new MailboxAddress("reply_to", "*****@*****.**"));

                message.Subject      = "Solictud de Reinicio de Contraseña";
                bodyBuilder.HtmlBody = "Querido usuario: " + user.nombreDueño;
                bodyBuilder.HtmlBody = "Tu codigo para reiniciar tu contraseña es: " + finalString;
                message.Body         = bodyBuilder.ToMessageBody();

                var client = new SmtpClient();

                client.Connect("smtp.gmail.com", 465, SecureSocketOptions.SslOnConnect);
                client.Authenticate("*****@*****.**", "mechafinder123");
                client.Send(message);
                client.Disconnect(true);
            }
        }
Esempio n. 4
0
        private void LogInView_OnAdminAgregarAlumnoTaller(object sender, LogInEventArgs e)
        {
            Taller ws         = talleres[GetTaller(e.taller)];
            Alumno alumno     = (Alumno)usuarios[GetUsuario(e.student)];
            bool   disponible = false;

            foreach (Taller ta in GetTalleresDisponibles(alumno).Keys)
            {
                if (ta.GetId() == ws.GetId())
                {
                    disponible = true;
                    break;
                }
            }
            if (disponible)
            {
                InscribirAlumno(alumno, ws);
                VistaIngresarTaller_OnAdminIngresarTaller(sender, e);
            }
            else
            {
                logInView.TopeDeHorario();
            }
        }
Esempio n. 5
0
        public static bool Modificar(Taller taller)
        {
            bool paso = false;

            Contexto contexto = new Contexto();

            try
            {
                contexto.Entry(taller).State = EntityState.Modified;
                if (contexto.SaveChanges() > 0)
                {
                    paso = true;
                }

                contexto.Dispose();
            }

            catch (Exception)
            {
                throw;
            }

            return(paso);
        }
Esempio n. 6
0
        public void TallerAgregaService()
        {
            Taller <Electrodomestico> .PonerEnService(new Electrodomestico(3499, 3, false), "3");

            Assert.AreEqual(1, Taller <Electrodomestico> .GetCantidadEnCola);
        }
Esempio n. 7
0
        static void Main(string[] args)
        {
            // Configuración de la pantalla
            Console.SetWindowPosition(0, 0);
            Console.SetWindowSize(Console.LargestWindowWidth / 2, Console.LargestWindowHeight - 2);

            // Nombre del alumno
            Console.Title = "Esteban Mato 2°C";

            Taller taller = new Taller(6);

            Ciclomotor c1 = new Ciclomotor(Vehiculo.EMarca.BMW, "ASD012", ConsoleColor.Black);
            Ciclomotor c2 = new Ciclomotor(Vehiculo.EMarca.HarleyDavidson, "LEM666", ConsoleColor.Red);
            Sedan      m1 = new Sedan(Vehiculo.EMarca.Toyota, "HJK789", ConsoleColor.White);
            Sedan      m2 = new Sedan(Vehiculo.EMarca.Chevrolet, "IOP852", ConsoleColor.Blue, Sedan.ETipo.CincoPuertas);
            Suv        a1 = new Suv(Vehiculo.EMarca.Ford, "QWE968", ConsoleColor.Gray);
            Suv        a2 = new Suv(Vehiculo.EMarca.Renault, "TYU426", ConsoleColor.DarkBlue);
            Suv        a3 = new Suv(Vehiculo.EMarca.BMW, "IOP852", ConsoleColor.Green);
            Suv        a4 = new Suv(Vehiculo.EMarca.Honda, "ASD913", ConsoleColor.Green);

            // Agrego 8 ítems (los últimos 2 no deberían poder agregarse ni el m1 repetido) y muestro
            taller += c1;
            taller += c2;
            taller += m1;
            taller += m1;
            taller += m2;
            taller += a1;
            taller += a2;
            taller += a3;
            taller += a4;

            Console.WriteLine(taller.ToString());
            Console.WriteLine("<-----------PRESIONE UNA TECLA PARA CONTINUAR PRIMERA LISTA----------->");
            Console.ReadKey();
            Console.Clear();

            // Quito 2 items y muestro
            taller -= c1;

            // por defecto pide quitar el vehiculo debajo, el cual nunca se agrego por llegar al limite de 6 autos
            // taller -= new Ciclomotor(Vehiculo.EMarca.Honda, "ASD913", ConsoleColor.Red);


            //Hago la prueba de quitar el ciclomotor c2
            ////ya que antes quitaba un vehiculo que no se habia agregado
            taller -= new Ciclomotor(Vehiculo.EMarca.HarleyDavidson, "LEM666", ConsoleColor.Red);


            Console.WriteLine(taller.ToString());
            Console.WriteLine("<-----------PRESIONE UNA TECLA PARA CONTINUAR SEGUNDA LISTA----------->");
            Console.ReadKey();
            Console.Clear();

            // Vuelvo a agregar c2
            taller += c2;

            // Muestro solo Ciclomotor
            Console.WriteLine(taller.Listar(taller, Taller.ETipo.Ciclomotor));
            Console.WriteLine("<-----------PRESIONE UNA TECLA PARA CONTINUAR TERCERA LISTA----------->");
            Console.ReadKey();
            Console.Clear();

            // Muestro solo Sedan
            Console.WriteLine(taller.Listar(taller, Taller.ETipo.Sedan));
            Console.WriteLine("<-----------PRESIONE UNA TECLA PARA CONTINUAR CUARTA LISTA----------->");
            Console.ReadKey();
            Console.Clear();

            // Muestro solo SUV
            Console.WriteLine(taller.Listar(taller, Taller.ETipo.SUV));
            Console.WriteLine("<-------------PRESIONE UNA TECLA PARA SALIR QUINTA LISTA------------->");
            Console.ReadKey();
        }
Esempio n. 8
0
        //Metodos de incializacion y serialize!
        public void InicializaUsuariosIniciales()
        {
            Dictionary <String, List <Boolean> > schedulea = new Dictionary <String, List <Boolean> >()
            {
                { "Lunes", new List <Boolean>()
                  {
                      true, false, true, true, true
                  } },
                { "Martes", new List <Boolean>()
                  {
                      true, true, true, true, true
                  } },
                { "Miercoles", new List <Boolean>()
                  {
                      true, false, true, true, true
                  } },
                { "Jueves", new List <Boolean>()
                  {
                      true, true, true, true, true
                  } },
                { "Viernes", new List <Boolean>()
                  {
                      true, true, true, true, true
                  } }
            };
            Dictionary <String, List <Boolean> > scheduleat = new Dictionary <String, List <Boolean> >()
            {
                { "Lunes", new List <Boolean>()
                  {
                      false, true, false, false, false
                  } },
                { "Martes", new List <Boolean>()
                  {
                      false, false, false, false, false
                  } },
                { "Miercoles", new List <Boolean>()
                  {
                      false, true, false, false, false
                  } },
                { "Jueves", new List <Boolean>()
                  {
                      false, false, false, false, false
                  } },
                { "Viernes", new List <Boolean>()
                  {
                      false, false, false, false, false
                  } }
            };
            Dictionary <String, List <Boolean> > schedulec = new Dictionary <String, List <Boolean> >()
            {
                { "Lunes", new List <Boolean>()
                  {
                      true, true, true, true, true
                  } },
                { "Martes", new List <Boolean>()
                  {
                      true, true, true, false, true
                  } },
                { "Miercoles", new List <Boolean>()
                  {
                      true, true, true, true, true
                  } },
                { "Jueves", new List <Boolean>()
                  {
                      true, true, true, false, true
                  } },
                { "Viernes", new List <Boolean>()
                  {
                      true, true, true, true, true
                  } }
            };
            Dictionary <String, List <Boolean> > schedulect = new Dictionary <String, List <Boolean> >()
            {
                { "Lunes", new List <Boolean>()
                  {
                      false, false, false, false, false
                  } },
                { "Martes", new List <Boolean>()
                  {
                      false, false, false, true, false
                  } },
                { "Miercoles", new List <Boolean>()
                  {
                      false, false, false, false, false
                  } },
                { "Jueves", new List <Boolean>()
                  {
                      false, false, false, true, false
                  } },
                { "Viernes", new List <Boolean>()
                  {
                      false, false, false, false, false
                  } }
            };
            Dictionary <String, List <Boolean> > scheduled = new Dictionary <String, List <Boolean> >()
            {
                { "Lunes", new List <Boolean>()
                  {
                      true, true, true, true, true
                  } },
                { "Martes", new List <Boolean>()
                  {
                      true, true, true, true, true
                  } },
                { "Miercoles", new List <Boolean>()
                  {
                      true, true, true, true, true
                  } },
                { "Jueves", new List <Boolean>()
                  {
                      true, true, true, true, true
                  } },
                { "Viernes", new List <Boolean>()
                  {
                      true, true, true, true, true
                  } }
            };
            Dictionary <String, List <Boolean> > scheduleb = new Dictionary <String, List <Boolean> >()
            {
                { "Lunes", new List <Boolean>()
                  {
                      false, true, false, false, false
                  } },
                { "Martes", new List <Boolean>()
                  {
                      false, false, true, true, false
                  } },
                { "Miercoles", new List <Boolean>()
                  {
                      false, true, false, false, false
                  } },
                { "Jueves", new List <Boolean>()
                  {
                      false, false, true, true, false
                  } },
                { "Viernes", new List <Boolean>()
                  {
                      false, false, false, false, false
                  } }
            };
            Dictionary <String, List <Boolean> > scheduleb2 = new Dictionary <String, List <Boolean> >()
            {
                { "Lunes", new List <Boolean>()
                  {
                      false, true, false, false, false
                  } },
                { "Martes", new List <Boolean>()
                  {
                      false, false, true, true, false
                  } },
                { "Miercoles", new List <Boolean>()
                  {
                      false, true, false, false, false
                  } },
                { "Jueves", new List <Boolean>()
                  {
                      false, false, true, true, false
                  } },
                { "Viernes", new List <Boolean>()
                  {
                      false, false, false, false, false
                  } }
            };
            Administrador administrador1 = new Administrador("18123456-7", "Carlos", "Diaz", "*****@*****.**", "+56991929394", "1234");

            administradores.Add(administrador1);
            Alumno alumno1 = new Alumno("18884427-8", "Israel", "Cea", "*****@*****.**", "+56999404286", "1234", scheduleb);
            Alumno alumno2 = new Alumno("18018924-6", "Tom", "Boston", "*****@*****.**", "+56999404286", "1234", scheduleb2);
            Sala   sala1   = new Sala("CanchaFutbol", schedulea);
            Sala   sala2   = new Sala("CanchaTenis", schedulec);
            Sala   sala3   = new Sala("B26", scheduled);
            Taller futbol  = new Taller("futbol", 40, 15000, scheduleat, sala1, new Categoria());
            Taller tenis   = new Taller("tenis", 40, 15000, schedulect, sala2, new Categoria());

            salas.Add(sala1);
            salas.Add(sala2);
            salas.Add(sala3);
            List <Taller> talleresD = new List <Taller>();

            tenis.CrearForo("Por qué Gohan es un papanatas?", false);
            tenis.GetForos()[0].AgregarMensaje(alumno1, "Gohan es un quesito miedoso, hasta el verde le gana");
            tenis.GetForos()[0].AgregarMensaje(alumno1, "Busco mujer de 1,70 rubia, asiatica, buena para comer gohan. Esto no es Tinder?");
            talleresD.Add(futbol);
            talleresD.Add(tenis);
            Profesor profesor1 = new Profesor("18234567-8", "Andres", "Howard", "*****@*****.**", "+5699293949596", "1234", talleresD);

            profesores.Add(profesor1);
            talleres.Add(futbol);
            talleres.Add(tenis);
            alumnos.Add(alumno1);
            alumnos.Add(alumno2);
            usuarios.Add(administrador1);
            usuarios.Add(profesor1);
            usuarios.Add(alumno1);
            usuarios.Add(alumno2);
        }
Esempio n. 9
0
 private bool CrearForo(Taller taller, string nombreForo, bool privacidad = false)
 {
     taller.CrearForo(nombreForo, privacidad);
     return(true);
 }
Esempio n. 10
0
 public AllTallerPaymentForm()
 {
     InitializeComponent();
     Taller.TallerPayments(dataGridTallerView);
 }
Esempio n. 11
0
        public ActionResult TallerFacilitador(Taller taller)
        {
            if (ModelState.IsValid)
            {
                db.Entry(taller).State = EntityState.Modified;
                db.SaveChanges();

                Modulo modulo = db.Moduloes.Find(taller.ModuloID);

                return RedirectToAction("Details", "Diplomado", new {id = modulo.DiplomadoID });
            }
            ViewBag.FacilitadorID = new SelectList(db.Facilitadors, "ID", "nombre");
            return View(taller);
        }
Esempio n. 12
0
 public Taller Create(Taller taller)
 {
     _taller.InsertOne(taller);
     return(taller);
 }
Esempio n. 13
0
 public void Remove(Taller tallerIn) => _taller.DeleteOne(taller => taller.Id == tallerIn.Id);
Esempio n. 14
0
        //public void Update(string id, Taller tallerIn) => _taller.ReplaceOne(taller => taller.Id == tallerIn.Id, tallerIn);

        public void Update(string id, Taller tallerIn)
        {
            if (tallerIn != null)
            {
                try{
                    if (!(tallerIn.nombreTaller.Equals(null)))
                    {
                        _taller.FindOneAndUpdate(taller => taller.Id == id, Builders <Taller> .Update.Set("nombreTaller", tallerIn.nombreTaller));
                    }
                }catch (NullReferenceException ex) {}
                try{
                    if (!(tallerIn.correo.Equals(null)))
                    {
                        _taller.FindOneAndUpdate(taller => taller.Id == id, Builders <Taller> .Update.Set("correo", tallerIn.correo));
                    }
                }catch (NullReferenceException ex) {}
                try{
                    if (!(tallerIn.telefonoFijo.Equals(null)))
                    {
                        _taller.FindOneAndUpdate(taller => taller.Id == id, Builders <Taller> .Update.Set("telefonoFijo", tallerIn.telefonoFijo));
                    }
                }catch (NullReferenceException ex) {}
                try{
                    if (!(tallerIn.celular.Equals(null)))
                    {
                        _taller.FindOneAndUpdate(taller => taller.Id == id, Builders <Taller> .Update.Set("celular", tallerIn.celular));
                    }
                }catch (NullReferenceException ex) {}
                try{
                    if (!(tallerIn.nombreDueño.Equals(null)))
                    {
                        _taller.FindOneAndUpdate(taller => taller.Id == id, Builders <Taller> .Update.Set("nombreDueño", tallerIn.nombreDueño));
                    }
                }catch (NullReferenceException ex) {}
                try{
                    if (!(tallerIn.calle.Equals(null)))
                    {
                        _taller.FindOneAndUpdate(taller => taller.Id == id, Builders <Taller> .Update.Set("calle", tallerIn.calle));
                    }
                }catch (NullReferenceException ex) {}
                try{
                    if (!(tallerIn.numExt.Equals(null)))
                    {
                        _taller.FindOneAndUpdate(taller => taller.Id == id, Builders <Taller> .Update.Set("numExt", tallerIn.numExt));
                    }
                }catch (NullReferenceException ex) {}
                try{
                    if (!(tallerIn.numInt.Equals(null)))
                    {
                        _taller.FindOneAndUpdate(taller => taller.Id == id, Builders <Taller> .Update.Set("numInt", tallerIn.numInt));
                    }
                }catch (NullReferenceException ex) {}
                try{
                    if (!(tallerIn.colonia.Equals(null)))
                    {
                        _taller.FindOneAndUpdate(taller => taller.Id == id, Builders <Taller> .Update.Set("colonia", tallerIn.colonia));
                    }
                }catch (NullReferenceException ex) {}
                try{
                    if (!(tallerIn.latitud.Equals(null)))
                    {
                        _taller.FindOneAndUpdate(taller => taller.Id == id, Builders <Taller> .Update.Set("latitud", tallerIn.latitud));
                    }
                }catch (NullReferenceException ex) {}
                try{
                    if (!(tallerIn.longitud.Equals(null)))
                    {
                        _taller.FindOneAndUpdate(taller => taller.Id == id, Builders <Taller> .Update.Set("longitud", tallerIn.longitud));
                    }
                }catch (NullReferenceException ex) {}
                try{
                    if (!(tallerIn.tipoTaller1.Equals(null)))
                    {
                        _taller.FindOneAndUpdate(taller => taller.Id == id, Builders <Taller> .Update.Set("tipoTaller1", tallerIn.tipoTaller1));
                    }
                }catch (NullReferenceException ex) {}
                try{
                    if (!(tallerIn.tipoTaller2.Equals(null)))
                    {
                        _taller.FindOneAndUpdate(taller => taller.Id == id, Builders <Taller> .Update.Set("tipoTaller2", tallerIn.tipoTaller2));
                    }
                }catch (NullReferenceException ex) {}
                try{
                    if (!(tallerIn.tipoTaller3.Equals(null)))
                    {
                        _taller.FindOneAndUpdate(taller => taller.Id == id, Builders <Taller> .Update.Set("tipoTaller3", tallerIn.tipoTaller3));
                    }
                }catch (NullReferenceException ex) {}
            }
        }
Esempio n. 15
0
 public TallerVo(Taller taller)
 {
     Id          = taller.Id;
     IconUrl     = taller.ReferenciaGeografica.Icono != null ? taller.ReferenciaGeografica.Icono.PathIcono : string.Empty;
     Descripcion = taller.Descripcion;
 }
Esempio n. 16
0
        static void Main(string[] args)
        {
            // Configuración de la pantalla
            Console.SetWindowPosition(0, 0);
            Console.SetWindowSize(Console.LargestWindowWidth / 2, Console.LargestWindowHeight - 2);

            // Nombre del alumno
            Console.Title = "Agustin Coria 2C";

            Taller taller = new Taller(6);

            Ciclomotor c1 = new Ciclomotor(Vehiculo.EMarca.BMW, "ASD012", ConsoleColor.Black);
            Ciclomotor c2 = new Ciclomotor(Vehiculo.EMarca.HarleyDavidson, "LEM666", ConsoleColor.Red);
            Sedan      m1 = new Sedan(Vehiculo.EMarca.Toyota, "HJK789", ConsoleColor.White);
            Sedan      m2 = new Sedan(Vehiculo.EMarca.Chevrolet, "IOP852", ConsoleColor.Blue, Sedan.ETipo.CincoPuertas);
            Suv        a1 = new Suv(Vehiculo.EMarca.Ford, "QWE968", ConsoleColor.Gray);
            Suv        a2 = new Suv(Vehiculo.EMarca.Renault, "TYU426", ConsoleColor.DarkBlue);
            Suv        a3 = new Suv(Vehiculo.EMarca.BMW, "IOP852", ConsoleColor.Green);
            Suv        a4 = new Suv(Vehiculo.EMarca.Honda, "ASD913", ConsoleColor.Green);


            // Agrego 8 ítems (los últimos 2 no pueden agregarse ni el m1 repetido) y muestro
            taller += c1;
            taller += c2;
            taller += m1;
            taller += m1;
            taller += m2;
            taller += a1;
            taller += a2;
            taller += a3;
            taller += a4;

            Console.WriteLine(taller.ToString());
            Console.WriteLine("<-----------PRESIONE UNA TECLA PARA CONTINUAR----------->");
            Console.ReadKey();
            Console.Clear();

            // Quito 2 items y muestro
            taller -= c1;
            // instancia el vehiculo y se lo pasa a - (taller,vehiculo) . encuentra uno con el mismo chasis pero no remueve nada porque los objetos son distintos
            taller -= new Ciclomotor(Vehiculo.EMarca.Honda, "ASD913", ConsoleColor.Red);

            Console.WriteLine(taller.ToString());
            Console.WriteLine("<-----------PRESIONE UNA TECLA PARA CONTINUAR----------->");
            Console.ReadKey();
            Console.Clear();

            // Vuelvo a agregar c2
            taller += c2;

            // Muestro solo Ciclomotor
            Console.WriteLine(taller.Listar(taller, Taller.ETipo.Ciclomotor));
            Console.WriteLine("<-----------PRESIONE UNA TECLA PARA CONTINUAR----------->");
            Console.ReadKey();
            Console.Clear();

            // Muestro solo Sedan
            Console.WriteLine(taller.Listar(taller, Taller.ETipo.Sedan));
            Console.WriteLine("<-----------PRESIONE UNA TECLA PARA CONTINUAR----------->");
            Console.ReadKey();
            Console.Clear();

            // Muestro solo SUV
            Console.WriteLine(taller.Listar(taller, Taller.ETipo.SUV));
            Console.WriteLine("<-------------PRESIONE UNA TECLA PARA SALIR------------->");
            Console.ReadKey();
        }
Esempio n. 17
0
        private void LogInView_OnProfesorMostrarTaller(object sender, LogInEventArgs e)
        {
            Taller ws = talleres[GetTaller(e.taller)];

            logInView.CargarForosTallerProfesor(ws.GetForos());
        }
Esempio n. 18
0
        static void Main(string[] args)
        {
            // Configuración de la pantalla
            Console.SetWindowPosition(0, 0);
            Console.SetWindowSize(Console.LargestWindowWidth / 2, Console.LargestWindowHeight - 2);

            // Nombre del alumno
            Console.Title = "";

            Taller taller = new Taller(6);

            Ciclomotor c1 = new Ciclomotor(Vehiculo.EMarca.BMW, "ASD012", ConsoleColor.Black);
            Ciclomotor c2 = new Ciclomotor(Vehiculo.EMarca.HarleyDavidson, "LEM666", ConsoleColor.Red);
            Sedan      m1 = new Sedan(Vehiculo.EMarca.Toyota, "HJK789", ConsoleColor.White);
            Sedan      m2 = new Sedan(Vehiculo.EMarca.Chevrolet, "IOP852", ConsoleColor.Blue, Sedan.ETipo.CincoPuertas);
            Suv        a1 = new Suv(Vehiculo.EMarca.Ford, "QWE968", ConsoleColor.Gray);
            Suv        a2 = new Suv(Vehiculo.EMarca.Renault, "TYU426", ConsoleColor.DarkBlue);
            Suv        a3 = new Suv(Vehiculo.EMarca.BMW, "IOP852", ConsoleColor.Green);
            Suv        a4 = new Suv(Vehiculo.EMarca.Honda, "ASD913", ConsoleColor.Green);

            // Agrego 8 ítems (los últimos 2 no deberían poder agregarse ni el m1 repetido)
            // y muestro
            taller += c1;
            taller += c2;
            taller += m1;
            taller += m1;
            taller += m2;
            taller += a1;
            taller += a2;
            taller += a3;
            taller += a4;

            Console.WriteLine(taller.ToString());
            Console.WriteLine("<-----------PRESIONE UNA TECLA PARA CONTINUAR----------->");
            Console.ReadKey();
            Console.Clear();

            // Quito 2 items y muestro
            taller -= c1;
            taller -= new Ciclomotor(Vehiculo.EMarca.Honda, "ASD913", ConsoleColor.Red);

            Console.WriteLine(taller.ToString());
            Console.WriteLine("<-----------PRESIONE UNA TECLA PARA CONTINUAR----------->");
            Console.ReadKey();
            Console.Clear();

            // Vuelvo a agregar c2
            taller += c2;

            // Muestro solo Moto
            Console.WriteLine(taller.Listar(taller, Taller.ETipo.Ciclomotor));
            Console.WriteLine("<-----------PRESIONE UNA TECLA PARA CONTINUAR----------->");
            Console.ReadKey();
            Console.Clear();

            // Muestro solo Automovil
            Console.WriteLine(taller.Listar(taller, Taller.ETipo.Sedan));
            Console.WriteLine("<-----------PRESIONE UNA TECLA PARA CONTINUAR----------->");
            Console.ReadKey();
            Console.Clear();

            // Muestro solo Camioneta
            Console.WriteLine(taller.Listar(taller, Taller.ETipo.SUV));
            Console.WriteLine("<-------------PRESIONE UNA TECLA PARA SALIR------------->");
            Console.ReadKey();
        }
Esempio n. 19
0
 private void radioAll_Click(object sender, EventArgs e)
 {
     txtSearch.Text = "";
     Taller.TallerPayments(dataGridTallerView);
 }