Пример #1
0
 private void Nuevobutton_Click(object sender, EventArgs e)
 {
     atrasoIdtextBox.Clear();
     CantidadtextBox.Clear();
     AtrasotextBox.Clear();
     AtrasodataGridView.Rows.Clear();
 }
Пример #2
0
        private bool Validar()
        {
            bool realizado = true;

            errorProvider.Clear();

            if (string.IsNullOrWhiteSpace(IDnumericUpDown.Text))
            {
                errorProvider.SetError(IDnumericUpDown, "EL CAMPO ID NO PUEDE ESTAR VACIO");
                IDnumericUpDown.Focus();
                realizado = false;
            }

            if (string.IsNullOrWhiteSpace(CantidadtextBox.Text))
            {
                errorProvider.SetError(IDnumericUpDown, "EL CAMPO CANTIDAD NO PUEDE ESTAR VACIO");
                CantidadtextBox.Focus();
                realizado = false;
            }

            if (this.DetalleEstudiantes.Count == 0)
            {
                errorProvider.SetError(dataGridView, "Debe agregar algun estudiante");
                EstudiantecomboBox.Focus();
                realizado = false;
            }

            return(realizado);
        }
Пример #3
0
        private bool Validar()
        {
            bool   validado    = true;
            string obligatorio = "Campo obligatorio";

            if (string.IsNullOrWhiteSpace(IDnumericUpDown.Text))
            {
                errorProvider.SetError(IDnumericUpDown, obligatorio);
                IDnumericUpDown.Focus();
                validado = false;
            }
            if (string.IsNullOrWhiteSpace(CantidadtextBox.Text))
            {
                errorProvider.SetError(CantidadtextBox, obligatorio);
                CantidadtextBox.Focus();
                validado = false;
            }
            if (string.IsNullOrWhiteSpace(PreciotextBox.Text))
            {
                errorProvider.SetError(PreciotextBox, "Seleccione un tipo de cacao");
                TipoCacaocomboBox.Focus();
                validado = false;
            }

            return(validado);
        }
Пример #4
0
 private void Nuevobutton_Click(object sender, EventArgs e)
 {
     IdGruposnumericUpDown.Value = 0;
     FechadateTimePicker.Value   = DateTime.Now;
     DescripciontextBox.Clear();
     CantidadtextBox.Clear();
     IntegrantestextBox.Clear();
     GrupostextBox.Clear();
 }
Пример #5
0
 public void LimpiarProducto()
 {
     ProductoIdtextBox.Clear();
     PreciotextBox.Clear();
     ITBIStextBox.Clear();
     NombretextBox.Clear();
     CantidadtextBox.Clear();
     DescuentostextBox.Clear();
 }
Пример #6
0
 private void Nuevobutton_Click(object sender, EventArgs e)
 {
     VentaIdtextBox.Clear();
     CantidadtextBox.Clear();
     PreciotextBox.Clear();
     NFCtextBox.Clear();
     TipoNFCtextBox.Clear();
     DescuentostextBox.Clear();
     TotaltextBox.Clear();
     VentasdataGridView.Rows.Clear();
     BuscarVentabutton.Enabled = true;
 }
Пример #7
0
 private void Limpiar()
 {
     FacturaIdtextBox.Clear();
     SeleccionarClientecomboBox.SelectedIndex = 0;
     DirecciontextBox.Clear();
     TelefonotextBox.Clear();
     ArticuloscomboBox.SelectedIndex = 0;
     CantidadtextBox.Clear();
     ServiciocomboBox.SelectedIndex   = 0;
     FacturaFechadateTimePicker.Value = DateTime.Today;
     FacturadataGridView.DataSource   = null;
 }
Пример #8
0
        private void MasButton_Click(object sender, RoutedEventArgs e)
        {
            orden.OrdenDetalle.Add(new OrdenDetalle(Convert.ToInt32(OrdenIdTextBox.Text), Convert.ToInt32(ProductoIdTextBox.Text), Convert.ToInt32(CantidadtextBox.Text)));
            Actualizar();
            OrdenDetalle ordenDetalle = new OrdenDetalle();
            int          cantidad     = ordenDetalle.Cantidad;
            int          id           = ordenDetalle.ProductoId;

            ProductoBLL.Calculo(id, cantidad);
            CantidadtextBox.Clear();
            ProductoIdTextBox.Clear();
            CantidadtextBox.Focus();
        }
Пример #9
0
        private void NuevoButton_Click(object sender, EventArgs e)
        {
            IdnumericUpDown.Value     = 0;
            fechaDateTimePicker.Value = DateTime.Now;
            ObservacionestextBox.Clear();
            CantidadtextBox.Clear();
            PreciotextBox.Clear();
            ImportetextBox.Clear();
            TotalnumericUpDown.Value = 0;

            DetalledataGridView.DataSource = null;
            MyerrorProvider.Clear();
        }
 private void Limpiar()
 {
     IdnumericUpDown.Value = 0;
     NombrePartidotextBox.Clear();
     LugarPartidotextBox.Clear();
     FechadateTimePicker.ResetText();
     //TipoPartidocomboBox.SelectedIndex = -1;
     CantidadtextBox.Clear();
     TipoPartidocomboBox.Text = string.Empty;
     PreciocomboBox.Text      = string.Empty;
     TicketcomboBox.Text      = string.Empty;
     DescripcioncomboBox.Text = string.Empty;
 }
 private void Limpiar()
 {
     IdnumericUpDown.Value          = 0;
     FechadateTimePicker.Value      = DateTime.Now;
     ClientecomboBox.SelectedIndex  = 0;
     ArticulocomboBox.SelectedIndex = 0;
     CantidadtextBox.Clear();
     PreciotextBox.Clear();
     ImportetextBox.Clear();
     DetalledataGridView.DataSource = null;
     SubTotaltextBox.Clear();
     ItbistextBox.Clear();
     TotaltextBox.Clear();
     MyErrorProvider.Clear();
 }
        public void Limpiar()
        {
            DateTimePicker f = new DateTimePicker();

            ArticuloIdtextBox.Clear();
            NombreArticulotextBox.Clear();
            MarcaArticulotextBox.Clear();
            DescuentotextBox.Clear();
            DespcripciontextBox.Clear();
            CantidadtextBox.Clear();
            PrecioCompratextBox.Clear();
            PrecioVentatextBox.Clear();
            NombreProveedorcomboBox1.Text = "Elegir una opcion";
            FechadateTimePicker.Value     = f.Value;
            //-----
            limpiarErroresProvider();
        }
