public EditBookForm(BookDataSource book, Library_Exchange mainForm) { InitializeComponent(); this.mainForm = mainForm; this.book = book; txtIsbn.Text = book.Isbn; txtTitle.Text = book.Title; txtYearPublished.Text = book.Year; try { LibraryExchangeClient.BookManagement.OperationResultSetOfstring booktypes = mainForm.WebServiceProxy.GetAllTypes(mainForm.UserName, mainForm.Guid); cmbType.DataSource = booktypes.ResultSet; cmbType.Refresh(); } catch (Exception ex) { MessageBox.Show("Some internal error occured during getting data for book types."); } cmbType.Text = book.Type; try { LibraryExchangeClient.BookManagement.OperationResultSetOfstring bookgenres = mainForm.WebServiceProxy.GetAllGenres(mainForm.UserName, mainForm.Guid); cmbGenre.DataSource = bookgenres.ResultSet; cmbGenre.Refresh(); } catch (Exception ex) { MessageBox.Show("Some internal error occured during getting data for genres."); } cmbGenre.Text = book.Genre; try { LibraryExchangeClient.BookManagement.OperationResultSetOfAuthorUcBWdBTS bookauthors = mainForm.WebServiceProxy.GetAllAuthors(mainForm.UserName, mainForm.Guid); cmbAuthor.DataSource = bookauthors.ResultSet; cmbAuthor.DisplayMember = "AuthorInfo"; cmbAuthor.ValueMember = "AuthorInfo"; cmbAuthor.Refresh(); } catch (Exception ex) { MessageBox.Show("Some internal error occured during getting data for authors."); } cmbAuthor.Text = book.Book.Author.AuthorInfo; if (book.Book.Reserved) { rbtnReservedYes.Checked = true; } else { rbtnReservedNo.Checked = true; } }
public AddBook(Library_Exchange mainForm) { InitializeComponent(); this.mainForm = mainForm; try { LibraryExchangeClient.BookManagement.OperationResultSetOfstring booktypes = mainForm.WebServiceProxy.GetAllTypes(mainForm.UserName, mainForm.Guid); if (booktypes.Error.Equals(OperationResultErrorEnum.None)) { cmbType.DataSource = booktypes.ResultSet; cmbType.Refresh(); } else { MessageBox.Show(booktypes.ErrorString); } if (booktypes.Error.Equals(OperationResultErrorEnum.NotAuthenticated)) { return; } LibraryExchangeClient.BookManagement.OperationResultSetOfstring bookgenres = mainForm.WebServiceProxy.GetAllGenres(mainForm.UserName, mainForm.Guid); if (booktypes.Error.Equals(OperationResultErrorEnum.None)) { cmbGenre.DataSource = bookgenres.ResultSet; cmbGenre.Refresh(); } else { MessageBox.Show(booktypes.ErrorString); } LibraryExchangeClient.BookManagement.OperationResultSetOfAuthorUcBWdBTS bookauthors = mainForm.WebServiceProxy.GetAllAuthors(mainForm.UserName, mainForm.Guid); if (booktypes.Error.Equals(OperationResultErrorEnum.None)) { cmbAuthor.DataSource = bookauthors.ResultSet; cmbAuthor.DisplayMember = "AuthorInfo"; cmbAuthor.Refresh(); } else { MessageBox.Show(booktypes.ErrorString); } } catch (Exception ex) { MessageBox.Show("Some error occured during initializing data"); } }
public Search(Library_Exchange mainForm) { InitializeComponent(); this.mainForm = mainForm; SetGridColumns(); try { OperationResultSetOfBookUcBWdBTS books = mainForm.WebServiceProxy.GetAllBooks(mainForm.UserName, mainForm.Guid); gridViewBooks.DataSource = readBooks(books); } catch (Exception ex) { MessageBox.Show("Some internal error occured during getting data for all books."); } SetSearchBoxesState(); }
public MyBooksOfInterest(Library_Exchange mainForm) { InitializeComponent(); this.mainForm = mainForm; SetGridColumns(); try { List <Book> booksOfInterest = BookOfInterestServ.GetInstance().GetAllBooksOfInterestByUser(mainForm.UserName, mainForm.Guid); gridViewBooks.DataSource = booksOfInterest; } catch (Exception ex) { MessageBox.Show("Some internal error occured during getting data for user`s books of interest."); } }
public EditBooks(Library_Exchange mainForm) { InitializeComponent(); this.mainForm = mainForm; SetGridColumns(); try { OperationResultSetOfBookUcBWdBTS books = mainForm.WebServiceProxy.GetAllBooksByUser(mainForm.UserName, mainForm.Guid); gridViewBooks.DataSource = readBooks(books); } catch (Exception ex) { MessageBox.Show("Some error occured during getting all client`s books"); } }
public ReserveBookForm(BookDataSource info, Library_Exchange mainForm) { InitializeComponent(); this.info = info; this.mainForm = mainForm; txtTitle.Text = info.Title; txtAuthor.Text = info.Author; txtGenre.Text = info.Genre; txtType.Text = info.Type; txtIsbn.Text = info.Isbn; txtYearPublished.Text = info.Year; txtOwner.Text = info.Book.User.FirstName + " " + info.Book.User.LastName; txtLocation.Text = info.Book.User.Location.Country + " " + info.Book.User.Location.City + " " + info.Book.User.Location.PostCode + " " + info.Book.User.Location.Address; }
public Authentication(Library_Exchange mainForm) { this.mainForm = mainForm; InitializeComponent(); }
public Register(Library_Exchange mainForm) { InitializeComponent(); this.mainForm = mainForm; }
public AddAuthor(Library_Exchange mainForm) { InitializeComponent(); this.mainForm = mainForm; }