public ActionResult AddDictionaryData() { int id = Convert.ToInt32(Request.Form["id"]); string text = Request.Form["text"].ToString().Trim(); int parId = Convert.ToInt32(Request.Form["parId"]); DictionaryEntity entity = new DictionaryEntity { Name = text, Abbreviation = string.Empty, ParId = parId, DelFlag = 1 }; if (_dictionaryService.AddEntity(entity)) { return(Json(new ResultModel { StatusCode = System.Net.HttpStatusCode.OK, Message = "Success" })); } else { return(Json(new ResultModel { StatusCode = System.Net.HttpStatusCode.InternalServerError, Message = "An Error Occued when saving DictionaryEntity" })); } }