public ActionResult Create(Model.SubtMedicineDetail 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.Name)) { HTNResp.BLL.SubtMedicineDetail bll = new HTNResp.BLL.SubtMedicineDetail(); HTNResp.BLL.PermissionTable per = new BLL.PermissionTable(); var state = bll.Add(model); if (state != 0) { result = true; } } if (result) { return(this.Json(new { result = 1, data = "" })); } else { return(this.Json(new { result = 0, msg = "新建失败" })); } }
public ActionResult Update(Model.UserTable model, string authIdsa) { bool result = false; HTNResp.BLL.Program bllProgram = new BLL.Program(); HTNResp.BLL.PermissionTable per = new BLL.PermissionTable(); if (!String.IsNullOrEmpty(model.UserName) && !String.IsNullOrEmpty(model.UserCode) && !String.IsNullOrEmpty(model.Password)) { result = bll.Update(model); var list = authIdsa.Split(','); if (result) { if (string.IsNullOrEmpty(authIdsa)) { list = new List <string>().ToArray(); } else { int temp = DbHelperSQL.ExecuteSql("delete from PermissionTable where UserID=" + model.ID); } foreach (var item in list) { if (per.Add(new Model.PermissionTable() { TableID = int.Parse(item), UserID = model.ID }) != 0) { continue; } else { result = false; break; } } result = true; } } if (result) { return(this.Json(new { result = 1, data = "" })); } else { return(this.Json(new { result = 0, msg = "修改失败" })); } }
public ActionResult Create(Model.UserTable model, string authIdsa) { bool result = false; //model.ID = 1; HTNResp.BLL.Program bllProgram = new BLL.Program(); HTNResp.BLL.EvalGuid bllEvalGuid = new BLL.EvalGuid(); if (!String.IsNullOrEmpty(model.UserName) && !String.IsNullOrEmpty(model.UserCode) && !String.IsNullOrEmpty(model.Password)) { HTNResp.BLL.UserTable bll = new HTNResp.BLL.UserTable(); HTNResp.BLL.PermissionTable per = new BLL.PermissionTable(); var state = bll.Add(model); var list = authIdsa.Split(','); if (state != 0) { if (string.IsNullOrEmpty(authIdsa)) { list = new List <string>().ToArray(); } foreach (var item in list) { if (per.Add(new Model.PermissionTable() { TableID = int.Parse(item), UserID = state }) != 0) { continue; } else { result = false; break; } } result = true; } } if (result) { return(this.Json(new { result = 1, data = "" })); } else { return(this.Json(new { result = 0, msg = "新建失败" })); } }
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 Update(Model.SubtMedicineDetail model) { bool result = false; HTNResp.BLL.Program bllProgram = new BLL.Program(); HTNResp.BLL.PermissionTable per = new BLL.PermissionTable(); if (!String.IsNullOrEmpty(model.Name)) { result = bll.Update(model); if (result) { 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 = "新建失败" })); } }
private void button4_Click(object sender, EventArgs e) { BLL.Program prog = new BLL.Program(); prog.AddSertificate(); MessageBox.Show("Succesful!"); }