public async Task <IActionResult> Create([Bind("Id,FirstName,MiddleName,LastName,Nrc,Dob,Address,PhoneNumber,Email,Gender,BloodGroup")] Client client) { if (ModelState.IsValid) { _context.Add(client); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(client)); }
public async Task <IActionResult> Create([Bind("Id,ClientId,BilirubunAtBirth,Dob,BirthWeight,GestationalAge,MothersFirstName,MothersMiddleName,MothersLastName,MothersNrc")] Neonate neonate) { if (ModelState.IsValid) { _context.Add(neonate); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["ClientId"] = new SelectList(_context.Client, "Id", "Id", neonate.ClientId); return(View(neonate)); }
public async Task <IActionResult> Create([Bind("NeonateId,DisorderId,NeedForFollowup,Treatment")] NeonateDiagnosis neonateDiagnosis) { if (ModelState.IsValid) { _context.Add(neonateDiagnosis); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["DisorderId"] = new SelectList(_context.Disorder, "Id", "Id", neonateDiagnosis.DisorderId); ViewData["NeonateId"] = new SelectList(_context.Neonate, "Id", "Id", neonateDiagnosis.NeonateId); return(View(neonateDiagnosis)); }