コード例 #1
0
        public async Task <IActionResult> Index()
        {
            if (UserHasPermission(Permission.ManageVendorCodes))
            {
                var vendorCodeStatus = await _vendorCodeService.GetStatusAsync();

                if (vendorCodeStatus.IsConfigured)
                {
                    return(View(vendorCodeStatus));
                }
                else
                {
                    var vendorCodeType = await _vendorCodeService.GetTypeAllAsync();

                    if (vendorCodeType?.Count == 0)
                    {
                        return(RedirectToAction(nameof(Configure)));
                    }
                    else
                    {
                        return(RedirectToAction(nameof(GenerateCodes)));
                    }
                }
            }

            return(RedirectToAction(nameof(ViewPackingSlip)));
        }
コード例 #2
0
 public async Task <IActionResult> Index()
 {
     return(View(await _vendorCodeService.GetStatusAsync()));
 }