/* * Returns currently selected book in DataGridView */ private LibrarianDS.bookRow getSelectedBook() { DataRowView current = (DataRowView)dgvCatalog.CurrentRow.DataBoundItem; LibrarianDS.bookRow selectedBook = (LibrarianDS.bookRow)current.Row; return(selectedBook); }
public frmRent(LibrarianDS.bookRow bookRow) { InitializeComponent(); this.bookRow = bookRow; dtpReturnDate.Value = System.DateTime.Now.Add(new System.TimeSpan(21, 0, 0, 0)); }
public frmRent(LibrarianDS.rentRow rentRow) { InitializeComponent(); this.rentRow = rentRow; this.bookRow = rentRow.tbl_bookRow; this.userRow = rentRow.userRow; btnRent.Text = "Razduži"; btnRent.Enabled = true; }
private void refreshPane() { try { LibrarianDS.bookRow red = getSelectedBook(); lblType.Text = red.typeRow.name; lblPublisher.Text = red.publisherRow.name; lblCategory.Text = red.categoryRow.name; } catch (Exception) { } }