コード例 #1
0
        public async Task <IActionResult> UsageReport()
        {
            var model = new UsageListModel();

            model.strItem = "ALL";

            //CostCenter DropDown
            model.AvailableCostCenter.Add(new SelectListItem {
                Text = "ALL", Value = "0"
            });

            foreach (var item in (await _financialDataService.GetCostCenterList((int)_workContext.CurrentCustomer.ClientId)))
            {
                model.AvailableCostCenter.Add(new SelectListItem {
                    Text = item.Both, Value = item.SName.ToString()
                });
            }

            //Vendor Dropdown
            model.AvailableVendors.Add(new SelectListItem {
                Text = "ALL", Value = "0"
            });

            foreach (var item in (await _financialDataService.GetVendorUsage((int)_workContext.CurrentCustomer.ClientId)))
            {
                model.AvailableVendors.Add(new SelectListItem {
                    Text = item.HVendorName, Value = item.HVendorName.ToString()
                });
            }

            return(View(model));
        }
コード例 #2
0
        public async Task <IActionResult> OrderStatusReport()
        {
            var model = new OrderStatusModel();

            model.AvailableVendor.Add(new SelectListItem {
                Text = "All", Value = "0"
            });
            foreach (var item in (await _financialDataService.GetVendorUsage((int)_workContext.CurrentCustomer.ClientId)))
            {
                model.AvailableVendor.Add(new SelectListItem {
                    Text = item.HVendorName, Value = item.HVendorName
                });
            }

            model.AvailableCostCenter.Add(new SelectListItem {
                Text = "All", Value = "0"
            });
            foreach (var item in (await _financialDataService.GetCostCenterList((int)_workContext.CurrentCustomer.ClientId)))
            {
                model.AvailableCostCenter.Add(new SelectListItem {
                    Text = item.SName, Value = item.ShipID
                });
            }


            return(View(model));
        }