Exemple #1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,Date,Remarks")] InterviewMeeting interviewMeeting)
        {
            if (id != interviewMeeting.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(interviewMeeting);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!InterviewMeetingExists(interviewMeeting.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(interviewMeeting));
        }
Exemple #2
0
        public async Task <IActionResult> Create([Bind("Id,Date,Remarks")] InterviewMeeting interviewMeeting)
        {
            if (ModelState.IsValid)
            {
                _context.Add(interviewMeeting);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(interviewMeeting));
        }