public ActionResult AddModel() { if (!AppData.IsManagerLogin) { return(Json(new { success = false, msg = "您未登录后台或会话已过期" })); } if (PrivilegeBLL.HasNotPrivilege(AppData.SessionUserID, 4)) { return(Json(new { success = false, msg = "您没有执行该操作的权限" })); } Validation vld = new Validation(); string modelName = vld.Get("modelName", false); string content = vld.Get("content", false); content = HttpUtility.UrlDecode(content, Encoding.UTF8); if (vld.HasError) { return(Json(new { success = false, msg = "请查看是否有未填的项" })); } ProductBLL productBLL = new ProductBLL(); productBLL.AddModel(modelName, content); return(Json(new { success = true })); }