public ActionResult Update(Model.PrevensionProject model) { bool result = false; HTNResp.BLL.Program bllProgram = new BLL.Program(); HTNResp.BLL.EvalGuid bllEvalGuid = new BLL.EvalGuid(); if (!String.IsNullOrEmpty(model.DecisionRule) && String.IsNullOrEmpty(bllProgram.testContent(model.DecisionRule)) && model.EvalGuidId.Value != 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 = "修改失败" })); } }
public ActionResult Update(Model.AccessTable model) { bool result = false; HTNResp.BLL.Program bllProgram = new BLL.Program(); HTNResp.BLL.EvalGuid bllEvalGuid = new BLL.EvalGuid(); if (!String.IsNullOrEmpty(model.TableName) && String.IsNullOrEmpty(bllProgram.testContent(model.TableAdress)) && String.IsNullOrEmpty(bllProgram.testContent(model.TableName))) { result = bll.Update(model); } if (result) { return(this.Json(new { result = 1, data = "" })); } else { return(this.Json(new { result = 0, msg = "修改失败" })); } }
public override ActionResult Confirm() { string msg = ""; string content = Request.Params["string"]; bool result = true; HTNResp.BLL.Program bllProgram = new BLL.Program(); msg = bllProgram.testContent(content); if (!String.IsNullOrEmpty(msg)) { result = false; msg = msg.Remove(msg.Length - 1); } if (result) { return(this.Json(new { result = 1, data = "" })); } else { return(this.Json(new { result = 0, msg = msg })); } }
public ActionResult Create(Model.NonMedicineCure model) { bool result = false; model.Status = 1; HTNResp.BLL.Program bllProgram = new BLL.Program(); HTNResp.BLL.EvalGuid bllEvalGuid = new BLL.EvalGuid(); if (!String.IsNullOrEmpty(model.DecisionRule) && String.IsNullOrEmpty(bllProgram.testContent(model.DecisionRule)) && model.EvalGuidId.Value != null && bllEvalGuid.Exists(model.EvalGuidId.Value)) { if (bll.Add(model) != 0) { result = true; } } if (result) { return(this.Json(new { result = 1, data = "" })); } else { return(this.Json(new { result = 0, msg = "新建失败" })); } }
public ActionResult Create(Model.AccessTable model) { bool result = false; //model.ID = 1; HTNResp.BLL.Program bllProgram = new BLL.Program(); HTNResp.BLL.EvalGuid bllEvalGuid = new BLL.EvalGuid(); if (!String.IsNullOrEmpty(model.TableName) && String.IsNullOrEmpty(bllProgram.testContent(model.TableName)) && model.TableAdress != null) { if (bll.Add(model) != 0) { result = true; } } if (result) { return(this.Json(new { result = 1, data = "" })); } else { return(this.Json(new { result = 0, msg = "新建失败" })); } }