public IActionResult Edit(Survey survey) { if (ModelState.IsValid) { surveyService.EditSurvey(survey); return(View(survey)); } return(View()); }
public ActionResult Edit(int surveyModelId, SurveyParameter[] surveyParameters) { try { db.EditSurvey(surveyModelId, surveyParameters); } catch (Exception ex) { Log.Error(ex.Message, ex); return(new JsonResult() { Data = new { Status = "Error", Message = ex.Message } }); } return(new JsonResult() { Data = new { Status = "Ok" } }); }