public async Task <IActionResult> Create([Bind("WarningId,WarningNumber,StudentId,Date")] Warning warning) { if (ModelState.IsValid) { _context.Add(warning); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(warning)); }
public async Task <IActionResult> Create([Bind("Id,EnteryDate,VistorName,VisitorID,StudentFirstName,StudentLasttName,ExitDate,ApartmentNum,Room,Signature")] VisitorsLog visitorsLog) { if (ModelState.IsValid) { _context.Add(visitorsLog); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(visitorsLog)); }
public async Task <IActionResult> Create([Bind("MessageID,Addressee,Subject,Content")] Message message) { if (ModelState.IsValid) { _context.Add(message); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(message)); }
public async Task <IActionResult> Create([Bind("ID,StundetId,FirstName,LastName,Password,Email,ApartmentNum,Room")] User user) { if (ModelState.IsValid) { _context.Add(user); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(user)); }
public async Task <IActionResult> Create([Bind("ID,StundetId,LastName,FirstName,RoomType,LivingWithReligious,LivingWithSmoker,ReligiousType,HealthCondition,PartnerId1,PartnerId2,PartnerId3,PartnerId4")] ApprovalKit approvalKit) { if (ModelState.IsValid) { _context.Add(approvalKit); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(approvalKit)); }
public async Task <IActionResult> Create([Bind("ID,StundetId,LastName,FirstName,Bday,gender,City,Adress,PostalCode,PhoneNumber,FieldOfStudy,SteadyYear,TypeOfService,HealthCondition,Seniority,ApertmantType,ParentID,ParentLastName,PartnerFirstName,ParentAge")] Registration registration) { if (ModelState.IsValid) { _context.Add(registration); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(registration)); }
public async Task <IActionResult> Create([Bind("ID,Apartment,RoomNum,FullName,PhoneNumber,Description")] FaultForm faultForm) { if (ModelState.IsValid) { _context.Add(faultForm); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(faultForm)); }