private bool ValidarTextbox() { if (string.IsNullOrEmpty(DetalletextBox.Text) && PaqueteEquiposdataGridView.Rows.Count == 1) { DatagrilderrorProvider.SetError(PaqueteEquiposdataGridView, "Favor ingresar equipos"); DetalleerrorProvider.SetError(DetalletextBox, "Favor ingresar detalle"); MessageBox.Show("Favor llenar todos los campos obligatorios"); return(false); } if (string.IsNullOrEmpty(DetalletextBox.Text)) { DetalleerrorProvider.SetError(DetalletextBox, "Ingresar detalle"); MessageBox.Show("Favor ingresar el detalle de estos equipos"); return(false); } if (PaqueteEquiposdataGridView.Rows.Count == 1 && PaqueteEquiposdataGridView.Rows.Count < 3) { DetalleerrorProvider.Clear(); DatagrilderrorProvider.SetError(PaqueteEquiposdataGridView, "Ingresar equipos"); MessageBox.Show("Favor ingresar equipos para este registro"); return(false); } return(true); }
private bool ValidarTextbox() { if (string.IsNullOrEmpty(DetalletextBox.Text)) { DetalleerrorProvider.SetError(DetalletextBox, "Favor ingresar el detalle o descripcion el tipo de usuarios"); MessageBox.Show("Favor llenar todos los campos obligatorios"); } return(true); }
private bool SetErrorProvider(int Abrir) { bool paso = false; if (Abrir == 1 || Abrir == 3 || Abrir == 4) { if (ArticuloIDnumericUpDown.Value == 0) { ArticuloIdProvider.SetError(ArticuloIDnumericUpDown, "Campos Vacio"); paso = false; } else { paso = true; } } if (Abrir == 2 || Abrir == 3 || Abrir == 4) { if (CantidadnumericUpDown.Value == 0) { CantidadErrorProvider.SetError(CantidadnumericUpDown, "Campo vacio"); paso = false; } else { paso = true; } } if (Abrir == 4) { if (ComentariotextBox.Text == string.Empty) { ComentarioerrorProvider.SetError(ComentariotextBox, "Campo Vacio"); paso = false; } else { paso = true; } } if (Abrir == 5) { if (CotizaciontextBox.Text == string.Empty) { IDerrorProvider.SetError(CotizaciontextBox, "Campo vacio"); } else { paso = true; } } if (Abrir == 6) { if (DetallenumericUpDown.Value == 0) { DetalleerrorProvider.SetError(DetallenumericUpDown, "Campo vacio"); paso = false; } else { paso = true; } } return(paso); }