Exemplo n.º 1
0
        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="_userVM"></param>
        /// <returns></returns>
        public ActionResult Edit(BusinessBannerImageVM vm)
        {
            vm.BusinessBannerImage = _businessBannerImageService.GetById(vm.Id) ?? new BusinessBannerImage();
            vm.BusinessBannerImage.BusinessInfo = vm.BusinessBannerImage.BusinessInfo ?? new BusinessInfo();
            vm.BusinessBannerImage.BaseImage    = vm.BusinessBannerImage.BaseImage ?? new BaseImage();
            vm.ImgInfo = vm.BusinessBannerImage.BaseImage ?? new BaseImage();
            int tcount = 0;

            vm.BusinessList = _businessService.GetListByType(vm.BusinessBannerImage.Module, 1, 100000, out tcount);
            return(View(vm));
        }
Exemplo n.º 2
0
        /// <summary>
        /// 列表
        /// </summary>
        /// <param name="_userVM"></param>
        /// <param name="pn"></param>
        /// <returns></returns>
        public ActionResult List(BusinessBannerImageVM _businessBannerImageVM, int pn = 1)
        {
            int totalCount,
                pageIndex = pn,
                pageSize  = PagingConfig.PAGE_SIZE;
            var list      = _businessBannerImageService.GetManagerList(_businessBannerImageVM.QueryName, pageIndex, pageSize, out totalCount);
            var paging    = new Paging <BusinessBannerImage>()
            {
                Items = list,
                Size  = PagingConfig.PAGE_SIZE,
                Total = totalCount,
                Index = pn,
            };

            _businessBannerImageVM.Paging = paging;
            return(View(_businessBannerImageVM));
        }