public ActionResult Index() { base.SetDisplayBtn(); base.SetCreateBtn(); base.SetEditBtn(); base.SetDeleteBtn(); var model = new SYS_DICTIONARY_DATAModel(); return(View(model)); }
public ActionResult Display(string ID) { var model = new SYS_DICTIONARY_DATAModel(); var entity = SYS_DICTIONARY_DATAService.SYS_DICTIONARY_DATAList.FirstOrDefault(t => t.ID == ID); if (null != entity) { model = new SYS_DICTIONARY_DATAModel { ID = entity.ID }; } return(View(model)); }
public ActionResult Create(SYS_DICTIONARY_DATAModel model) { if (ModelState.IsValid) { this.CreateBaseData <SYS_DICTIONARY_DATAModel>(model); OperationResult result = SYS_DICTIONARY_DATAService.Insert(model); if (result.ResultType == OperationResultType.Success) { return(Json(result)); } else { return(PartialView(model)); } } else { return(PartialView(model)); } }
public OperationResult Insert(SYS_DICTIONARY_DATAModel model) { var entity = new SYS_DICTIONARY_DATA { ID = model.ID, DictionaryValue = model.DictionaryValue, DictDataName = model.DictDataName, DictDataValue = model.DictDataValue, DictDataType = model.DictDataType, IsFixed = model.IsFixed, IsCancel = model.IsCancel, DictParentID = model.DictParentID, CreateDate = model.CreateDate, ModiDate = model.ModiDate, Remark = model.Remark, DisplayOrder = model.DisplayOrder, }; SYS_DICTIONARY_DATARepository.Insert(entity); return(new OperationResult(OperationResultType.Success, "Added successfully")); }
public ActionResult Create() { var model = new SYS_DICTIONARY_DATAModel(); return(PartialView(model)); }