private void Exit_button_Click(object sender, RoutedEventArgs e) { Querry qq = new Querry(); qq.Show(); this.Close(); }
public async Task <List <Profile> > Handle(Querry request, CancellationToken cancellationToken) { //handler logic goes here var queryable = _context.Followings.AsQueryable(); var userFollowings = new List <UserFollowing>(); var profiles = new List <Profile>(); switch (request.Predicate) { case "followers": { userFollowings = await queryable.Where(c => c.Target.UserName == request.Username).ToListAsync(); foreach (var u in userFollowings) { profiles.Add(await profileReader.ReadProfile(u.Observer.UserName)); } break; } case "following": { userFollowings = await queryable.Where(c => c.Observer.UserName == request.Username).ToListAsync(); foreach (var u in userFollowings) { profiles.Add(await profileReader.ReadProfile(u.Target.UserName)); } break; } } return(profiles); }
public void getTrenerTest() { Querry query = new Querry(); string expected = "Alexander"; string result; result = query.getTrener(1); Assert.AreEqual(expected, result); }
public void getSkoczniaNazwaTest() { Querry query = new Querry(); string expected = "Wielka Krokiew"; string result; result = query.getSkocznia(1); Assert.AreEqual(expected, result); }
public void getSkoczekImieTest() { Querry query = new Querry(); string expected = "Marcin"; string result; result = query.getSkoczek(1); Assert.AreEqual(expected, result); }
public bool login(string username, byte[] pass) { Querry querry = new Querry(); if (querry.login(username, pass)) { this.username = username; return(true); } return(false); }
public void ListaSkoczniTest() { Querry query = new Querry(); List <string> expected = new List <string>(); List <string> result = new List <string>(); expected = new List <string> { "Wielka Krokiew" }; result = query.ListaSkoczni(); Assert.AreEqual(expected[0], result[0]); }
public void ListaSkoczkowTest() { Querry query = new Querry(); List <string> expected = new List <string>(); List <string> result = new List <string>(); expected = new List <string> { "Marcin" }; result = query.ListaSkoczkow(); Assert.AreEqual(expected[0], result[0]); }
public void getZawodnicyImionaTest() { Querry query = new Querry(); List <string> expected = new List <string>(); List <string> result = new List <string>(); expected = new List <string> { "Marcin" }; result = query.getZawodnicyImiona(); Assert.AreEqual(expected[0], result[0]); }
public void getTrenerzyNazwiskaTest() { Querry query = new Querry(); List <string> expected = new List <string>(); List <string> result = new List <string>(); expected = new List <string> { "Pointner" }; result = query.getTrenerzyNazwiska(); Assert.AreEqual(expected[0], result[0]); }
public void getTrenerzyImionaTest() { Querry query = new Querry(); List <string> expected = new List <string>(); List <string> result = new List <string>(); expected = new List <string> { "Alexander" }; result = query.getTrenerzyImiona(); Assert.AreEqual(expected[0], result[0]); }
public void getZawodnicyWzrostTest() { Querry query = new Querry(); List <string> expected = new List <string>(); List <string> result = new List <string>(); expected = new List <string> { "166" }; result = query.getZawodnicyWzrost(); Assert.AreEqual(expected[0], result[0]); }
public void getZawodnicyNazwiskaTest() { Querry query = new Querry(); List <string> expected = new List <string>(); List <string> result = new List <string>(); expected = new List <string> { "BACHLEDA" }; result = query.getZawodnicyNazwiska(); Assert.AreEqual(expected[0], result[0]); }
public void ListaTrenerowTest() { Querry query = new Querry(); List <string> expected = new List <string>(); List <string> result = new List <string>(); expected = new List <string> { "Alexander" }; result = query.ListaTrenerow(); Assert.AreEqual(expected[0], result[0]); }
public void getSkocznieMiastaTest() { Querry query = new Querry(); List <string> expected = new List <string>(); List <string> result = new List <string>(); expected = new List <string> { "Zakopane" }; result = query.getSkocznieMiasta(); Assert.AreEqual(expected[0], result[0]); }
public string NewUser(Querry querry) { UserDAO userDao = new UserDAO(); try { var userActif = (User)querry.Data; userActif.DateCreation = DateTime.Now; userDao.NewItem(userActif); var response = new Response(); response.Data = userActif; response.Entete = querry.Entete; return(new UserDAO().Serialize(response)); } catch (Exception e) { var response = new Response(); response.Entete = querry.Entete; response.Data = e; return(new UserDAO().Serialize(response)); } }
public string ConnectUser(Querry querry) { UserDAO userDao = new UserDAO(); try { var userActif = (User)querry.Data; var users = userDao.AllItems(); var user = users.Where( u => u.Username.Equals(userActif.Username) && u.Password.Equals(userActif.Password)).First(); var response = new Response(); user.State = true; response.Data = user; response.Entete = querry.Entete; return(new UserDAO().Serialize(response)); } catch (Exception e) { var response = new Response(); response.Entete = querry.Entete; response.Data = e; return(new UserDAO().Serialize(response)); } }
public User getProfile(string username) { Querry querry = new Querry(); return(querry.getUser(username)); }
public bool signUp(string username, byte[] pass) { Querry querry = new Querry(); return(querry.registry(username, pass)); }
public List <MatchStatistics> getProfileMatchHistory(string username) { Querry querry = new Querry(); return(querry.getProfileHistory(username)); }
public Profile getProfileStatistics(string username) { Querry querry = new Querry(); return(querry.getProfile(username)); }
public List <Profile> getProfiles() { Querry querry = new Querry(); return(querry.getUsers()); }