Esempio n. 1
0
        public async Task <IActionResult> Edit(Guid id, [Bind("AsientoLibroMayorId,NombreCuenta,Folio,Detalle,Debe,Haber")] AsientoLibroMayor asientoLibroMayor)
        {
            if (id != asientoLibroMayor.AsientoLibroMayorId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(asientoLibroMayor);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AsientoLibroMayorExists(asientoLibroMayor.AsientoLibroMayorId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(asientoLibroMayor));
        }
        public async Task <IActionResult> Edit(Guid id, [Bind("AsientoLibroDiarioId,FechaRegistro,FolioId,Detalle,Debe,Haber")] AsientoLibroDiario asientoLibroDiario)
        {
            if (id != asientoLibroDiario.AsientoLibroDiarioId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(asientoLibroDiario);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AsientoLibroDiarioExists(asientoLibroDiario.AsientoLibroDiarioId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["FolioId"] = new SelectList(_context.LibroMayor, "AsientoLibroMayorId", "AsientoLibroMayorId", asientoLibroDiario.FolioId);
            return(View(asientoLibroDiario));
        }