public ActionResult GetFormJson(string keyValue) { ModuleOperateOutputDto data = _sysModuleOperateApp.GetForm(keyValue); ModuleOperateDto dto = data.ModuleOperateDtoSingle; return(Content(JsonConvert.SerializeObject(dto))); }
public ActionResult CreateOpt(string moduleId) { ModuleOperateDto moduleOperateDto = new ModuleOperateDto(); moduleOperateDto.ModuleId = int.Parse(moduleId); moduleOperateDto.IsValid = true; return(View(moduleOperateDto)); }
/// <summary> /// 根据ID获取菜单详情 /// </summary> /// <param name="keyword"></param> /// <returns></returns> public ModuleOperateOutputDto GetForm(string keyword) { SysModuleOperateEntity userEntityList = _sysModuleOperateRepository.Get(keyword); ModuleOperateDto moduleOperateDtoList = AutoMapper.Mapper.Map <ModuleOperateDto>(userEntityList); ModuleOperateOutputDto outputDto = new ModuleOperateOutputDto(); outputDto.ModuleOperateDtoSingle = moduleOperateDtoList; return(outputDto); }
public PartialViewResult CreateModal_Operate(long ModuleId) { var viewModel = new ModuleOperateDto() { Id = -1, ModuleId = ModuleId, //Icon = "fa fa-puzzle-piece", Sort = 0 }; return(PartialView("_CreateOrEditModal_Opt", viewModel)); }
public async Task <bool> UpdateModuleOperate(ModuleOperateDto input) { var moduleOpterate = _moduleManager.GetModuleOperateById(input.Id).Result; moduleOpterate.OperateCode = input.OperateCode; moduleOpterate.OperateName = input.OperateName; moduleOpterate.ModuleId = input.ModuleId; moduleOpterate.IsValid = input.IsValid; moduleOpterate.Url = input.Url; moduleOpterate.Icon = input.Icon; moduleOpterate.Sort = input.Sort; return(await _moduleManager.UpdateModuleOperateAsync(moduleOpterate)); }
public async Task <bool> CreateModuleOperate(ModuleOperateDto input) { ModuleOperate newModuleOperate = new ModuleOperate() { OperateCode = input.OperateCode, OperateName = input.OperateName, ModuleId = input.ModuleId, IsValid = input.IsValid, Url = input.Url, Icon = input.Icon, Sort = input.Sort, }; return(await _moduleManager.CreateModuleOperateAsync(newModuleOperate)); }
public async Task <ActionResult> CreateOpt(ModuleOperateDto input) { if (input != null && ModelState.IsValid) { if (await _moduleAppService.CreateModuleOperate(input)) { return(Success("增加操作码成功")); } else { return(Error("增加操作码失败")); } } else { return(Error("数据验证失败")); } }