private void goBack_Click(object sender, RoutedEventArgs e) { Person osoba = new Person(); osoba.email = "Guest"; osoba.id_person = "0"; ShopMain page = new ShopMain(osoba); page.Show(); this.Close(); }
private void Login() { var client = new RestClient("https://student.sps-prosek.cz/~bastlma14/obj/account.php"); var request = new RestRequest(Method.POST); request.AddParameter("action", 0); request.AddParameter("email", Email.Text); request.AddParameter("password", Password.Password); var res = client.Execute <List <Person> >(request); if (res.Content == "0" || res.Content == "") { Error.Content = "Neznámé heslo nebo email"; } else { Person osoba = new Person(); osoba.email = Email.Text; osoba.id_person = res.Content; ShopMain page = new ShopMain(osoba); page.Show(); this.Close(); } }