コード例 #1
0
        public async Task <IActionResult> Create([Bind("GroupUpdateId,Updatemsg,Status,GroupGoalId,UpdateDate")] GroupUpdate groupUpdate)
        {
            if (ModelState.IsValid)
            {
                _context.Add(groupUpdate);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(groupUpdate));
        }
コード例 #2
0
        public async Task <IActionResult> Create([Bind("GroupUpdateSupportId,GroupUpdateId,GroupUserId,UpdateSupportedDate")] GroupUpdateSupport groupUpdateSupport)
        {
            if (ModelState.IsValid)
            {
                _context.Add(groupUpdateSupport);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["GroupUpdateId"] = new SelectList(_context.GroupUpdates, "GroupUpdateId", "GroupUpdateId", groupUpdateSupport.GroupUpdateId);
            return(View(groupUpdateSupport));
        }