Exemple #1
0
        private void dgv_ProjectUsers_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int r = e.RowIndex;

            if (r > -1)
            {
                try
                {
                    int      UserNumber = Convert.ToInt32(dgv_ProjectUsers.Rows[r].Cells["User Number"].Value);
                    frm_User User       = new frm_User(UserNumber);
                    User.Show();
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Please double click on a data row to see user details." + Environment.NewLine + ex.Message);
                }
            }
        }
Exemple #2
0
        private void dgv_UserList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int r = e.RowIndex;

            if (r > -1)
            {
                try
                {
                    int      uNumber = int.Parse(dgv_UserList.Rows[r].Cells["User Number"].Value.ToString());
                    frm_User User    = new frm_User(uNumber);
                    User.Show();
                }
                catch (Exception)
                {
                    MessageBox.Show("Please double click on a data row to see user details.");
                }
            }
        }