Exemple #1
0
        private void EmployeeDataGridView_DoubleClick(object sender, EventArgs e)
        {
            if (EnableActions == false || DepartmentStructureTreeView.SelectedNode == null)
            {
                return;
            }
            var grid = (DataGridView)sender;

            if (grid.SelectedRows.Count > 0)
            {
                if (grid.SelectedRows[0].Index == grid.Rows.Count - 1)
                {
                    Presenter.AddEmployeeShowDialog((DepartmentCS)DepartmentStructureTreeView.SelectedNode.Tag);
                }
                else
                {
                    Presenter.EditEmployeeShowDialog((EmployeeCS)grid.SelectedRows[0].Tag);
                }
            }
        }
Exemple #2
0
 private void MenuTray_AddEmployee_Click(object sender, EventArgs e)
 {
     Presenter.AddEmployeeShowDialog(null);
 }