Example #1
0
        /// <summary>
        /// in case double click on cell the book detail form will open.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BookGrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            Book         book         = (Book)this.BookGrid.CurrentRow.DataBoundItem;
            DialogResult dialogResult = MessageBox.Show($"האם תרצה לעבור לפרטי הספר {book.BookName} ", "השאלת ספר", MessageBoxButtons.YesNo);

            if (dialogResult == DialogResult.Yes)
            {
                var form = BookDetails.Instance((Book)(book));
                Utils.SwitchBetweenWindows(this, form);
            }
        }