public IActionResult Index() { string userId = this.User.FindFirstValue(System.Security.Claims.ClaimTypes.NameIdentifier); HomeViewmodel mymodel = new HomeViewmodel(); var Taken = from Taak in _context.Taak where Taak.User_id == userId where Taak.Afgerond == false select Taak; var Projecten = from Project in _context.Project select Project; var Afspraken = from Afspraak in _context.Afspraak select Afspraak; var Klanten = from Klant in _context.Klant select Klant; mymodel.Klant = Klanten; mymodel.Taak = Taken; mymodel.Afspraak = Afspraken; mymodel.Project = Projecten; return(View(mymodel)); }
public HomeView() { this.InitializeComponent(); ViewModel = new HomeViewmodel(); this.DataContext = ViewModel; NavigationCacheMode = NavigationCacheMode.Required; }
public ActionResult Index(int?accomodationTypeId) { if (accomodationTypeId == null) { var model = new HomeViewmodel() { AccomodationTypes = _context.AccomodationTypes.ToList(), AccomodationPackages = _context.AccomodationPackages.ToList() }; return(View(model)); } else { var model = new HomeViewmodel() { AccomodationTypes = _context.AccomodationTypes.ToList(), AccomodationPackages = _context.AccomodationPackages.Where(a => a.AccomodationTypeId == accomodationTypeId).ToList() }; return(View(model)); } }
public MainPage() { InitializeComponent(); homeViewmodel = new HomeViewmodel(this.Navigation); this.BindingContext = homeViewmodel; }
public HomePage() { BindingContext = new HomeViewmodel(); InitializeComponent(); }
public HomeUC() { InitializeComponent(); DataContext = new HomeViewmodel(); }
public HomePage(HomeViewmodel viewmodel) { InitializeComponent(); HomeViewmodel = viewmodel; }