/// <summary> /// Просмотр сотрудника по двойному клику мыши. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void EmplBaseDataGridView_MouseDoubleClick(object sender, MouseEventArgs e) { var showEmplForm = new ShowEmployeeForm(); int idSelectEmpl = int.Parse(EmplBaseDataGridView.CurrentRow.Cells[0].Value.ToString()); showEmplForm.SelectEmployee = GetEmpl(idSelectEmpl); showEmplForm.Show(); }
/// <summary> /// Показать данные сотрудника. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ShowEmlpButton_Click(object sender, EventArgs e) { var showEmplForm = new ShowEmployeeForm(); var idSelectEmpl = int.Parse(EmplBaseDataGridView.CurrentRow.Cells[0].Value.ToString()); showEmplForm.SelectEmployee = GetEmpl(idSelectEmpl); showEmplForm.Show(); }
/// <summary> /// Просмотр сотрудника по клавише Enter. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void EmplBaseDataGridView_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode != Keys.Enter) { return; } var showEmplForm = new ShowEmployeeForm(); int idSelectEmpl = int.Parse(EmplBaseDataGridView.CurrentRow.Cells[0].Value.ToString()); showEmplForm.SelectEmployee = GetEmpl(idSelectEmpl); showEmplForm.Show(); }