Ejemplo n.º 1
0
        public async Task <IActionResult> Edit(int id, [Bind("IDempleado,Status,Nombre,Apellido,NombrePlanilla,DUI,NumeroCuenta,TipoCuenta,CentroDeCosto")] Empleado empleado)
        {
            if (id != empleado.IDempleado)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(empleado);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EmpleadoExists(empleado.IDempleado))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(empleado));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Edit(int id, [Bind("ID,NombreEmpresa,RazonSocial,NumPatronal,NIT,Telefono,Direccion,Municipio,Departamento,NumIva,IDBanco,NumCuentaBancaria")] Empresa empresa)
        {
            if (id != empresa.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(empresa);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EmpresaExists(empresa.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(empresa));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Edit(string id, [Bind("NumCarnet,Nombre,Beneficiario,Parentesco,FechaNacimiento,TipoDeducible,Activo")] Expediente expediente)
        {
            if (id != expediente.NumCarnet)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(expediente);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ExpedienteExists(expediente.NumCarnet))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(expediente));
        }
Ejemplo n.º 4
0
        public async Task <IActionResult> Edit(int id, [Bind("ID,NombreBanco,CodigoCuentaAhorro,CodigoCuentaCorriente,FormatoArchivo,Correlativo")] Banco banco)
        {
            if (id != banco.ID)
            {
                return(NotFound());
            }

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