コード例 #1
0
        public async Task <ActionResult> AjaxIndex()
        {
            var result = await _locationServices.GetList(GetFilters(), GetSort(), GetAccount());

            var branchs = await _basicInfoServices.GetBranchs(GetAccount());

            foreach (var vm in result.data)
            {
                var branchId = vm.BranchId.ToString();
                vm.StorageNum = branchs.FirstOrDefault(o => o.Value == branchId).Text;
            }
            return(Json(result));
        }
コード例 #2
0
        public async Task Init(ProductViewModel vm)
        {
            vm.Branchs = await _basicInfoServices.GetBranchs(GetAccount());

            vm.Goods = await _basicInfoServices.GetGoods(GetAccount());

            vm.Customers = await _basicInfoServices.GetCustomers(GetAccount());

            vm.Measures = await _basicInfoServices.GetMeasures(GetAccount());
        }
コード例 #3
0
        private async Task Init(BranchViewModel vm)
        {
            var branchs = await _basicInfoServices.GetBranchs(GetAccount());

            if (vm.Id != 0)
            {
                branchs = branchs.Where(o => o.Text != vm.Name).ToList();
            }
            branchs.Insert(0, new SelectListItem()
            {
                Text = "", Value = ""
            });
            ViewBag.Branchs = branchs;
        }
コード例 #4
0
        private async Task Init(AccountViewModel vm)
        {
            ViewBag.Roles = await _basicInfoServices.GetRoles(GetAccount());

            ViewBag.Branchs = await _basicInfoServices.GetBranchs(GetAccount());
        }