Example #1
0
        public ActionResult Delete(int id_vendedor, FormCollection collection)
        {
            ActualizacionVendedor av = new ActualizacionVendedor();

            av.Borrar(id_vendedor);
            return(RedirectToAction("Index"));
        }
Example #2
0
        // GET: Home/Delete/5
        public ActionResult Delete(int id_vendedor)
        {
            ActualizacionVendedor av = new ActualizacionVendedor();
            Vendedor ven             = av.Recuperar(id_vendedor);

            return(View(ven));
        }
Example #3
0
        // GET: Home/Edit/5
        public ActionResult Edit(int id_usuario)
        {
            ActualizacionVendedor av = new ActualizacionVendedor();
            Vendedor ven             = av.Recuperar(id_usuario);

            return(View(ven));
        }
Example #4
0
        public ActionResult Edit(int id_vendedor, FormCollection collection)
        {
            ActualizacionVendedor av = new ActualizacionVendedor();
            Vendedor ven             = new Vendedor
            {
                Id_vendedor        = id_vendedor,
                Nombre_tienda      = collection["nombre_tienda"].ToString(),
                Categoria_tienda   = collection["categoria_tienda"].ToString(),
                Nombres_vendedor   = collection["nombres_vendedor"].ToString(),
                Apellidos_vendedor = collection["apellidos_vendedor"].ToString(),
                Correo_vendedor    = collection["correo_vendedor"].ToString(),
                Celular_vendedor   = collection["celular_vendedor"].ToString()
            };

            av.Modificar(ven);
            return(RedirectToAction("Index"));
        }
Example #5
0
        public ActionResult Create(FormCollection collection)
        {
            ActualizacionVendedor av = new ActualizacionVendedor();
            Vendedor ven             = new Vendedor
            {
                //Id_vendedor = int.Parse(collection["id_vendedor"].ToString()),
                Nombre_tienda      = collection["nombre_tienda"].ToString(),
                Categoria_tienda   = collection["categoria_tienda"].ToString(),
                Nombres_vendedor   = collection["nombres_vendedor"].ToString(),
                Apellidos_vendedor = collection["apellidos_vendedor"].ToString(),
                Correo_vendedor    = collection["correo_vendedor"].ToString(),
                Celular_vendedor   = collection["celular_vendedor"].ToString()
            };

            av.Alta(ven);
            return(RedirectToAction("Index"));
        }
Example #6
0
        public ActionResult Listado()
        {
            ActualizacionVendedor av = new ActualizacionVendedor();

            return(View(av.RecuperarTodos()));
        }