public ActionResult DeleteMenu(int Code) { try { string strMessage = ""; bool _success = false; var Menu = dbUser.getMenubyId(Code); int maxValue = dbUser.DeleteMenu(Menu); if (maxValue > 0) { strMessage = "Record successfully deleted."; _success = true; } else { strMessage = "Application server error."; } return(Json(new { success = _success, response = strMessage })); } catch (Exception ex) { Log.LogWrite(ex.Message, "Menu Delete", ex); return(Json(new { success = false, response = ex.Message.ToString() })); } }