Пример #1
0
        public ActionResult CreateColumnFilter(string moduleId)
        {
            ModuleColumnFilterDto columnFilterDto = new ModuleColumnFilterDto();

            columnFilterDto.ModuleId = int.Parse(moduleId);
            columnFilterDto.IsValid  = true;
            return(View(columnFilterDto));
        }
Пример #2
0
        public PartialViewResult CreateModal_ColumnFilter(long ModuleId)
        {
            var viewModel = new ModuleColumnFilterDto()
            {
                Id       = -1,
                ModuleId = ModuleId,
                Sort     = 0
            };

            return(PartialView("_CreateOrEditModal_CF", viewModel));
        }
Пример #3
0
        public async Task <bool> UpdateColumnFilter(ModuleColumnFilterDto input)
        {
            var newColumnFilter = _moduleManager.GetColumnFilterById(input.Id).Result;

            newColumnFilter.ColumnCode = input.ColumnCode;
            newColumnFilter.ColumnName = input.ColumnName;
            newColumnFilter.ModuleId   = input.ModuleId;
            newColumnFilter.IsValid    = input.IsValid;
            newColumnFilter.Sort       = input.Sort;

            return(await _moduleManager.UpdateColumnFilterAsync(newColumnFilter));
        }
Пример #4
0
        public async Task <bool> CreateColumnFilter(ModuleColumnFilterDto input)
        {
            ModuleColumnFilter newColumnFilter = new ModuleColumnFilter()
            {
                ColumnCode = input.ColumnCode,
                ColumnName = input.ColumnName,
                ModuleId   = input.ModuleId,
                IsValid    = input.IsValid,
                Sort       = input.Sort,
            };

            return(await _moduleManager.CreateColumnFilterAsync(newColumnFilter));
        }
Пример #5
0
 public async Task <ActionResult> CreateColumnFilter(ModuleColumnFilterDto input)
 {
     if (input != null && ModelState.IsValid)
     {
         if (await _moduleAppService.CreateColumnFilter(input))
         {
             return(Success("增加列过滤器成功"));
         }
         else
         {
             return(Error("增加过滤器失败"));
         }
     }
     else
     {
         return(Error("数据验证失败"));
     }
 }