예제 #1
0
        public ActionResult SignIn(string returnUrl)
        {
            if (ConstantValue.DeploymentMode == DeploymentMode.Camino)
            {
                var viewModel = new DashboardAuthenticationSignInViewModel();
                return(View(viewModel));
            }
            var configuration = _franchiseeConfigurationService.FirstOrDefault(o => true);

            if (configuration != null)
            {
                var viewModel = new DashboardAuthenticationSignInViewModel();
                return(View(viewModel));
            }
            return(RedirectToAction("Waiting"));
        }
예제 #2
0
        public IHttpActionResult CheckConnection(CheckConnectDto checkConnectDto)
        {
            var franchisee     = _franchiseeConfigurationService.FirstOrDefault();
            var franchiseeData = new FranchisseNameAndLicenseDto()
            {
                LicenseKey     = franchisee.LicenseKey,
                FranchiseeName = franchisee.Name
            };

            var objTokenStore = _webApiConsumeUserService.GetToken(franchiseeData);

            if (objTokenStore != null)
            {
                int checkConnectValue = _courierService.CheckConnection(checkConnectDto);
                return(Ok(new DtoBase {
                    Id = checkConnectValue
                }));
            }

            return(Ok(new DtoBase {
                Id = 10
            }));
        }