public async Task <IActionResult> Edit(long id, [Bind("IdCategoria,Nombre")] Categoria categoria)
        {
            if (id != categoria.IdCategoria)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(categoria).Property(x => x.FechaCreacion).IsModified = false;
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CategoriaExists(categoria.IdCategoria))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(categoria));
        }
        public async Task <IActionResult> Edit(int id, [Bind("SECUENCIAL,RESPONSABLE,CODIGOINTERNO,TIEMPOINICIO,TIEMPOFIN")] ASIGNACIONVARIOS aSIGNACIONVARIOS)
        {
            if (id != aSIGNACIONVARIOS.SECUENCIAL)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(aSIGNACIONVARIOS);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ASIGNACIONVARIOSExists(aSIGNACIONVARIOS.SECUENCIAL))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(aSIGNACIONVARIOS));
        }
        public async Task <IActionResult> Edit(int id, [Bind("ID,product,color,tallas,sexo,cantidad,modelo")] Producto producto)
        {
            if (id != producto.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(producto);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    return(NotFound());
                }

                TempData["prueba02"] = "prueba02";

                return(RedirectToAction(nameof(Listar)));
            }
            return(View(producto));
        }
Пример #4
0
        public async Task <IActionResult> Edit(int id, [Bind("ID,DNI,Nombre,Apellido,Correo,sexo,distrito,direccion,celular")] Cliente cliente)
        {
            if (id != cliente.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(cliente);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    return(NotFound());
                }

                TempData["prueba02"] = "prueba02";

                return(RedirectToAction(nameof(Listar)));
            }
            return(View(cliente));
        }
Пример #5
0
        public async Task <IActionResult> Edit(int id, [Bind("SECUENCIAL,CODIGO,TIPOITEM,CATEGORIAITEM")] ITEM iTEM)
        {
            if (id != iTEM.SECUENCIAL)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(iTEM);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ITEMExists(iTEM.SECUENCIAL))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(iTEM));
        }
        public async Task <IActionResult> Edit(int id, [Bind("SECUENCIAL,CODIGOINTERNO,CUADADDEUBICACION,ITEM,DESCRIPCION,MEMORIARAM,PROCESADOR,DISCODURO,SISTEMAOPERATIVO,LICENCIADO,OFFICE,MARCA,MODELO,SERIE,PARTICULARIDAD,ESTADO,NODEFACTURA,VALORFACTURA,FECHAADQUISICION,OBSERVACIONES")] INGRESOCOMPUTADORES iNGRESOCOMPUTADORES)
        {
            if (id != iNGRESOCOMPUTADORES.SECUENCIAL)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(iNGRESOCOMPUTADORES);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!INGRESOCOMPUTADORESExists(iNGRESOCOMPUTADORES.SECUENCIAL))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(iNGRESOCOMPUTADORES));
        }
        public async Task <IActionResult> Edit(int id, [Bind("SECUENCIAL,TIPO,RESPONSABLE,CODIGOINTERNO,MOTIVO")] BAJADEEQUIPOSVARIOS bAJADEEQUIPOSVARIOS)
        {
            if (id != bAJADEEQUIPOSVARIOS.SECUENCIAL)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(bAJADEEQUIPOSVARIOS);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BAJADEEQUIPOSVARIOSExists(bAJADEEQUIPOSVARIOS.SECUENCIAL))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(bAJADEEQUIPOSVARIOS));
        }
Пример #8
0
        public async Task <IActionResult> Edit(int id, [Bind("SECUENCIAL,TIPO,SECUANCIALPERSONA,SECUANCIALINGRESOCOMPUTADORES")] MANTENIMIENTOCOMPUTADORES mANTENIMIENTOCOMPUTADORES)
        {
            if (id != mANTENIMIENTOCOMPUTADORES.SECUENCIAL)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(mANTENIMIENTOCOMPUTADORES);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MANTENIMIENTOCOMPUTADORESExists(mANTENIMIENTOCOMPUTADORES.SECUENCIAL))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(mANTENIMIENTOCOMPUTADORES));
        }
Пример #9
0
        public async Task <IActionResult> Edit(long id, [Bind("IdProducto,Nombre,IdCategoria,Color,PrecioUnitario,CantidadDisponible,FechaCreacion")] Producto producto)
        {
            if (id != producto.IdProducto)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(producto).Property(x => x.FechaCreacion).IsModified = false;
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ProductoExists(producto.IdProducto))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["IdCategoria"] = new SelectList(_context.Categoria, "IdCategoria", "Nombre", producto.IdCategoria);
            return(View(producto));
        }
        public async Task <IActionResult> Edit(int id, [Bind("ID,DNI,Nombre,Apellido,Correo,Cargo,Contraseña")] Registrar usuario)
        {
            if (id != usuario.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(usuario);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    return(NotFound());
                }
                TempData["prueba02"] = "prueba02";
                return(RedirectToAction(nameof(Listar)));
            }
            return(View(usuario));
        }