public ActionResult WildlifeSurveyEdit(int PermitKey, int Id)
 {
     ThreatenedAndEndangeredSpeciesDO tesdo = WildlifeSurveyBLL.GetBySpeciesID(Id);
     WildlifeSurveyVM model = new WildlifeSurveyVM(tesdo);
     return PartialView("WildlifeSurveyAddEdit", model);
 }
        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);
            }
        }
 public ActionResult WildlifeSurveyAdd(int PermitKey)
 {
     WildlifeSurveyVM model = new WildlifeSurveyVM();
     model.PermitKey = PermitKey;
     return PartialView("WildlifeSurveyAddEdit", model);
 }