private void Button_Click(object sender, RoutedEventArgs e) { if (Username.Text == "" || Password.Password == "") { MessageBox.Show("Mindkét mező kitöltése kötelező!"); } else { string username = Username.Text; string password = Password.Password; try { client = new BooksServiceClient(); userClient = client.Login(username, password); MainWindow main = new MainWindow(); this.Hide(); main.ShowDialog(); } catch (FaultException <BooksWcf.LoginFailedFault> ex) { MessageBox.Show("Hibás adatok!"); } catch (EndpointNotFoundException) { MessageBox.Show("Hiba a kiszolgálóval!"); } } }
private void button_Logout_Click(object sender, RoutedEventArgs e) { try { bool logoutResult = client.Logout(userClient); if (logoutResult) { userClient = null; MessageBox.Show("Sikeres kijelentkezés!"); } } catch (EndpointNotFoundException) { MessageBox.Show("Hiba a kiszolgálóval!"); } catch (FaultException <BooksWcf.LoginFailedFault> ex) { MessageBox.Show(ex.Message); } catch (Exception ex) { MessageBox.Show("Ismeretlen hiba: " + ex.Message); } Login login = new Login(); this.Hide(); login.ShowDialog(); this.Close(); }
public BooksWcf.Book[] ListAll(BooksWcf.User client) { return(base.Channel.ListAll(client)); }
public System.Threading.Tasks.Task <bool> LogoutAsync(BooksWcf.User client) { return(base.Channel.LogoutAsync(client)); }
public bool Logout(BooksWcf.User client) { return(base.Channel.Logout(client)); }
public System.Threading.Tasks.Task <bool> DeleteAsync(string id, BooksWcf.User client, string header) { return(base.Channel.DeleteAsync(id, client, header)); }
public bool Delete(string id, BooksWcf.User client, string header) { return(base.Channel.Delete(id, client, header)); }
public System.Threading.Tasks.Task <bool> UpdateAsync(string id, string name, string rating, string lenght, string releaseYear, BooksWcf.User client, string Header) { return(base.Channel.UpdateAsync(id, name, rating, lenght, releaseYear, client, Header)); }
public bool Update(string id, string name, string rating, string lenght, string releaseYear, BooksWcf.User client, string Header) { return(base.Channel.Update(id, name, rating, lenght, releaseYear, client, Header)); }
public bool Insert(string name, string rating, string lenght, string releaseYear, BooksWcf.User client, string Header) { return(base.Channel.Insert(name, rating, lenght, releaseYear, client, Header)); }
public System.Threading.Tasks.Task <BooksWcf.Book[]> ListByIdAsync(string id, BooksWcf.User client) { return(base.Channel.ListByIdAsync(id, client)); }
public BooksWcf.Book[] ListById(string id, BooksWcf.User client) { return(base.Channel.ListById(id, client)); }
public System.Threading.Tasks.Task <BooksWcf.Book[]> ListAllAsync(BooksWcf.User client) { return(base.Channel.ListAllAsync(client)); }
public BooksWcf.Book[] ListAll(BooksWcf.User client, string loginfo) { return(base.Channel.ListAll(client, loginfo)); }
public bool Delete(string id, BooksWcf.User client, string loginfo) { return(base.Channel.Delete(id, client, loginfo)); }
public System.Threading.Tasks.Task <bool> InsertAsync(string name, string rating, string lenght, string releaseYear, BooksWcf.User client, string loginfo) { return(base.Channel.InsertAsync(name, rating, lenght, releaseYear, client, loginfo)); }