public SearchPageBlock(SearchPageVM logic, Person p) { InitializeComponent(); if (p != null) { this.Person = p; textNameSurname.Text = $"{p.Name} {p.Surname}"; BitmapImage tmpBitMap = new BitmapImage(); tmpBitMap.BeginInit(); tmpBitMap.CacheOption = BitmapCacheOption.OnLoad; tmpBitMap.UriSource = new Uri("../../" + p.Photo, UriKind.RelativeOrAbsolute); tmpBitMap.EndInit(); image_profile.Source = tmpBitMap; if (logic.GetStudent(p) != null) { textInfo.Text = $"{p.Student.GroupID}"; } else if (logic.GetLecturer(p) != null) { textInfo.Text = $"{p.Lecturer.Department}"; } } else { textNameSurname.Text = notFoundText; } }
public SearchPage() { logic = new SearchPageVM(new SQLiteDataService()); InitializeComponent(); searchBar.textSearch.KeyDown += SearchBar_TextSearch_KeyDown; fillSearch(); navbar.button_Profile.Click += Navbar_Button_Profile_Click; navbar.button_FAQ.Click += Navbar_Button_FAQ_Click; navbar.button_Notes.Click += Navbar_Button_Notes_Click; navbar.button_TimeTable.Click += Navbar_Button_TimeTable_Click; }
public async Task <IActionResult> SearchPage() { string uid = User.FindFirstValue(ClaimTypes.NameIdentifier); AspNetUsers thisAspUser = _context.AspNetUsers.Where(x => x.Id == uid).First(); Users thisUser = _context.Users.Where(x => x.UserId == uid).First(); ViewBag.AspUser = thisAspUser; ViewBag.User = thisUser; Startups startups = await _seamedInDal.GetStartups(); var rankedStartups = Ranking(startups, thisUser).ToList(); ViewBag.Startups = rankedStartups; SearchPageVM searchPageVM = await GetStartUpColumnCategoryValues(); return(View(searchPageVM)); }
public async Task <SearchPageVM> GetStartUpColumnCategoryValues() { SearchPageVM searchPageVM = new SearchPageVM(); Startups currentApiData = await _seamedInDal.GetStartups(); foreach (Record startUp in currentApiData.records) { AddToRespectiveList(startUp.fields.Source, searchPageVM.sourcesList); AddToRespectiveList(startUp.fields.Scout, searchPageVM.scoutsList); AddToRespectiveList(startUp.fields.Landscape, searchPageVM.landscapesList); AddToRespectiveList(startUp.fields.Country, searchPageVM.countriesList); AddToRespectiveList(startUp.fields.StateProvince, searchPageVM.statesList); AddToRespectiveList(startUp.fields.City, searchPageVM.citiesList); AddToRespectiveList(startUp.fields.Stage, searchPageVM.stagesList); AddToRespectiveListMultiValue(startUp.fields.Alignment, searchPageVM.alignmentsList); AddToRespectiveListMultiValue(startUp.fields.Themes, searchPageVM.themesList); AddToRespectiveListMultiValue(startUp.fields.TechnologyAreas, searchPageVM.technologyAreasList); } return(searchPageVM); }
public SearchPage() { ViewModel = new SearchPageVM(); InitializeComponent(); }