public async Task <IActionResult> Edit(int id, [Bind("ID,ClientContactPerson,ClientContactNumber,ClientCompanyName,ClientRateSheetID,LastUpdateDate")] ClientClass clientClass) { if (id != clientClass.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(clientClass); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ClientClassExists(clientClass.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(clientClass)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,Name,UserName,Password,MobileNumber,AuthorityLevel")] Staff_class staff_class) { if (id != staff_class.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(staff_class); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Staff_classExists(staff_class.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(staff_class)); }
public async Task <IActionResult> Edit(string id, [Bind("ContainerNumber,OceanFreightETA,TimeToYard,ClientCompanyName,HandlerName,IfCartageOnly,IfRequireDelivery,IfRequireStorage,IfBookedCartage,IfEnteredCartonCloud,ChargeFrom,IfExtraLeg,IfInvoiced")] ContainerClass containerClass) { if (id != containerClass.ContainerNumber) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(containerClass); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ContainerClassExists(containerClass.ContainerNumber)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(containerClass)); }