Esempio n. 1
0
        public ActionResult xhprizeInfo()
        {
            QueryWXCustomerViewModel vm = new QueryWXCustomerViewModel();

            vm.SearchCondition = new WXCustomerSearchCondition();
            vm.PageIndex       = 0;
            vm.PageCount       = 0;
            vm.Customers       = ApplicationConfigHelper.GetProjectUserCustomers(base.UserInfo.ProjectID, base.UserInfo.ID)
                                 .Select(c => new SelectListItem()
            {
                Value = c.CustomerID.ToString(), Text = c.CustomerName
            });
            return(View(vm));
        }
Esempio n. 2
0
        public ActionResult wxcustomer(QueryWXCustomerViewModel vm, int?PageIndex)
        {
            vm.Customers = ApplicationConfigHelper.GetProjectUserCustomers(base.UserInfo.ProjectID, base.UserInfo.ID)
                           .Select(c => new SelectListItem()
            {
                Value = c.CustomerID.ToString(), Text = c.CustomerName
            });

            var response = (new WXCustomerService()).GetQueryWXCustomer(new QueryWXCustomerRequests()
            {
                PageIndex       = PageIndex ?? 0,
                PageSize        = UtilConstants.PAGESIZE,
                SearchCondition = vm.SearchCondition,
                //Customers = sb.ToString().Substring(0, sb.Length - 1).ToString()
            });

            if (response.IsSuccess)
            {
                vm.WXCustomerCollection = response.Result.WXCustomerCollection;
                vm.PageCount            = response.Result.PageCount;
                vm.PageIndex            = response.Result.PageIndex;
            }
            return(View(vm));
        }