public void Bejelentkezes() { string message_to_send = "loginrestaurante" + ";" + 1 + ";" + etterem_nev + ";" + Password.Text; MessageBox.Show(etterem_nev); try { string response = Server_connection.GetInstance().SendMessageToServer(message_to_send, true); if (response == "accepted") { MessageBox.Show(UserData.GetInstance().Database_ID.ToString()); FoMenu fm = new FoMenu(); fm.Show(); this.Close(); } else { MessageBox.Show("Wrong datas"); } } catch (Exception) { MessageBox.Show("Failed"); } }
private void Button_Click_2(object sender, RoutedEventArgs e) { FoMenu fm = new FoMenu(); fm.Show(); this.Close(); }