// To protect from overposting attacks, enable the specific properties you want to bind to, for // more details, see https://aka.ms/RazorPagesCRUD. public async Task <IActionResult> OnPostAsync() { UserRole = HttpContext.Session.GetString("UserRole"); if (!ModelState.IsValid) { return(Page()); } _context.Attach(TblWarehouse).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblWarehouseExists(TblWarehouse.WarehouseId)) { return(NotFound()); } else { throw; } } return(RedirectToPage("./WDisplay")); }
// To protect from overposting attacks, enable the specific properties you want to bind to, for // more details, see https://aka.ms/RazorPagesCRUD. public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.Attach(TblRecordProduct).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblRecordProductExists(TblRecordProduct.ProductId)) { return(NotFound()); } else { throw; } } return(RedirectToPage("./RpDisplay")); }