public IActionResult Delete(string id) { try { if (SessionIsNull()) { return(Redirect("/Home/Login?mustLogin=true&next=/Curriculum/Delete?id=" + id)); } PlanService ser = new PlanService(); int result = ser.DeleteCurriculum(id); SetViewBag(); if (result == 1) { return(Redirect("/Curriculum/ViewCurriculum?delete_success=true")); } else { return(Redirect("/Curriculum/ViewCurriculum?delete_error=true")); } } catch (System.Exception) { return(Redirect("/Curriculum/ViewCurriculum?delete_error=true")); } }
public JsonResult DeleteCurriculum2(string id) { PlanService ser = new PlanService(); int result = ser.DeleteCurriculum(id); SetViewBag(); return(Json(result)); }