private void btnSaveEmployee_Click(object sender, EventArgs e) { if (!filledValues()) { //MessageBox.Show("Complete la información"); } else { Cursor.Current = Cursors.WaitCursor; serviceDA = new DBControllerWSClient(); currentEmployee.dni = txtEmployeeDNI.Text; currentEmployee.name = txtEmployeeName.Text; currentEmployee.lastName = txtEmployeeFirstLastName.Text; currentEmployee.secondLastName = txtEmployeeSecondLastName.Text; currentEmployee.phone = txtEmployeePhone.Text; currentEmployee.email = txtEmployeeEmail.Text; currentEmployee.birthdate = (DateTime)dtpEmployeeBorn.Value.Date; currentEmployee.contractStarDate = (DateTime)dtpEmployeeStartDate.Value.Date; currentEmployee.contractEndDate = (DateTime)dtpEmployeeEndDate.Value.Date; //emp.area = cbArea.Text currentEmployee.role = cbRole.Text; int salio = serviceDA.updateEmployee(currentEmployee); Cursor.Current = Cursors.Arrow; if (salio == 1) { MessageBox.Show("El empleado se modificó satisfactoriamente."); } else { MessageBox.Show("Hubo un error :("); } this.Close(); } }