示例#1
0
        public async Task <IActionResult> Edit(int id, [Bind("id,Codigo_registro,Estado,Tema,Fecha,Chat,Hora_Inicio,Hora_Finaliza")] Reuniones reuniones)
        {
            if (id != reuniones.id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(reuniones);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ReunionesExists(reuniones.id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(reuniones));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,FechaCompra,Cantidad,PrecioUnitario")] DetalleCompra detalleCompra)
        {
            if (id != detalleCompra.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(detalleCompra);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DetalleCompraExists(detalleCompra.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(detalleCompra));
        }
示例#3
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,ProductoTipo")] TipoProducto tipoProducto)
        {
            if (id != tipoProducto.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tipoProducto);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TipoProductoExists(tipoProducto.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(tipoProducto));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,SubTotal,IVA,Total")] Factura factura)
        {
            if (id != factura.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(factura);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!FacturaExists(factura.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(factura));
        }
示例#5
0
        public async Task <IActionResult> Edit(Guid id, [Bind("Id,Nombre,NombreCientifico,año_nacimiento,año_muerte,estatura,ancho")] Animales animales)
        {
            if (id != animales.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(animales);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AnimalesExists(animales.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(animales));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,Marca,Modelo")] Celular celular)
        {
            if (id != celular.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(celular);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CelularExists(celular.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(celular));
        }
示例#7
0
        public async Task <IActionResult> Edit(Guid id, [Bind("Id,Nombre,segundoNombre,primerApellido,segundoApellido,CI,email,contraseña,telefono")] Usuario usuario)
        {
            if (id != usuario.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(usuario);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!UsuarioExists(usuario.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(usuario));
        }
示例#8
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,MateriaPrimaConsumida,MargenGanancia,Costo")] DetalleProduccion detalleProduccion)
        {
            if (id != detalleProduccion.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(detalleProduccion);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DetalleProduccionExists(detalleProduccion.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(detalleProduccion));
        }
        public async Task <IActionResult> Edit(int id, [Bind("id,PrimerNombre,SegundoNombre,PrimerApellido,SegundoApellido,Correo,Celular,Estado")] Estudiantes estudiantes)
        {
            if (id != estudiantes.id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(estudiantes);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EstudiantesExists(estudiantes.id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(estudiantes));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,Descripcion,UnidadMedida")] MateriaPrima materiaPrima)
        {
            if (id != materiaPrima.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(materiaPrima);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MateriaPrimaExists(materiaPrima.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(materiaPrima));
        }
示例#11
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Cedula,Nombre,Apellido,Direccion")] Cliente cliente)
        {
            if (id != cliente.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(cliente);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ClienteExists(cliente.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(cliente));
        }