public override ActionResult Info(int id) { Model.EvalGuid model = bll.GetModel(id); bool result = model != null ? true : false; if (result) { return(this.Json(new { result = 1, data = model }, JsonRequestBehavior.AllowGet)); } else { return(this.Json(new { result = 0, msg = "查询失败" })); } }
public ActionResult Update(Model.EvalGuid model) { bool result = false; if (!string.IsNullOrEmpty(model.GuidName)) { result = bll.Update(model); } if (result) { return(this.Json(new { result = 1, data = "" })); } else { return(this.Json(new { result = 0, msg = "修改失败" })); } }
public ActionResult Create(Model.EvalGuid model) { bool result = false; if (!string.IsNullOrEmpty(model.GuidName)) { if (bll.Add(model) != 0) { result = true; } } if (result) { return(this.Json(new { result = 1, data = "" })); } else { return(this.Json(new { result = 0, msg = "新建失败" })); } }