public async Task <IActionResult> Edit(int id, [Bind("task_ID,task_name,task_instructions,task_createdate,task_prioritystatus,task_completionstatus,task_duedate")] task task) { if (id != task.task_ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(task); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!taskExists(task.task_ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(task)); }
public async Task <IActionResult> Edit(int id, [Bind("service_id,service_name,service_description,service_datetime,service_venue,service_createddate")] service service) { if (id != service.service_id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(service); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!serviceExists(service.service_id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(service)); }
public async Task <IActionResult> Edit(int id, [Bind("order_id,order_name,order_createddate,order_status,order_description,order_quantity,order_prioritystatus")] order order) { if (id != order.order_id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(order); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!orderExists(order.order_id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(order)); }
public async Task <IActionResult> Edit(int id, [Bind("teamleader_ID")] teamLeader teamLeader) { if (id != teamLeader.teamleader_ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(teamLeader); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!teamLeaderExists(teamLeader.teamleader_ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(teamLeader)); }
public async Task <IActionResult> Edit(int id, [Bind("checklist_ID,checklist_description,checklist_createddate")] checklist checklist) { if (id != checklist.checklist_ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(checklist); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!checklistExists(checklist.checklist_ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(checklist)); }
public async Task <IActionResult> Edit(int id, [Bind("orderitem_ID")] orderItems orderItems) { if (id != orderItems.orderitem_ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(orderItems); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!orderItemsExists(orderItems.orderitem_ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(orderItems)); }
public async Task <IActionResult> Edit(int id, [Bind("boxresource_id")] boxResource boxResource) { if (id != boxResource.boxresource_id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(boxResource); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!boxResourceExists(boxResource.boxresource_id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(boxResource)); }
public async Task <IActionResult> Edit(int id, [Bind("user_ID,user_type,user_firstname,user_lastname,user_emailaddress,user_password,user_datecreated,user_status")] user user) { if (id != user.user_ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(user); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!userExists(user.user_ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(user)); }
public async Task <IActionResult> Edit(int id, [Bind("resource_ID,resource_type,resource_name,resource_description,resource_datebought,resource_datecreated,resource_datelastmodified,resource_conditionstatus,resource_availabilitystatus,resource_bookedfordate")] resource resource) { if (id != resource.resource_ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(resource); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!resourceExists(resource.resource_ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(resource)); }
public async Task <IActionResult> Edit(int id, [Bind("box_id,box_name,box_row,box_column,box_createddate")] box box) { if (id != box.box_id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(box); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!boxExists(box.box_id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(box)); }
public async Task <IActionResult> Edit(int id, [Bind("repair_ID,repair_description,repair_prioritystatus,repair_completionstatus,repair_createddate")] repair repair) { if (id != repair.repair_ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(repair); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!repairExists(repair.repair_ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(repair)); }