private void findinggrid_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { try { EmployeeClass show = new EmployeeClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport()); string userDataName = UserAccessForm.getusername() + "_employee_table"; string dato = this.findinggrid.CurrentCell.Value.ToString(); comboname.Text = dato; string orden = "select * from " + userDataName + " where `NOMBRE COMPLETO` = '" + comboname.Text + "';"; DireccionGestor.setordensql(orden); if (show.fillboxes(comboname, birthdatebox, edadbox, cargobox, workingbox, getindateTimePicker, getoutdateTimePicker, workingbox, trabajandopanel, orden) == true) { EmployeeOutForm menu = new EmployeeOutForm(); menu.WindowState = FormWindowState.Maximized; menu.Show(); this.Close(); } } catch (NullReferenceException pafh) { pafh.ToString(); } }
private void findinggrid_CellContentClick(object sender, DataGridViewCellEventArgs e) { try { EmployeeClass show = new EmployeeClass(UserAccessForm.getdbserver(), UserAccessForm.getdbname(), UserAccessForm.getdbuser(), UserAccessForm.getdbpassword(), UserAccessForm.getdbport()); string userDataName = UserAccessForm.getusername() + "_employee_table"; string dato = this.findinggrid.CurrentCell.Value.ToString(); comboname.Text = dato; string orden = "select * from " + userDataName + " where `NOMBRE COMPLETO` = '" + comboname.Text + "';"; if (show.fillboxes(comboname, birthdatebox, edadbox, cargobox, workingbox, getindateTimePicker, getoutdateTimePicker, workingbox, trabajandopanel, orden)) { editbutton.Enabled = true; eliminarbutton.Enabled = true; } else { editbutton.Enabled = false; eliminarbutton.Enabled = false; } } catch (NullReferenceException pafh) { pafh.ToString(); } }