/// <summary> /// Valida el formulario /// </summary> /// <returns></returns> private bool validar() { String mensaje = string.Empty; if (txtNombre.Text.Length == 0) { mensaje += "Nombre\r\n"; } if (txtApellidoPat.Text.Length == 0) { mensaje += "Apellido Paterno\r\n"; } if (txtCURP.Text.Length == 0) { mensaje += "CURP\r\n"; } if (this.oEmpleado.Fingerprints.Count != 0) { int numHuellas = 0; Sesion.getDedosRequeridos().ForEach(dedoRequerido => numHuellas += this.oEmpleado.Fingerprints.Where(huella => ((Huella)huella).dedo == dedoRequerido).Count()); if (numHuellas < Sesion.getDedosRequeridos().Count) { mensaje += "Huellas digitales requeridas:\r\n"; Sesion.getDedosRequeridos().ForEach(dedo => mensaje += dedo.ToString() + "\r\n"); } } else { mensaje += "Huellas Digitales\r\n"; } if (mensaje.Length != 0) { MessageBox.Show("Los siguientes campos son requeridos:\r\n" + mensaje, Sesion.getAppNombre(), MessageBoxButtons.OK, MessageBoxIcon.Warning); } return(mensaje.Length == 0); }