private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                DataGridViewRow dr = DGV.SelectedRows[0];

                int staffid = int.Parse(dr.Cells["id"].Value.ToString());

                frmStaff frm = new frmStaff();

                frm.staffid = staffid;

                frm.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #2
0
        private void addStaffToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmStaff frm = new frmStaff();

            frm.Show();
        }