private void ResultDataSheet_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 4) { frmMain.MainPanel.Controls.Clear(); UserBookDetailForm bookDetailForm = new UserBookDetailForm(frmMain, e.RowIndex + (nPage - 1) * 10); bookDetailForm.TopLevel = false; bookDetailForm.Dock = DockStyle.Fill; frmMain.MainPanel.Controls.Add(bookDetailForm); bookDetailForm.Show(); } }
private void BookRecordSheet_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 2) { if (ClassBackEnd.BorrowHistoryIDown(e.RowIndex) == 2) { MessageBox infobox = new MessageBox(25); infobox.ShowDialog(); infobox.Dispose(); } else { frmMain.MainPanel.Controls.Clear(); UserBookDetailForm bookDetailForm = new UserBookDetailForm(frmMain, 0); bookDetailForm.TopLevel = false; bookDetailForm.Dock = DockStyle.Fill; frmMain.MainPanel.Controls.Add(bookDetailForm); bookDetailForm.Show(); frmMain.ReturnButton.Tag = 3; } } }