public ActionResult Create(CreateModuleDto module) { var id = _moduleAppService.CreateModule(module); var input = new ModuleSearchInputDto(); var output = _moduleAppService.SearchModules(input); return(PartialView("_ListModules", output.Modules)); }
public void TestCreateModule() { CreateModuleInput entity = new CreateModuleInput() { ParentId = 0, Icon = "fa fa-puzzle-piece", EnabledMark = true, Sort = 0, ModuleCode = "BaseManager", ModuleName = "系统管理", Remark = "平台的基础管理模块", IsLast = true, Url = "BaseManager" }; _moduleAppService.CreateModule(entity); }
public async Task <ActionResult> Create(CreateModuleInput model) { if (model != null && ModelState.IsValid) { if (await _moduleAppService.CreateModule(model)) { return(Success("增加模块成功")); } else { return(Error("增加模块失败")); } } else { return(Error("模块数据验证失败")); } }