Пример #13
0
 private void Nuevobutton_Click(object sender, EventArgs e)
 {
     IdnumericUpDown.Value     = 0;
     FechadateTimePicker.Value = DateTime.Now;
     ArticulocomboBox.Text     = string.Empty;
     SuplidorcomboBox.Text     = string.Empty;
     UsuariocomboBox.Text      = string.Empty;
     CantidadtextBox.Clear();
     PreciotextBox.Clear();
     ImportetextBox.Clear();
     SubTotaltextBox.Clear();
     TotaltextBox.Clear();
     ItbistextBox.Clear();
     EfectivonumericUpDown.Value   = 0;
     DevueltanumericUpDown.Value   = 0;
     CompradataGridView.DataSource = null;
     errorProvider.Clear();
 }
Пример #14
0
        private bool ValidarDetalle()
        {
            errorProvider1.Clear();
            bool paso = true;

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

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

            if (string.IsNullOrWhiteSpace(ServiciocomboBox.Text))
            {
                errorProvider1.SetError(ServiciocomboBox, "El campo categoria no puede estar vacio, debe de seleccionar una categoria");
                ServiciocomboBox.Focus();
                paso = false;
            }

            if (Convert.ToInt32(CantidadtextBox.Text) < 0)
            {
                errorProvider1.SetError(CantidadtextBox, "El campo cantidad no puede ser menor a 0");
                CantidadtextBox.Focus();
                paso = false;
            }

            if (Convert.ToDouble(PreciotextBox.Text) < 0)
            {
                errorProvider1.SetError(PreciotextBox, "El campo precio no puede ser negativo");
                PreciotextBox.Focus();
                paso = false;
            }

            return(paso);
        }
Пример #15
0
        private bool ValidarCantidad()
        {
            bool   validado    = true;
            string obligatorio = "Campo obligatorio";

            if (string.IsNullOrWhiteSpace(CantidadtextBox.Text))
            {
                errorProvider.SetError(CantidadtextBox, obligatorio);
                CantidadtextBox.Focus();
                validado = false;
            }
            if (ToDecimal(CantidadtextBox.Text) > ToDecimal(BalancetextBox.Text))
            {
                errorProvider.SetError(CantidadtextBox, "El monto a pagar no ha de ser mayor \n al balance del prestamo");
                CantidadtextBox.Focus();
                validado = false;
            }

            return(validado);
        }
Пример #16
0
        private bool Validar()
        {
            bool   validado    = true;
            string obligatorio = "Campo obligatorio";

            if (string.IsNullOrWhiteSpace(IDnumericUpDown.Text))
            {
                errorProvider.SetError(IDnumericUpDown, obligatorio);
                IDnumericUpDown.Focus();
                validado = false;
            }
            if (this.PagosDetalles.Count == 0)
            {
                errorProvider.SetError(dataGridView, obligatorio);
                CantidadtextBox.Focus();
                validado = false;
            }

            return(validado);
        }
Пример #17
0
        private bool Validar()
        {
            bool paso = true;



            if (string.IsNullOrEmpty(DescripciontextBox.Text))
            {
                Myerror.SetError(DescripciontextBox, "El campo descripción no debe estar vacio");
                DescripciontextBox.Focus();
                paso = false;
            }

            if (string.IsNullOrEmpty(CantidadtextBox.Text))
            {
                Myerror.SetError(CantidadtextBox, "El campo cantidad no debe estar vació");
                CantidadtextBox.Focus();
                paso = false;
            }

            return(paso);
        }
Пример #18
0
        private void AgregarPagobutton_Click(object sender, EventArgs e)
        {
            if (!ValidarCantidad())
            {
                return;
            }

            if (dataGridView.DataSource != null)
            {
                this.PagosDetalles = (List <PagosDetalle>)dataGridView.DataSource;
            }

            int id = 1;

            if (PrestamoComboBox.SelectedIndex == 0)
            {
                id = 1;
            }
            else
            {
                id = ToInt(PrestamoComboBox.SelectedIndex.ToString());
            }

            this.PagosDetalles.Add(
                new PagosDetalle(
                    prestamoID: id,
                    fecha: FechadateTimePicker.Value.Date,
                    balance: ToDecimal(BalancetextBox.Text),
                    pagado: ToDecimal(CantidadtextBox.Text)
                    )
                );

            CargarGrid();
            CantidadtextBox.Clear();
            LlenaTotal();
            //Total += ToDecimal(CantidadtextBox.Text);
            //TotaltextBox.Text = Total.ToString();
        }
 private void Nuevobutton_Click(object sender, EventArgs e)
 {
     EntradaIdnumericUpDown.Value = 0;
     FechadateTimePicker.Value    = DateTime.Now;
     CantidadtextBox.Clear();
 }