public async Task <IActionResult> Edit(string id, [Bind("ServiceRequest_ID,HandyMan_ID,ServiceRequestImage,ServiceRequestDesc,ServiceRequestStatus,ServiceRequestStartDate,ServiceRequestEndDate,Remarks")] ServiceRequestChild serviceRequestChild) { if (id != serviceRequestChild.ServiceRequest_ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(serviceRequestChild); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ServiceRequestChildExists(serviceRequestChild.ServiceRequest_ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction("Index")); } return(View(serviceRequestChild)); }
public async Task <IActionResult> Create([Bind("ServiceRequest_ID,HandyMan_ID,ServiceRequestImage,ServiceRequestDesc,ServiceRequestStatus,ServiceRequestStartDate,ServiceRequestEndDate,Remarks")] ServiceRequestChild serviceRequestChild) { if (ModelState.IsValid) { _context.Add(serviceRequestChild); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(serviceRequestChild)); }