public async Task <IActionResult> Edit(int id, [Bind("idEstado,descripcion")] Estado estado)
        {
            if (id != estado.idEstado)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(estado);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EstadoExists(estado.idEstado))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(estado));
        }
        public async Task <IActionResult> Edit(int id, [Bind("idPlataforma,descripcion,numeroMaximoUsuarios,precio,idEstado")] Plataforma plataforma)
        {
            if (id != plataforma.idPlataforma)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(plataforma);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PlataformaExists(plataforma.idPlataforma))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(plataforma));
        }
        public async Task <IActionResult> Edit(int id, [Bind("usuariosdisponibles,fechaPago,clave,idPlataforma,idCuenta")] PlataformaCuenta plataformaCuenta)
        {
            if (id != plataformaCuenta.idCuenta)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(plataformaCuenta);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PlataformaCuentaExists(plataformaCuenta.idCuenta))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["idCuenta"]     = new SelectList(_context.CUENTA, "idCuenta", "idCuenta", plataformaCuenta.idCuenta);
            ViewData["idPlataforma"] = new SelectList(_context.PLATAFORMA, "idPlataforma", "idPlataforma", plataformaCuenta.idPlataforma);
            return(View(plataformaCuenta));
        }
        public async Task <string> UpdateObjeto(T tracker, T t, BillycockServiceContext _context)
        {
            string mensaje = ("Actualizacion XXX de " + t.GetType().Name).ToUpper();

            try
            {
                _context.Entry(tracker).State = EntityState.Detached;
                _context.Update(t);
                await Save(_context);

                mensaje = mensaje.Replace("XXX", "Correcta").ToUpper();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                mensaje = mensaje.Replace("XXX", "Incorrecta").ToUpper();
            }
            await InsertHistory(t, mensaje, _context);

            return(mensaje);
        }