public async Task <IActionResult> Overzicht() { var httpcontext = HttpContext; //var refreshToken = await HttpContext.GetTokenAsync("refresh_token"); //var service = new ExactOnlineService(); var refreshTokenClient = _httpClientFactory.CreateClient(); //var authInfo = await HttpContext.AuthenticateAsync("ClientCookie"); //await HttpContext.SignInAsync("ClientCookie", authInfo.Principal, authInfo.Properties); var service = new ExactOnlineService(); await service.RefreshAccessToken(httpcontext, refreshTokenClient); //await service.PostCustomers(httpcontext); var customers = await service.GetCustomers(httpcontext); //await service.PostCustomers(httpcontext); //await service.RefreshAccessToken(httpcontext, refreshTokenClient); return(View(customers)); }
public AdminCompanyDetailsModel(ExactOnlineService exactOnlineService, UserInCompanyService userInCompanyService, ApplicationDbContext context, UserManager <ApplicationUser> userManager) { m_exactOnlineService = exactOnlineService; m_userInCompanyService = userInCompanyService; m_context = context; m_userManager = userManager; this.UsersList = new List <ApplicationUser>(); }
public AdminUserViewModel(ApplicationDbContext context, UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager, UserService userService, ExactOnlineService exactOnlineService, UserInCompanyService userInCompanyService) { m_context = context; m_userManager = userManager; m_roleManager = roleManager; m_userService = userService; m_exactOnlineService = exactOnlineService; m_userInCompanyService = userInCompanyService; }
public TicketViewModel(TicketService ticketService, UserManager <ApplicationUser> userManager, IMailManager mailManager, VSTSService vstsService, UserService userService, ExactOnlineService exactOnlineService, UserInCompanyService userInCompanyService, ApplicationDbContext context) { m_ticketService = ticketService; m_userManager = userManager; m_mailmanager = mailManager; m_VSTSService = vstsService; m_userService = userService; m_exactOnlineService = exactOnlineService; m_userInCompanyService = userInCompanyService; m_context = context; }
public async Task <IActionResult> Create([Bind("CompanyName,FirstName,LastName,Salutation,Street,HouseNumber,HouseNumberAddition,Email,CountryID,Tel,LanguageID,City,ZipCode,State")] Customer customer) { if (ModelState.IsValid) { var httpcontext = HttpContext; var cust = customer; var service = new ExactOnlineService(); await service.PostCustomers(httpcontext, customer); return(RedirectToAction(nameof(Overzicht))); } return(View(customer)); }
public AdminCompaniesModel(ExactOnlineService exactOnlineService) { m_exactOnlineService = exactOnlineService; }
public AdminUploadModel(ExactOnlineService exactOnlineService, ApplicationDbContext context) { m_exactOnlineService = exactOnlineService; m_context = context; }