public ActionResult WildlifeSurveyEdit(int PermitKey, WildlifeSurveyVM model) { if (!ModelState.IsValid) return PartialView("WildlifeSurveyAddEdit", model); try { ThreatenedAndEndangeredSpeciesDO data = model.GetDataObject(); WildlifeSurveyBLL.Save(data); AjaxResult result = new AjaxResult(AjaxResult.AjaxStatus.OK, "Contact and address was saved"); return Json(result); } catch (Exception ex) { AjaxResult result = new AjaxResult(AjaxResult.AjaxStatus.ERROR, ex.Message); return Json(result); } }