public PartialViewResult CreateModal(long?parentId) { var viewModel = new CreateModuleInput() { ParentId = parentId, Icon = "fa fa-puzzle-piece", EnabledMark = true, Sort = 0 }; return(PartialView("_CreateOrEditModal", viewModel)); }
public async Task <bool> UpdateModule(CreateModuleInput input) { var module = _moduleManager.GetModuleById(input.Id); module.ModuleCode = input.ModuleCode; module.ModuleName = input.ModuleName; module.ParentId = input.ParentId; module.Url = input.Url; module.Icon = input.Icon; module.Sort = input.Sort; module.Remark = input.Remark; module.EnabledMark = input.EnabledMark; module.IsLast = input.IsLast; return(await _moduleManager.UpdateModuleAsync(module)); }
public ActionResult Create(string parentId) { if (parentId == null) { parentId = "0"; } CreateModuleInput entity = new CreateModuleInput() { ParentId = int.Parse(parentId), Icon = "fa fa-puzzle-piece", EnabledMark = true, Sort = 0 }; return(View(entity)); }
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 <bool> CreateModule(CreateModuleInput input) { Module newModule = new Module() { TenantId = AbpSession.TenantId, ModuleCode = input.ModuleCode, ModuleName = input.ModuleName, ParentId = input.ParentId, Url = input.Url, Icon = input.Icon, Sort = input.Sort, Remark = input.Remark, EnabledMark = input.EnabledMark, IsLast = input.IsLast }; return(await _moduleManager.CreateModuleAsync(newModule)); }
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("模块数据验证失败")); } }
public ActionResult Edit(string id) { CreateModuleInput entity = _moduleAppService.GetModuleById(int.Parse(id)); return(View(entity)); }