Exemplo n.º 1
0
        public override ActionResult Info(int id)
        {
            Model.EvaluationContent 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 = "" }));
            }
        }
Exemplo n.º 2
0
        public override ActionResult Delete(int id)
        {
            Model.EvaluationContent model = bll.GetModel(id);
            bool result = false;

            if (model != null)
            {
                model.Status = null;
                result       = bll.Update(model);
            }
            if (result)
            {
                return(this.Json(new { result = 1, data = "" }));
            }
            else
            {
                return(this.Json(new { result = 0, msg = "删除失败" }));
            }
        }
Exemplo n.º 3
0
        public ActionResult Update(Model.EvaluationContent model)
        {
            bool result = false;

            HTNResp.BLL.EvalGuid bllEvalGuid = new BLL.EvalGuid();
            if (model.EvalGuidId.Value != null && bllEvalGuid.Exists(model.EvalGuidId.Value))
            {
                HTNResp.BLL.Program bllProgram = new BLL.Program();
                if (!String.IsNullOrEmpty(model.DecisionRule) && String.IsNullOrEmpty(bllProgram.testContent(model.DecisionRule)))
                {
                    result = bll.Update(model);
                }
            }
            if (result)
            {
                return(this.Json(new { result = 1, data = "" }));
            }
            else
            {
                return(this.Json(new { result = 0, msg = "修改失败" }));
            }
        }