public async Task <IActionResult> Create([Bind("Id,LastModifiedBy,CreatedDate,ModifiedDate,Name")] ServicesType servicesType) { if (ModelState.IsValid) { _context.Add(servicesType); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(servicesType)); }
public async Task <IActionResult> Create([Bind("Id,Name,LastModifiedBy,CreatedDate,ModifiedDate")] Outlet outlet) { if (ModelState.IsValid) { _context.Add(outlet); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(outlet)); }
public async Task <IActionResult> Create([Bind("Id,AccessFailedCount,ConcurrencyStamp,Email,EmailConfirmed,LockoutEnabled,LockoutEnd,NormalizedEmail,NormalizedUserName,PasswordHash,PhoneNumber,PhoneNumberConfirmed,SecurityStamp,TwoFactorEnabled,UserName")] AspNetUsers aspNetUsers) { if (ModelState.IsValid) { _context.Add(aspNetUsers); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(aspNetUsers)); }
public async Task <IActionResult> Create([Bind("Id,GiftCertificateId,RedemptionDate,LastModifiedBy,CreatedDate,ModifiedDate")] Gcredemption gcredemption) { if (ModelState.IsValid) { _context.Add(gcredemption); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["GiftCertificateId"] = new SelectList(_context.GiftCertificate, "Id", "Id", gcredemption.GiftCertificateId); return(View(gcredemption)); }
public async Task <IActionResult> Create([Bind("Id,GcTypeId,Value,IssuanceDate,DtipermitNo,ExpirationDate,LastModifiedBy,CreatedDate,ModifiedDate,Qrcode,Active")] GiftCert GiftCert) { if (ModelState.IsValid) { _context.Add(GiftCert); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["GcTypeId"] = new SelectList(_context.GcType, "Id", "Id", GiftCert.GcTypeId); return(View(GiftCert)); }