//======================================================================// //======================================================================// //======================================================================// #endregion #region EMPLOYEES FUNCTIONS //======================================================================// //======================= EMPLOYEES ===================================// //======================================================================// private void btnAddEmployee_Click(object sender, EventArgs e) { FormEmployees f = new FormEmployees(); f.ShowDialog(); UpdateEmployeeList("", false); }
private void dgEmployees_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dgEmployees.SelectedRows.Count != 0) { try { DBConnector db = new DBConnector(); Employee es = db.SearchEmployee("id", dgEmployees.SelectedRows[0].Cells[1].Value.ToString(), false)[0]; FormEmployees f = new FormEmployees(); f.EditingMode(es); f.ShowDialog(); //UpdateEmployeeList(); } catch (Exception ex) { MessageBox.Show(ex.Message); //throw; } } }