private void frmSelectedBook_Load(object sender, EventArgs e) { eLibraryServer.DAL oDAL = new eLibraryServer.DAL(); DataTable dt = new DataTable(); DataRow row1; this.txtISBN.Text = SelectedISBN; dt = oDAL.getBookByISBN(SelectedISBN); row1 = dt.Rows[0]; txtTitle.Text = row1["Title"].ToString(); txtAuthors.Text = row1["Authors"].ToString(); txtDescription.Text = row1["Description"].ToString(); }
private void mnuServer_Click(object sender, EventArgs e) { //MessageBox.Show("Функцията не е активна!"); if (dsELibrary == null) { eLibraryServer.DAL oDAL = new eLibraryServer.DAL(); try { dsELibrary = oDAL.getELibraryDataSet(); MessageBox.Show("Server connected"); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error by connecting elibrary Server", MessageBoxButtons.OK, MessageBoxIcon.Stop); } mnuBooks.Enabled = true; } else { MessageBox.Show("The elibrary Server is already connected", "", MessageBoxButtons.OK, MessageBoxIcon.Information); } }