public IHttpActionResult EditAsBuilt(AsBuilt asBuiltObj) { if (asBuiltObj == null) { return(BadRequest("asbuilt object cannot be found the http request body")); } try { asBuiltObj.CreatedDate = DateTime.Now; jobsService.EditAsBuilt(asBuiltObj); var asBuilts = jobsService.GetJobAsBuilt(asBuiltObj.JobId); var html = Helpers.RenderPartial("~/Views/Shared/Partial/Jobs/AsBuiltList.cshtml", asBuilts); return(Ok(html)); } catch (Exception ex) { return(InternalServerError(ex)); } }