예제 #1
0
        public ActionResult List(ShipperListVM vm, int?PageIndex)
        {
            var response = new ShipperService().GetShippersByConditon(new GetShippersByConditionRequest()
            {
                ProjectId = base.UserInfo.ProjectID, Code = string.IsNullOrEmpty(vm.Code) ? "" : vm.Code, Name = string.IsNullOrEmpty(vm.Name) ? "" : vm.Name, EnglishName = string.IsNullOrEmpty(vm.EnglishName) ? "" : vm.EnglishName, State = vm.State, PageSize = UtilConstants.PAGESIZE, PageIndex = PageIndex ?? 0
            });

            if (response.IsSuccess)
            {
                vm.Shippers  = response.Result.Shippers;
                vm.PageIndex = response.Result.PageIndex;
                vm.PageCount = response.Result.PageCount;
            }
            else
            {
                ViewBag.Message = "查询失败.";
            }

            return(View(vm));
        }
예제 #2
0
        public ActionResult List()
        {
            ShipperListVM vm       = new ShipperListVM();
            var           response = new ShipperService().GetShippersByConditon(new GetShippersByConditionRequest()
            {
                ProjectId = base.UserInfo.ProjectID, Code = "", Name = "", EnglishName = "", State = true, PageSize = UtilConstants.PAGESIZE, PageIndex = 0
            });

            if (response.IsSuccess)
            {
                vm.Shippers  = response.Result.Shippers;
                vm.State     = true;
                vm.PageIndex = response.Result.PageIndex;
                vm.PageCount = response.Result.PageCount;
            }
            else
            {
                ViewBag.Message = "查询失败.";
            }

            return(View(vm));
        }