private void numeroDocumentoWaterMarkTextBox_Validating(object sender, CancelEventArgs e) { string error = null; if (!Validacion.esCadenaNumero(numeroDocumentoWaterMarkTextBox)) { numeroDocumentoWaterMarkTextBox.BackColor = Color.White; error = "Ingrese el numero de documento"; e.Cancel = true; errorProvider1.SetError((Control)sender, error); } else if (DatosRepartidor.existeRepartidorND(id, numeroDocumentoWaterMarkTextBox.Text)) { correoElectronicoAlternativoWaterMarkTextBox.BackColor = colorOk; errorProvider1.SetError(numeroDocumentoWaterMarkTextBox, String.Empty); } else if (DatosRepartidor.existeDocumento(numeroDocumentoWaterMarkTextBox.Text)) { numeroDocumentoWaterMarkTextBox.BackColor = Color.White; error = "El de numero documento ingresado ya existe"; e.Cancel = true; errorProvider1.SetError((Control)sender, error); } else { numeroDocumentoWaterMarkTextBox.BackColor = colorOk; errorProvider1.SetError((Control)sender, String.Empty); } }