Beispiel #1
0
        public async Task <IActionResult> Edit(int id, [Bind("ipredis,ptheme,envcli,themebuy,pctheme,bouby,paid,cusualt,faltrto,cusumod,fmod,hmod")] ClientsPreDisseny clientsPreDisseny)
        {
            if (id != clientsPreDisseny.ipredis)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(clientsPreDisseny);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ClientsPreDissenyExists(clientsPreDisseny.ipredis))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(clientsPreDisseny));
        }
Beispiel #2
0
        public async Task <IActionResult> Create([Bind("ipredis,ptheme,envcli,themebuy,pctheme,bouby,paid,cusualt,faltrto,cusumod,fmod,hmod")] ClientsPreDisseny clientsPreDisseny)
        {
            if (ModelState.IsValid)
            {
                _context.Add(clientsPreDisseny);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Edit", new RouteValueDictionary(new { controller = "ClientsLBS", action = "Edit", Id = clientsPreDisseny.ipredis, Table = "clipredis" })));
            }
            return(View(clientsPreDisseny));
        }