private bool SetError(int error) { bool paso = false; if (error == 1 && IDcomboBox.Text == string.Empty) { IderrorProvider.SetError(IDcomboBox, "Llenar Id"); paso = true; } if (error == 2 && PrecionumericUpDown.Value == 0) { DemasCamposerrorProvider.SetError(PrecionumericUpDown, "LLenar Precio"); paso = true; } if (error == 2 && DepartamentocomboBox.Text == string.Empty) { DemasCamposerrorProvider.SetError(DepartamentocomboBox, "LLenar Departamento"); paso = true; } if (error == 2 && CantidadnumericUpDown.Value == 0) { DemasCamposerrorProvider.SetError(CantidadnumericUpDown, "LLenar Cantidad"); paso = true; } if (error == 2 && DescripciontextBox.Text == string.Empty) { DemasCamposerrorProvider.SetError(DescripciontextBox, "LLenar Descripcion"); paso = true; } return(paso); }
private void LimpiarProvider() { IderrorProvider.Clear(); DemasCamposerrorProvider.Clear(); }