private void addData() { AddEmployee add = new AddEmployee(); add.ShowDialog(); LoadData(); }
private void EditData() { int index = dataGrid.SelectedRows[0].Index; Employee temp = sql.findEmployee(Int32.Parse(dataGrid.Rows[index].Cells[0].Value.ToString())); AddEmployee editor = new AddEmployee(); if (editor.editEmployee(temp)) { LoadData(); } }