示例#1
0
        public ActionResult Update(Model.AdaptMedicineUse model)
        {
            bool result = false;

            HTNResp.BLL.EvalGuid bllEvalGuid = new HTNResp.BLL.EvalGuid();
            if (model.EvalGuidId != null && bllEvalGuid.Exists(model.EvalGuidId.Value))
            {
                result = bll.Update(model);
            }
            if (result)
            {
                return(this.Json(new { result = 1, data = "" }));
            }
            else
            {
                return(this.Json(new { result = 0, msg = "修改失败" }));
            }
        }
示例#2
0
        public override ActionResult Info(int id)
        {
            bool result = false;

            Model.AdaptMedicineUse model = bll.GetModel(id);
            if (model != null)
            {
                result = true;
            }
            if (result)
            {
                return(this.Json(new { result = result ? 1 : 0, data = model }, JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(this.Json(new { result = 0, msg = "新建失败" }));
            }
        }