public async Task <IActionResult> Create([Bind("IdTaxa,Pret,DescriereTaxa")] Taxa taxa) { if (ModelState.IsValid) { _context.Add(taxa); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(taxa)); }
public async Task <IActionResult> Create([Bind("IdCamin,Adresa,NrCamere,Poza,BaieComuna,BucatarieComuna,IdTaxa")] Camin camin) { if (ModelState.IsValid) { _context.Add(camin); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["IdTaxa"] = new SelectList(_context.Taxa, "IdTaxa", "IdTaxa", camin.IdTaxa); return(View(camin)); }
public async Task <IActionResult> Create([Bind("Cnp,Nume,Prenume,NrTelefon,Facultate,AnStudiu,Medie,Sex,Varsta,Email,LuniRestante,Statut,IdCamera")] Student student) { if (ModelState.IsValid) { _context.Add(student); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["IdCamera"] = new SelectList(_context.Camera, "IdCamera", "IdCamera", student.IdCamera); return(View(student)); }
public async Task <IActionResult> Create([Bind("IdCamera,Etaj,NrPaturi,NrMobilier,IdCamin")] Camera camera) { if (ModelState.IsValid) { _context.Add(camera); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["IdCamin"] = new SelectList(_context.Camin, "IdCamin", "Adresa", camera.IdCamin); return(View(camera)); }
public async Task <IActionResult> Create([Bind("IdAdministrator,Nume,Prenume,NrTelefon,Email,IdCamin")] Administrator administrator) { if (ModelState.IsValid) { _context.Add(administrator); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["IdCamin"] = new SelectList(_context.Camin, "IdCamin", "Adresa", administrator.IdCamin); return(View(administrator)); }