public pesel(Form5 form5) { this.form5 = form5; InitializeComponent(); dbconnect = new DBConnect(); }
//podwojne klikniecie na liste private void dgDisplay_DoubleClick(object sender, EventArgs e) { DataGridViewRow myRow = dgDisplay.CurrentRow; string autor = myRow.Cells[2].Value.ToString(); string tutul = myRow.Cells[3].Value.ToString(); string available = myRow.Cells[4].Value.ToString(); string reserved = myRow.Cells[5].Value.ToString(); Form5 edit = new Form5(autor, tutul, available, reserved); edit.ShowDialog(this); //MessageBox.Show(autor); //MessageBox.Show(myRow.Cells[3].Value.ToString()); //nowy "myRow" z obecnie zaznaczonego rowa //DataGridViewRow myRow = dgDisplay.CurrentRow; //myRow.Cells[0].ToString(); //messagebox //MessageBox.Show(myRow.Cells[0].Value.ToString()); }