private void studentListToolStripMenuItem_Click(object sender, EventArgs e) { if (flx.Rows.Count > 1) { int teacherid = Convert.ToInt32(flx[flx.RowSel, "teacherID"]); if (teacherid > 0) { StudentListMainform frm = new StudentListMainform(); frm.roomid = Convert.ToInt32(flx[flx.RowSel, "roomID"]); frm.teacherid = teacherid; frm.ShowDialog(); } else { Box.warnBox("No teacher found on this room."); } } else { Box.warnBox("No data found."); } }
public StudentListAdd(StudentListMainform _frm) { InitializeComponent(); this._frm = _frm; }