private bool Validar() { RepositorioBase <Productos> db = new RepositorioBase <Productos>(); bool paso = true; errorProvider.Clear(); if (string.IsNullOrWhiteSpace(ClientecomboBox.Text)) { errorProvider.SetError(ClientecomboBox, "El campo clienteno puede esta vacio"); ClientecomboBox.Focus(); paso = false; } if (string.IsNullOrWhiteSpace(VentacomboBox.Text)) { errorProvider.SetError(VentacomboBox, "El campo venta no puede esta vacio"); VentacomboBox.Focus(); paso = false; } if (MontoPagarnumericUpDown.Value < 0) { errorProvider.SetError(MontoPagarnumericUpDown, "Debe elegir un monto a pagar"); MontoPagarnumericUpDown.Focus(); paso = false; } return(paso); }
private bool Validar() { RepositorioBase <Ventas> db = new RepositorioBase <Ventas>(); bool paso = true; if (ClientecomboBox.Text == "") { errorProvider.SetError(ClientecomboBox, "El cliente no puede estar vacio"); ClientecomboBox.Focus(); paso = false; } if (FormaPagocomboBox.Text == "") { errorProvider.SetError(FormaPagocomboBox, "Elija un modo de pago"); FormaPagocomboBox.Focus(); paso = false; } if (detalleDataGridView.RowCount == 0) { errorProvider.SetError(detalleDataGridView, "El detalle no debe estar vacio"); detalleDataGridView.Focus(); paso = false; } return(paso); }
private bool Validar() { bool paso = true; MyerrorProvider.Clear(); if (string.IsNullOrWhiteSpace(ClientecomboBox.Text) || ClientecomboBox.Text.Contains("Seleccione un cliente")) { MyerrorProvider.SetError(ClientecomboBox, "Debe seleccionar un cliente"); ClientecomboBox.Focus(); paso = false; } if (string.IsNullOrWhiteSpace(CobradorcomboBox.Text) || CobradorcomboBox.Text.Contains("Seleccione un cobrador")) { MyerrorProvider.SetError(CobradorcomboBox, "Debe seleccionar un cobrador"); CobradorcomboBox.Focus(); paso = false; } if (MontonumericUpDown.Value == 0) { MyerrorProvider.SetError(MontonumericUpDown, "El campo Monto no puede ser cero"); MontonumericUpDown.Focus(); paso = false; } if (PorcientoInteresnumericUpDown.Value == 0) { MyerrorProvider.SetError(PorcientoInteresnumericUpDown, "El campo Porciento de interes no puede ser cero"); PorcientoInteresnumericUpDown.Focus(); paso = false; } if (CantidadCuotasnumericUpDown.Value == 0) { MyerrorProvider.SetError(CantidadCuotasnumericUpDown, "El campo Cantidad de cuotas no puede ser cero"); CantidadCuotasnumericUpDown.Focus(); paso = false; } if (this.Detalle.Count() == 0) { MyerrorProvider.SetError(CalcularCuotasbutton, "Debe calcular las cuotas"); CalcularCuotasbutton.Focus(); paso = false; } return(paso); }
public bool Validar() { bool paso = true; if (string.IsNullOrWhiteSpace(ClientecomboBox.Text) || ClientecomboBox.Text.Contains("Seleccione un cliente")) { MyerrorProvider.SetError(ClientecomboBox, "Debe seleccionar un cliente"); ClientecomboBox.Focus(); paso = false; } if (string.IsNullOrWhiteSpace(PrestamoIdcomboBox.Text)) { MyerrorProvider.SetError(PrestamoIdcomboBox, "Debe seleccionar un prestamo id"); PrestamoIdcomboBox.Focus(); paso = false; } if (string.IsNullOrWhiteSpace(NumeroCuotacomboBox.Text)) { MyerrorProvider.SetError(NumeroCuotacomboBox, "Debe seleccionar un número de cuota"); NumeroCuotacomboBox.Focus(); paso = false; } if (MontonumericUpDown.Value == 0) { MyerrorProvider.SetError(MontonumericUpDown, "El campo Monto no puede ser cero"); MontonumericUpDown.Focus(); paso = false; } if (MontonumericUpDown.Value > Convert.ToDecimal(BalanceCuotalabel.Text) && MontonumericUpDown.Enabled == true) { MyerrorProvider.SetError(MontonumericUpDown, "El monto del cobro no puede ser mayor que el balance de la cuota seleccionada"); MontonumericUpDown.Focus(); paso = false; } return(paso); }
private bool Validar() { bool paso = true; MyErrorProvider.Clear(); if (string.IsNullOrWhiteSpace(PedidocomboBox.Text)) { MyErrorProvider.SetError(PedidocomboBox, "El campo Estudiante no puede estar vacio"); PedidocomboBox.Focus(); paso = false; } if (string.IsNullOrWhiteSpace(ClientecomboBox.Text)) { MyErrorProvider.SetError(ClientecomboBox, "El campo Estudiante no puede estar vacio"); ClientecomboBox.Focus(); paso = false; } return(paso); }