Exemplo n.º 1
0
        public async Task CreateRegisterNotifyAsync(RegisterNotify item)
        {
            item.id = await Repository.GetNextIdAsync();

            Repository.Create(item);
            await Repository.SaveAsync();
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Edit(string id, [Bind("id,id_Acc,id_Mer,createdDate,Checked,stt")] RegisterNotify registerNotify)
        {
            if (id != registerNotify.id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(registerNotify);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!RegisterNotifyExists(registerNotify.id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(registerNotify));
        }
Exemplo n.º 3
0
        public async Task <IActionResult> Create([Bind("id,id_Acc,id_Mer,createdDate,Checked,stt")] RegisterNotify registerNotify)
        {
            if (ModelState.IsValid)
            {
                await registerNotifyService.CreateRegisterNotifyAsync(registerNotify);

                return(RedirectToAction(nameof(Index)));
            }
            return(View(registerNotify));
        }
Exemplo n.º 4
0
 public async Task UpdateRegisterNotifyAsync(RegisterNotify item)
 {
     Repository.Update(item);
     await Repository.SaveAsync();
 }