private void grdLibrary_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) { return; } if (grdLibrary.Columns[e.ColumnIndex].Name == "Column1") { var lid = grdLibrary.Rows[e.RowIndex].Cells["LID"].Value.ToString(); var frm = new frm_paper(); frm.Oparams = new string[] { lid, "0", "", "", "" }; frm.ShowDialog(); } }
private void grdExamResult_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) { return; } if (grdExamResult.Columns[e.ColumnIndex].Name == "Column8") { var eid = grdExamResult.Rows[e.RowIndex].Cells["EID"].Value.ToString(); var sdate = grdExamResult.Rows[e.RowIndex].Cells["r_startdate"].Value; var edate = grdExamResult.Rows[e.RowIndex].Cells["r_enddate"].Value; var frm = new frm_paper(); frm.Oparams = new string[] { eid, "1", "", "", "" }; frm.ShowDialog(); } }