Exemplo n.º 1
0
        public async Task <IActionResult> Edit(int id, [Bind("icliacc,userWp,passWd,linkWp,acc,cusualt,faltrto,cusumod,fmod,hmod")] ClientsAcces clientsAcces)
        {
            if (id != clientsAcces.icliacc)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(clientsAcces);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ClientsAccesExists(clientsAcces.icliacc))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(clientsAcces));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Create([Bind("icliacc,userWp,passWd,linkWp,acc,cusualt,faltrto,cusumod,fmod,hmod")] ClientsAcces clientsAcces)
        {
            if (ModelState.IsValid)
            {
                _context.Add(clientsAcces);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Edit", new RouteValueDictionary(new { controller = "ClientsLBS", action = "Edit", Id = clientsAcces.icliacc, Table = "Cliacces" })));
            }
            return(null);
        }