public bool Validar(int error) { bool paso = false; if (error == 1 && IdnumericUpDown.Value == 0) { IdErrorProvider.SetError(IdnumericUpDown, "Debe Ingresar Un Id"); paso = true; } if (error == 2 && NombretextBox.Text == string.Empty) { OtroErrorProvider.SetError(NombretextBox, "Debe Ingresar Un Nombre"); paso = true; } if (error == 2 && DirecciontextBox.Text == string.Empty) { OtroErrorProvider.SetError(DirecciontextBox, "Debe Ingresar Una Direccion"); paso = true; } //if (error == 2 && CedulaTextBox.MaskFull == false) //{ // OtroErrorProvider.SetError(CedulaTextBox, "Debe Ingresar Una Cedula"); // paso = true; //} //if (error == 2 && TelefonoTextBox.MaskFull == false) //{ // OtroErrorProvider.SetError(TelefonoTextBox, "Debe Ingresar Un Telefono"); // paso = true; //} return(paso); }
private void LimpiarProvider() { IdErrorProvider.Clear(); OtroErrorProvider.Clear(); }