Esempio n. 1
0
        public ActionResult GetFormJson(string keyValue)
        {
            ModuleOperateOutputDto data = _sysModuleOperateApp.GetForm(keyValue);
            ModuleOperateDto       dto  = data.ModuleOperateDtoSingle;

            return(Content(JsonConvert.SerializeObject(dto)));
        }
Esempio n. 2
0
        public ActionResult CreateOpt(string moduleId)
        {
            ModuleOperateDto moduleOperateDto = new ModuleOperateDto();

            moduleOperateDto.ModuleId = int.Parse(moduleId);
            moduleOperateDto.IsValid  = true;
            return(View(moduleOperateDto));
        }
Esempio n. 3
0
        /// <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);
        }
Esempio n. 4
0
        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));
        }
Esempio n. 5
0
        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));
        }
Esempio n. 6
0
        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));
        }
Esempio n. 7
0
 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("数据验证失败"));
     }
 }