public ActionResult Create(string id) { DEF_CaseTypeModel entity = new DEF_CaseTypeModel() { ParentId = id, }; return(View(entity)); }
public ActionResult Create(string id) { ViewBag.Perm = GetPermission(); DEF_CaseTypeModel entity = new DEF_CaseTypeModel() { ParentId = id, }; return(View(entity)); }
public virtual DEF_CaseTypeModel GetById(string id) { if (IsExists(id)) { DEF_CaseType entity = m_Rep.GetById(id); DEF_CaseTypeModel model = new DEF_CaseTypeModel(); model.Id = entity.Id; model.Name = entity.Name; model.ParentId = entity.ParentId; model.IsLast = entity.IsLast; return(model); } else { return(null); } }
public JsonResult Edit(DEF_CaseTypeModel model) { if (model != null && ModelState.IsValid) { if (m_BLL.Edit(ref errors, model)) { LogHandler.WriteServiceLog(GetUserId(), "Id" + model.Id + ",Name" + model.Name, "成功", "修改", "DEF_CaseType"); return(Json(JsonHandler.CreateMessage(1, Resource.EditSucceed))); } else { string ErrorCol = errors.Error; LogHandler.WriteServiceLog(GetUserId(), "Id" + model.Id + ",Name" + model.Name + "," + ErrorCol, "失败", "修改", "DEF_CaseType"); return(Json(JsonHandler.CreateMessage(0, Resource.EditFail + ":" + ErrorCol))); } } else { return(Json(JsonHandler.CreateMessage(0, Resource.EditFail))); } }
public JsonResult Create(DEF_CaseTypeModel model) { model.Id = ResultHelper.NewId; model.IsLast = false; if (model != null && ModelState.IsValid) { if (m_BLL.Create(ref errors, model)) { LogHandler.WriteServiceLog(GetUserId(), "Id" + model.Id + ",Name" + model.Name, "成功", "创建", "DEF_CaseType"); return(Json(JsonHandler.CreateMessage(1, Resource.InsertSucceed))); } else { string ErrorCol = errors.Error; LogHandler.WriteServiceLog(GetUserId(), "Id" + model.Id + ",Name" + model.Name + "," + ErrorCol, "失败", "创建", "DEF_CaseType"); return(Json(JsonHandler.CreateMessage(0, Resource.InsertFail + ErrorCol))); } } else { return(Json(JsonHandler.CreateMessage(0, Resource.InsertFail))); } }
public ActionResult Details(string id) { DEF_CaseTypeModel entity = m_BLL.GetById(id); return(View(entity)); }