Exemple #1
0
        private bool NoRepetido()
        {
            bool paso = true;

            if (Validaciones.TelefonosNoIguales(TelefonotextBox.Text))
            {
                MyerrorProvider.SetError(TelefonotextBox, "Este telefono ya existe");
                TelefonotextBox.Focus();
                paso = false;
            }

            if (Validaciones.CedulasNoIguales(CedulatextBox.Text))
            {
                MyerrorProvider.SetError(CedulatextBox, "Ya existe esta cedula");
                CedulatextBox.Focus();
                paso = false;
            }
            if (Validaciones.CedulasNoIguales(CelulartextBox.Text))
            {
                MyerrorProvider.SetError(CelulartextBox, "Esta cedula ya existe");
                CelulartextBox.Focus();
                paso = false;
            }
            return(paso);
        }
      private void Agregarbutton_Click(object sender, EventArgs e)
      {
          Detalle = new List <AsistenciaDetalle>();

          if (DetalledataGridView.DataSource != null)
          {
              this.Detalle = (List <AsistenciaDetalle>)DetalledataGridView.DataSource;
          }
          if (!ValidarAgregar())
          {
              return;
          }

          Detalle.Add(new AsistenciaDetalle(DetalleAsistenciasId: 0, AsistenciaID: Convert.ToInt32(AsistenciaIDnumericUpDown.Value),
                                            EstudiantesId: (int)EstudiantecomboBox.SelectedValue, Nombres: GetNombreEstudiante(), Asistencia: VCheckBox()));
          Asistencia asistencia = new Asistencia();
          int        numlineas  = DetalledataGridView.RowCount - 1;
          int        contador   = 0;

          while (numlineas >= 0)
          {
              contador++;
              numlineas = numlineas - 2;
          }

          asistencia.Cantidad  = contador;
          CantidadtextBox.Text = Convert.ToString(asistencia.Cantidad);
          CargarGrid();
          MyerrorProvider.Clear();
          PresentecheckBox.Checked = false;
          EstudiantecomboBox.Text  = string.Empty;
      }
Exemple #3
0
 private void Limpiar()
 {
     MyerrorProvider.Clear();
     IDnumericUpDown.Value   = 0;
     DescripciontextBox.Text = string.Empty;
     UsuariotextBox.Text     = GetNombreUsuario(ID);
 }
