示例#1
0
        public async Task <IActionResult> Create([Bind("PerNo,PerLastName,PerFirstName,PerMi,PerSuffixName,PerGoesByName,PerBirthDate,CitznCode,RaceCode,PerSexCode,DcsdPerDeathDate,DcsdPerDeathFlag,SsnNmbr,PnaNmbr,PerMfInSync,JobsStatDescShort,PerComment,PerInsertDate,PerInsertBy,LastUpdateBrOffCode,LastUpdateDtTm,LastUpdateBy,PerEducCode,PerJasFlag,PerVeteranFlag,PerCommentDate,PerDisabilityCode,PerDisAccModCode,PerDisAccModText,PerEmailAddress,PerAbawdCode,PerAbawdLastUpdateDtTm,IeIndividualId")] Person person)
        {
            if (ModelState.IsValid)
            {
                _context.Add(person);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(person));
        }
示例#2
0
        public async Task <IActionResult> DeleteConfirmed(string id1, int id2)
        {
            var narrative = await _context.Narrative.FindAsync(id1, id2);

            _context.Narrative.Remove(narrative);
            await _context.SaveChangesAsync();

            TempData["DeleteSuccess"] = "Narrative " + id1 + "/" + id2.ToString() + " has been deleted.";
            // _logger.LogInformation("User {User} DELETING TRACS Narrative: {Narrative}, Branch {Branch}", @User.Identity.Name, narrative.NrtvSequenceNmbr, narrative.BrOffCode);
            return(RedirectToAction(nameof(Search)));
        }