Exemple #4
0
        private void BuscarButton_Click(object sender, EventArgs e)
        {
            MyerrorProvider.Clear();

            if (IdNumericUpDown.Value == 0)
            {
                MessageBox.Show("Ingrese un ID");
            }

            int       id        = Convert.ToInt32(IdNumericUpDown.Value);
            Peliculas peliculas = BLL.PeliculasBLL.Buscar(id);

            if (peliculas != null)
            {
                IdNumericUpDown.Value         = peliculas.PeliculaId;
                NombreTextBox.Text            = peliculas.Nombre;
                FechaDateTimePicker.Value     = peliculas.FechaSalida;
                PrecioNumericUpDown.Value     = peliculas.Precio;
                InventarionumericUpDown.Value = peliculas.Inventario;
                SipnosisTextBox.Text          = peliculas.Sipnosis;
            }
            else
            {
                MessageBox.Show("No se encontro!", "Fallo",
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #5
0
        private void Guardarbutton_Click(object sender, EventArgs e)
        {
            bool paso = false;

            if (Validar(2))
            {
                MessageBox.Show("Llenar todos los campos marcados");
                return;
            }

            MyerrorProvider.Clear();


            if (IdnumericUpDown.Value == 0)
            {
                paso = BLL.EntradaArticulosBLL.Guardar(LlenarClase());
            }
            else
            {
                paso = BLL.EntradaArticulosBLL.Modificar(LlenarClase());
            }


            if (paso)
            {
                MessageBox.Show("Guardado", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("No se pudo guardar", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            Vaciar();
        }
Exemple #6
0
        private void Agregarbutton_Click(object sender, EventArgs e)
        {
            if (DetalledataGridView.DataSource != null)
            {
                this.Detalle = (List <DetalleEntradaProductos>)DetalledataGridView.DataSource;
            }
            if (!ValidarAgregar())
            {
                return;
            }
            this.Detalle.Add(new DetalleEntradaProductos(
                                 detalleEntradaProductosId: 0,
                                 entradaProductoId: (int)IDnumericUpDown.Value,
                                 productoId: (int)ProductocomboBox.SelectedValue,
                                 cantidad: (int)CantidadnumericUpDown.Value
                                 )
                             );

            CargarGridFor(this.Detalle);
            MyerrorProvider.Clear();
            CantidadTotal              += Convert.ToInt32(CantidadnumericUpDown.Value);
            CantidadTotaltextBox.Text   = CantidadTotal.ToString();
            ProductocomboBox.Text       = string.Empty;
            CantidadnumericUpDown.Value = 0;
            //index += 1;
        }
Exemple #7
0
        private void AgregarPresente_Click(object sender, EventArgs e)
        {
            if (EstudianteComboBox.Text.Trim().Length > 0) //Si no esta vacio el combobox
            {
                if (DetalledataGridView.DataSource != null)
                {
                    this.Detalle = (List <EstudianteDetalle>)DetalledataGridView.DataSource;
                }

                this.Detalle.Add(
                    new EstudianteDetalle(
                        Id: 0,
                        AsistenciaId: (int)AsistenciaIdnumericUpDown.Value,
                        Nombres: EstudianteComboBox.Text,
                        Presente: PresenteCheckBox.Checked
                        )
                    );
                CargarGrid();
                CantidadtextBox.Text     = DetalledataGridView.Rows.Count.ToString();
                EstudianteComboBox.Text  = "";
                PresenteCheckBox.Checked = false;
            }
            else
            {
                MyerrorProvider.Clear();
                MyerrorProvider.SetError(EstudianteComboBox, "No hay ningún estudiante seleccionado");
                EstudianteComboBox.Focus();
            }
        }
        private bool Validar()
        {
            bool paso = true;

            MyerrorProvider.Clear();

            if (string.IsNullOrWhiteSpace(Convert.ToString(FechadateTimePicker.Value)))
            {
                MyerrorProvider.SetError(FechadateTimePicker, "El campo Fecha no puede estar vacio");
                FechadateTimePicker.Focus();
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(AsignaturacomboBox.Text))
            {
                MyerrorProvider.SetError(AsignaturacomboBox, "El campo Asignatura no puede estar vacio");
                AsignaturacomboBox.Focus();
                paso = false;
            }

            if (this.Detalle.Count == 0)
            {
                MyerrorProvider.SetError(AsistenciasdataGridView, "Debe agregar alguna asistencia a un estudiante");
                PresentecheckBox.Focus();
                paso = false;
            }

            return(paso);
        }
Exemple #9
0
        private bool ValidarAgregar()
        {
            bool paso = true;

            MyerrorProvider.Clear();

            if (ProductocomboBox.Text == "" || ProductocomboBox.SelectedIndex == -1 || !ExisteProducto())
            {
                MyerrorProvider.SetError(ProductocomboBox, "Debe elegir un producto");
                paso = false;
            }

            if (string.IsNullOrWhiteSpace(PreciotextBox.Text))
            {
                MyerrorProvider.SetError(PreciotextBox, "Este campo no puede estar vacio.");
                paso = false;
            }

            if (CantidadnumericUpDown.Value == 0)
            {
                MyerrorProvider.SetError(CantidadnumericUpDown, "La cantidad no puede ser cero.");
                paso = false;
            }



            return(paso);
        }
        private bool Validar()
        {
            bool Errores = false;

            if (String.IsNullOrWhiteSpace(TelefonomaskedTextBox.Text))
            {
                MyerrorProvider.SetError(TelefonomaskedTextBox,
                                         "Llenar campo telefono");
                Errores = true;
            }
            if (String.IsNullOrWhiteSpace(NombretextBox.Text))
            {
                MyerrorProvider.SetError(NombretextBox,
                                         "Llenar campo nombre");
                Errores = true;
            }
            if (String.IsNullOrWhiteSpace(DirecciontextBox.Text))
            {
                MyerrorProvider.SetError(DirecciontextBox,
                                         "Llenar campo direccion");
                Errores = true;
            }
            if (String.IsNullOrWhiteSpace(CedulamaskedTextBox.Text))
            {
                MyerrorProvider.SetError(CedulamaskedTextBox,
                                         "Llenar campo cedula");
                Errores = true;
            }

            return(Errores);
        }
        private bool HayErrores()
        {
            bool HayErrores = false;

            if (DetalledataGridView.RowCount == 0)
            {
                MyerrorProvider.SetError(DetalledataGridView,
                                         "Es obligatorio seleccionar los articulos ");
                HayErrores = true;
            }

            if (string.IsNullOrEmpty(VehiculocomboBox.Text))
            {
                MyerrorProvider.SetError(VehiculocomboBox,
                                         "Debes Tener registrado al menos un vehiculo registrado");
                HayErrores = true;
            }


            if (string.IsNullOrEmpty(TallercomboBox.Text))
            {
                MyerrorProvider.SetError(TallercomboBox,
                                         "Debes Tener registrado al menos un taller registrado");
                HayErrores = true;
            }

            if (string.IsNullOrEmpty(ArticulocomboBox.Text))
            {
                MyerrorProvider.SetError(ArticulocomboBox,
                                         "Debes Tener registrado al menos un articulo registrado");
                HayErrores = true;
            }

            return(HayErrores);
        }
Exemple #12
0
        private bool Validar()
        {
            bool paso = true;

            MyerrorProvider.Clear();

            if (string.IsNullOrWhiteSpace(EstudiantecomboBox.Text))
            {
                MyerrorProvider.SetError(EstudiantecomboBox, "El campo Estudiante no puede estar vacio");
                EstudiantecomboBox.Focus();
                paso = false;
            }

            if (MontoCreditosnumericUpDown.Value == 0)
            {
                MyerrorProvider.SetError(MontoCreditosnumericUpDown, "El Monto de los creditos no puede estar ser 0");
                MontoCreditosnumericUpDown.Focus();
                paso = false;
            }

            if (Detalle.Count == 0)
            {
                MyerrorProvider.SetError(AsignaturacomboBox, "La inscripcion por lo menos debe tener una asignatura");
                AsignaturacomboBox.Focus();
                paso = false;
            }
            return(paso);
        }
Exemple #13
0
        private void Buscarbutton_Click(object sender, EventArgs e)
        {
            MyerrorProvider.Clear();

            if (Validar(1))
            {
                MessageBox.Show("Ingrese un ID");
                return;
            }

            int    id    = Convert.ToInt32(IdnumericUpDown.Value);
            Libros libro = BLL.LibrosBLL.Buscar(id);

            if (libro != null)
            {
                DescripciontextBox.Text   = libro.Descripcion;
                SiglastextBox.Text        = libro.Siglas;
                FechadateTimePicker.Value = libro.Fecha;
                TipotextBox.Text          = libro.Tipo;
            }
            else
            {
                MessageBox.Show("No se encontro", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #14
0
        private bool Validar()
        {
            bool paso = true;

            ErrorProvider1.Clear();

            if (string.IsNullOrWhiteSpace(EstudianteTextBox.Text))
            {
                ErrorProvider1.SetError(EstudianteTextBox, "El campo  no puede estar vacio");
                EstudianteTextBox.Focus();
                paso = false;
            }

            if (ValorTextbox.Text == string.Empty)
            {
                ErrorProvider1.SetError(, "El campo  no puede estar vacio");
                ValorTextbox.Focus();
                paso = false;
            }

            if (ApellidoTextbox.Text == string.Empty)
            {
                MyerrorProvider.SetError(ApellidoTextbox, "El campo no puede estar vacio");
                ApellidoTextbox.Focus();
                paso = false;
            }

            return(paso);
        }
Exemple #15
0
        private bool ValidarValores()
        {
            bool paso = true;

            MyerrorProvider.Clear();

            //Validando que el valor del campo Logrado no sea mayor que el del campo Valor
            if (Convert.ToDecimal(LogradotextBox.Text) > Convert.ToDecimal(ValortextBox.Text))
            {
                MyerrorProvider.SetError(LogradotextBox, "El valor del campo Logrado no puede ser mayor que el del campo Valor");
                ValortextBox.Focus();
                paso = false;
            }
            //Validando que el valor del campo Valor no sea mayor que 100 ni menor que 0
            if (Convert.ToDecimal(ValortextBox.Text) < 0 || Convert.ToDecimal(ValortextBox.Text) > 100)
            {
                MyerrorProvider.SetError(ValortextBox, "El campo Valor no puede tener un valor menor que 0 ni mayor que 100");
                ValortextBox.Focus();
                paso = false;
            }
            //Validando que el valor del campo Logrado no sea mayor que 100 ni menor que 0
            if (Convert.ToDecimal(LogradotextBox.Text) < 0 || Convert.ToDecimal(LogradotextBox.Text) > 100)
            {
                MyerrorProvider.SetError(LogradotextBox, "El campo Logrado no puede tener un valor menor que 0 ni mayor que 100");
                LogradotextBox.Focus();
                paso = false;
            }

            return(paso);
        }
Exemple #16
0
        private bool Validar()
        {
            bool paso = true;

            MyerrorProvider.Clear();

            if (ClientecomboBox.Text == "" || ClientecomboBox.SelectedIndex == -1 || !ExisteCliente())
            {
                MyerrorProvider.SetError(ClientecomboBox, "Debe seleccionar un Cliente");
                paso = false;
            }

            if (this.Detalle.Count == 0)
            {
                MyerrorProvider.SetError(Agregarbutton, "Debe agregar al menos un producto.");
                paso = false;
            }

            if (paso)
            {
                foreach (var item in this.Detalle)
                {
                    int cantidad        = GetCantidadProducto(item.ProductoId);
                    int cantidadDetalle = GetTotalProducto(item.ProductoId);
                    int resultado       = cantidad - cantidadDetalle;
                    if (resultado < 0)
                    {
                        MessageBox.Show("La cantidad de " + GetDescripcion(item.ProductoId) + " supera a la existente.", "ButterSoft", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return(paso = false);
                    }
                }
            }

            return(paso);
        }
Exemple #17
0
        private bool ValidarAgregar()
        {
            bool paso = true;

            MyerrorProvider.Clear();

            if (ProductocomboBox.Text == "" || ProductocomboBox.SelectedIndex == -1 || !ExisteProducto())
            {
                MyerrorProvider.SetError(ProductocomboBox, "Debe elegir un producto");
                paso = false;
            }

            if (CantidadnumericUpDown.Value == 0)
            {
                MyerrorProvider.SetError(CantidadnumericUpDown, "La cantidad no puede ser cero.");
                paso = false;
            }

            if (paso)
            {
                foreach (var item in this.Detalle)
                {
                    if (item.ProductoId == (int)ProductocomboBox.SelectedValue)
                    {
                        MyerrorProvider.SetError(ProductocomboBox, "Ya el Producto existe en el detalle.");
                        return(paso = false);
                    }
                }
            }

            return(paso);
        }
Exemple #18
0
        private bool Validar()
        {
            bool HayErrores = false;

            if (String.IsNullOrWhiteSpace(TelefonomaskedTextBox.Text))
            {
                MyerrorProvider.SetError(TelefonomaskedTextBox,
                                         "No debes dejar el telefono vacio");
                HayErrores = true;
            }
            if (String.IsNullOrWhiteSpace(NombretextBox.Text))
            {
                MyerrorProvider.SetError(NombretextBox,
                                         "No debes dejar el nombre vacio");
                HayErrores = true;
            }
            if (String.IsNullOrWhiteSpace(DirecciontextBox.Text))
            {
                MyerrorProvider.SetError(DirecciontextBox,
                                         "No debes dejar la direccion vacia");
                HayErrores = true;
            }
            if (String.IsNullOrWhiteSpace(CedulamaskedTextBox.Text))
            {
                MyerrorProvider.SetError(CedulamaskedTextBox,
                                         "No debes dejar la cedula vacia");
                HayErrores = true;
            }

            return(HayErrores);
        }
Exemple #19
0
        private bool HayErrores()
        {
            bool HayErrores = false;

            if (String.IsNullOrWhiteSpace(ObservacionestextBox.Text))
            {
                MyerrorProvider.SetError(ObservacionestextBox,
                                         "No puedes dejar el Comentario vacio");
                HayErrores = true;
            }

            if (String.IsNullOrWhiteSpace(CantidadtextBox.Text))
            {
                MyerrorProvider.SetError(ObservacionestextBox,
                                         "Tienes que introducir una cantidad");
                HayErrores = true;
            }

            if (String.IsNullOrWhiteSpace(PreciotextBox.Text))
            {
                MyerrorProvider.SetError(PreciotextBox,
                                         "Tienes que introducir un precio");
                HayErrores = true;
            }

            if (String.IsNullOrWhiteSpace(ImportetextBox.Text))
            {
                MyerrorProvider.SetError(ImportetextBox,
                                         "Tienes que introducir un importe");
                HayErrores = true;
            }

            return(HayErrores);
        }
Exemple #20
0
        private void EliminarButton_Click(object sender, EventArgs e)
        {
            MyerrorProvider.Clear();
            int      id       = Convert.ToInt32(PrestamoidnumericUpDown.Value);
            Prestamo prestamo = PrestamoBLL.Buscar(id);

            id = Convert.ToInt32(PrestamoidnumericUpDown.Value);
            if (prestamo != null)
            {
                if (PrestamoBLL.Eliminar(id))
                {
                    MessageBox.Show("Eliminado", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    Limpiar();
                    LlenaCombox();
                }
                else
                {
                    MyerrorProvider.SetError(PrestamoidnumericUpDown, "No se puede eliminar registro que no existe");
                }
            }
            else
            {
                MessageBox.Show("No existe!!", "Falló", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #21
0
        private bool Validar()
        {
            bool paso = true;

            MyerrorProvider.Clear();

            if (string.IsNullOrWhiteSpace(AsignaturaComboBox.Text))
            {
                MyerrorProvider.SetError(AsignaturaComboBox, "Debe seleccionar una asignatura");
                AsignaturaComboBox.Focus();
                paso = false;
            }
            if (string.IsNullOrWhiteSpace(EstudianteComboBox.Text))
            {
                MyerrorProvider.SetError(EstudianteComboBox, "Debe seleccionar un estudiante");
                EstudianteComboBox.Focus();
                paso = false;
            }

            if (this.Detalle.Count == 0)
            {
                MyerrorProvider.SetError(DetalledataGridView, "Debe agregar algun registr de asistencia");
                EstudianteComboBox.Focus();
                paso = false;
            }

            return(paso);
        }
        private bool Validar()
        {
            bool paso = true;

            MyerrorProvider.Clear();

            if (AsignaturacomboBox.SelectedIndex == -1)
            {
                MyerrorProvider.SetError(AsignaturacomboBox, "Debe elegir una asignatura.");
                paso = false;
            }

            if (AsignaturacomboBox.Text == "")
            {
                MyerrorProvider.SetError(AsignaturacomboBox, "Debe elegir una asignatura.");
                paso = false;
            }

            if (this.Detalle.Count == 0)
            {
                MyerrorProvider.SetError(Agregarbutton, "Debe agregar al menos un estudiante.");
                Agregarbutton.Focus();
                paso = false;
            }

            return(paso);
        }
 private void Nuevobutton_Click(object sender, EventArgs e)
 {
     VehiculoIDnumericUpDown.Value = 0;
     DescripciontextBox.Clear();
     TotalMantenimientotextBox.Clear();
     MyerrorProvider.Clear();
 }
 private void Agregarbutton_Click(object sender, EventArgs e)
 {
     if (DetalledataGridView.DataSource != null)
     {
         this.Detalle = (List <DetalleAsistencia>)DetalledataGridView.DataSource;
     }
     if (!ValidarAgregar())
     {
         return;
     }
     this.Detalle.Add(
         new DetalleAsistencia(
             DetalleAsistenciaID: 0,
             AsistenciaID: Convert.ToInt32(AsistenciaIDnumericUpDown.Value),
             EstudianteID: (int)EstudiantecomboBox.SelectedValue,
             Nombres: GetNombreEstudiante(),
             Presente: PresentecheckBox.Checked
             )
         );
     cantidad++;
     CantidadtextBox.Text = Convert.ToString(cantidad);
     CargarGrid();
     MyerrorProvider.Clear();
     PresentecheckBox.Checked = false;
     EstudiantecomboBox.Text  = string.Empty;
 }
      private bool ValidarAgregar()
      {
          bool paso = true;

          MyerrorProvider.Clear();

          if (EstudiantecomboBox.SelectedIndex == -1)
          {
              MyerrorProvider.SetError(EstudiantecomboBox, "Debe elegir un estudiante.");
              paso = false;
          }
          if (EstudiantecomboBox.Text == "")
          {
              MyerrorProvider.SetError(EstudiantecomboBox, "Debe elegir al menos un estudiante.");
              paso = false;
          }
          if (paso)
          {
              foreach (var item in this.Detalle)
              {
                  if (item.EstudiantesId == (int)EstudiantecomboBox.SelectedValue)
                  {
                      MyerrorProvider.SetError(EstudiantecomboBox, "Ya el Estudiante existe en el detalle.");
                      return(paso = false);
                  }
              }
          }


          return(paso);
      }
        private void Eliminarbutton_Click(object sender, EventArgs e)
        {
            MyerrorProvider.Clear();
            int  ID = Convert.ToInt32(AsistenciaIDnumericUpDown.Value);
            bool paso;
            RepositorioBase <Asistencia> repositorio = new RepositorioBase <Asistencia>();

            if (!Existe())
            {
                MessageBox.Show("No se puede eliminar porque no existe.", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                paso = repositorio.Eliminar(ID);
                if (paso)
                {
                    LimpiarCampos();
                    MessageBox.Show("Asistencia eliminada!!", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("No se pudo eliminar la asistencia", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Exemple #27
0
        private bool Validar()
        {
            bool HayErrores = true;

            //todo: quitar los mensajes de los errores que ya no estan.

            //todo: Validar que el nombre no se duplique
            if (String.IsNullOrWhiteSpace(DescripciontextBox.Text))
            {
                MyerrorProvider.SetError(DescripciontextBox,
                                         "No debes dejar este campo vacio");
                HayErrores = false;
            }
            if (PrecionumericUpDown.Value == 0)
            {
                MyerrorProvider.SetError(PrecionumericUpDown, "No debe dejarlo el campo en 0");
                HayErrores = false;
            }
            if (ExistencianumericUpDown.Value == 0)
            {
                MyerrorProvider.SetError(ExistencianumericUpDown, "No debe dejarlo el campo en 0");
                HayErrores = false;
            }
            if (CantidadCotizzadanumericUpDown.Value == 0)
            {
                MyerrorProvider.SetError(CantidadCotizzadanumericUpDown, "No debe dejarlo el campo en 0");
                HayErrores = false;
            }
            //todo: validar demas campos
            return(HayErrores);
        }
        private bool Validar()
        {
            bool paso = true;

            MyerrorProvider.Clear();
            if (FiltrocomboBox.SelectedIndex == -1 || FiltrocomboBox.Text == "")
            {
                MyerrorProvider.SetError(FiltrocomboBox, "Debe elegir una opción de busquedad.");
                paso = false;
            }

            if (FechacheckBox.Checked == true)
            {
                //if (HastadateTimePicker.Value.Date == DesdedateTimePicker.Value.Date)
                //{
                //    MyerrorProvider.SetError(HastadateTimePicker, "Las fechas no pueden ser iguales.");
                //    paso = false;
                //}

                if (HastadateTimePicker.Value.Date < DesdedateTimePicker.Value.Date)
                {
                    MyerrorProvider.SetError(HastadateTimePicker, "Debe colocar una fecha mayor a la Desde.");
                    paso = false;
                }

                if (DesdedateTimePicker.Value.Date > HastadateTimePicker.Value.Date)
                {
                    MyerrorProvider.SetError(HastadateTimePicker, "Debe colocar una fecha mayor al Hasta.");
                    paso = false;
                }
            }

            return(paso);
        }
Exemple #29
0
        private bool Validar()
        {
            bool paso = true;

            paso = false;
            MyerrorProvider.Clear();

            if (ClienteComboBox.Text == string.Empty)
            {
                MyerrorProvider.SetError(ClienteComboBox, "Campo Cliente no puede estar vacio");
                paso = false;
            }
            if (ProductoComboBox.Text == string.Empty)
            {
                MyerrorProvider.SetError(ProductoComboBox, "Campo Producto no puede estar vacio");
                paso = false;
            }
            if (CantidadNumericUpDown.Value == 0)
            {
                MyerrorProvider.SetError(CantidadNumericUpDown, "Campo Cantidad no puede estar vacio");
                paso = false;
            }


            return(paso);
        }
Exemple #30
0
        public bool Validar()
        {
            bool paso = false;

            if (string.IsNullOrEmpty(ClienteComboBox.Text))
            {
                MyerrorProvider.SetError(ClienteComboBox, "Seleccione un cliente.");
                paso = true;
            }

            if (string.IsNullOrEmpty(PeliculaComboBox.Text))
            {
                MyerrorProvider.SetError(PeliculaComboBox, "Seleccione una pelicula.");
                paso = true;
            }

            if (string.IsNullOrEmpty(ObservacionesTextBox.Text))
            {
                MyerrorProvider.SetError(ObservacionesTextBox, "Llene el campo observaciones.");
                paso = true;
            }

            if (PrecioNumericUpDown.Value == 0)
            {
                MyerrorProvider.SetError(PrecioNumericUpDown, "Llene el campo cantidad.");
                paso = true;
            }

            return(paso);
        }