private void ButtonBuscar_Click(object sender, EventArgs e)
        {
            if (Validar(1))
            {
                MessageBox.Show("Introduzca El Id A Buscar!");
            }
            else
            {
                int      id      = Convert.ToInt32(UsuarioIdNumericUpDown.Value);
                Usuarios usuario = UsuariosBLL.Buscar(id);

                if (usuario != null)
                {
                    UsuarioIdNumericUpDown.Value = usuario.UsuarioId;
                    NombresTextBox.Text          = usuario.Nombre;
                    UsuarioTextBox.Text          = usuario.NombreUser;
                    ClaveTextBox.Text            = usuario.Clave;
                    FechaDateTimePicker.Value    = usuario.Fecha;
                    TotalVendidoTextBox.Text     = usuario.TotalVendido.ToString();
                }
                else
                {
                    MessageBox.Show("No Fue Encontrado!", "Fallido",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                GeneralErrorProvider.Clear();
            }
        }
Exemplo n.º 2
0
 private void LimpiarCampos()
 {
     vehiculoIdNumericUpDown.Value = 0;
     DescripcionTextBox.Clear();
     MantenimientoTextBox.Clear();
     GeneralErrorProvider.Clear();
 }
Exemplo n.º 3
0
        private void buttonBuscar_Click(object sender, EventArgs e)
        {
            if (validar(1))
            {
                MessageBox.Show("Introduzca Id A Buscar");
            }
            else
            {
                int       id        = Convert.ToInt32(vehiculoIdNumericUpDown.Value);
                Vehiculos vehiculos = VehiculosBLL.Buscar(id);

                if (vehiculos != null)
                {
                    vehiculoIdNumericUpDown.Value = vehiculos.VehiculoId;
                    DescripcionTextBox.Text       = vehiculos.Descripcion;
                    MantenimientoTextBox.Text     = vehiculos.Mantenimiento.ToString();
                }
                else
                {
                    MessageBox.Show("No Fue Encontrado!", "Fallido",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                GeneralErrorProvider.Clear();
            }
        }
        private void LimpiarCampos()
        {
            EntradaIdNumericUpDown.Value = 0;
            CantidadNumericUpDown.Value  = 0;

            GeneralErrorProvider.Clear();
        }
Exemplo n.º 5
0
        private void ButtonBuscar_Click(object sender, EventArgs e)
        {
            if (Validar(1))
            {
                MessageBox.Show("Introduzca El Id A Buscar!");
            }
            else
            {
                int       id       = Convert.ToInt32(ProductoIdNumericUpDown.Value);
                Productos producto = ProductosBLL.Buscar(id);

                if (producto != null)
                {
                    ProductoIdNumericUpDown.Value = producto.ProductoId;
                    DescripcionTextBox.Text       = producto.Descripcion;
                    CostoNumericUpDown.Value      = producto.Costo;
                    PrecioNumericUpDown.Value     = producto.Precio;
                    GananciaNumericUpDown.Value   = producto.Ganancia;
                    InventarioTextBox.Text        = producto.Inventario.ToString();
                }
                else
                {
                    MessageBox.Show("No Fue Encontrado!", "Fallido",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                GeneralErrorProvider.Clear();
            }
        }
        private void Buscarbutton_Click(object sender, EventArgs e)
        {
            GeneralErrorProvider.Clear();

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

            int       id       = Convert.ToInt32(IdnumericUpDown.Value);
            Articulos articulo = BLL.ArticulosBLL.Buscar(id);

            if (articulo != null)
            {
                DescripciontextBox.Text        = articulo.Descripcion;
                PrecionumericUpDown.Value      = articulo.Precio;
                VencimientodateTimePicker.Text = articulo.FechaVencimiento.ToString();
                CantCotnumericUpDown.Text      = articulo.CantidadCotizada.ToString();
            }
            else
            {
                MessageBox.Show("No se encontro", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void buttonBuscar_Click(object sender, EventArgs e)
        {
            if (validar(1))
            {
                MessageBox.Show("Introducir Id");
            }
            else
            {
                int id = Convert.ToInt32(EntradaIdNumericUpDown.Value);
                EntradaArticulos entradaarticulo = EntradaArticulosBLL.Buscar(id);

                if (entradaarticulo != null)
                {
                    EntradaIdNumericUpDown.Value    = entradaarticulo.EntradaId;
                    ArticulosComboBox.SelectedValue = entradaarticulo.ArticuloID;
                    CantidadNumericUpDown.Value     = entradaarticulo.Cantidad;
                }
                else
                {
                    MessageBox.Show("No Fue Encontrado!",
                                    "Fallo!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                GeneralErrorProvider.Clear();
            }
        }
Exemplo n.º 8
0
 private void Nuevobutton_Click(object sender, EventArgs e)
 {
     EntradaIDNumericUpDown.Value = 0;
     FechaDateTimePicker1.ResetText();
     GeneralErrorProvider.Clear();
     CantidadNumericUpDown2.Value = 0;
 }
Exemplo n.º 9
0
        private void Eliminarbutton_Click(object sender, EventArgs e)
        {
            //if(Validar(2))
            //{
            //    MessageBox.Show("Ingrese el Id");
            //    return;
            //}

            int id = Convert.ToInt32(EntradaIDNumericUpDown.Value);

            //rEntradaArt rEntradaArt = rEntradaArtBLL.Buscar(id);

            //if(rEntradaArt != null)
            //{
            if (BLL.rEntradaArtBLL.Eliminar(id))
            {
                MessageBox.Show("Eliminado", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("No se pudo eliminar!!", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            //}
            GeneralErrorProvider.Clear();
        }
        private void Guardarbutton_Click(object sender, EventArgs e)
        {
            bool paso = false;

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

            GeneralErrorProvider.Clear();

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

            if (paso)
            {
                MessageBox.Show("Guardado", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("No se pudo guardar", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 11
0
        private void Guardarbutton_Click(object sender, EventArgs e)
        {
            bool     paso     = false;
            Talleres talleres = new Talleres();

            if (Validar(2))
            {
                MessageBox.Show("llenar los campo Marcados");
            }
            GeneralErrorProvider.Clear();

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

            if (paso)
            {
                MessageBox.Show("Guardado", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("No se pudo guardar", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 12
0
        private void BuscarButton_Click(object sender, EventArgs e)
        {
            GeneralErrorProvider.Clear();

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

            int           id            = Convert.ToInt32(MantenimientoIdNumericUpDown.Value);
            Mantenimiento mantenimiento = BLL.MantenimientoBLL.Buscar(id);

            if (mantenimiento != null)
            {
                LlenaCampo(mantenimiento);

                //MantenimientoIdNumericUpDown.Value = mantenimiento.MantenimientoId;
                //TallerComboBox.Text = mantenimiento.Taller.ToString();
            }
            else
            {
                MessageBox.Show("No se encontro", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void LimpiarCampos()
        {
            EntradaIdNumericUpDown.Value = 0;
            CantidadNumericUpDown.Value  = 0;
            fechaDateTimePicker.Value    = DateTime.Now;

            GeneralErrorProvider.Clear();
        }
Exemplo n.º 14
0
        private void LimpiarCampos()
        {
            ProductoIdNumericUpDown.Value = 0;
            DescripcionTextBox.Clear();
            CostoNumericUpDown.Value    = 0;
            PrecioNumericUpDown.Value   = 0;
            GananciaNumericUpDown.Value = 0;
            InventarioTextBox.Clear();
            InventarioTextBox.Text = 0.ToString();

            GeneralErrorProvider.Clear();
        }
Exemplo n.º 15
0
        private void LimpiarCampos()
        {
            UsuarioIdNumericUpDown.Value = 0;
            NombresTextBox.Clear();
            UsuarioTextBox.Clear();
            ClaveTextBox.Clear();
            VerificarClaveTextBox.Clear();
            FechaDateTimePicker.Value = DateTime.Now;
            TotalVendidoTextBox.Clear();

            GeneralErrorProvider.Clear();
        }
Exemplo n.º 16
0
 private void Nuevobutton_Click(object sender, EventArgs e)
 {
     MantenimientoIdNumericUpDown.Value = 0;
     FechaDateTimePicker.Value          = DateTime.Now;
     CantidadNumericUpDown.Value        = 0;
     PrecioNumericUpDown.Value          = 0;
     ImporteNumericUpDown.Value         = 0;
     TotalnumericUpDown.Value           = 0;
     DetalledataGridView.DataSource     = null;
     SubTotalNumericUpDown.Value        = 0;
     ITBISNumericUpDown.Value           = 0;
     GeneralErrorProvider.Clear();
     mantenimiento.Detalle.Clear();
 }
Exemplo n.º 17
0
        private void ButtonGuardar_Click(object sender, EventArgs e)
        {
            bool     paso    = false;
            Usuarios usuario = Llenaclase();

            if (VerificarClave())
            {
                MessageBox.Show("La Contraseña No Es la Misma Verique!");
            }
            else if (Validar(2))
            {
                MessageBox.Show("Introduzca Las Casillas Correspondientes!");
            }
            else
            {
                if (UsuarioIdNumericUpDown.Value == 0)
                {
                    paso = UsuariosBLL.Guardar(usuario);
                }
                else
                {
                    int id       = Convert.ToInt32(UsuarioIdNumericUpDown.Value);
                    var usuarios = UsuariosBLL.Buscar(id);
                    if (usuarios != null)
                    {
                        paso = UsuariosBLL.Modificar(usuario);
                    }
                    else
                    {
                        MessageBox.Show("Id No Encotrado!", "Fallo",
                                        MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
                LimpiarCampos();
                GeneralErrorProvider.Clear();
                if (paso)
                {
                    MessageBox.Show("Guardado!", "Exitoso",
                                    MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("No pudo Guardar!", "Fallo",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Exemplo n.º 18
0
        private void NuevoButton_Click(object sender, EventArgs e)
        {
            FacturaIdNumericUpDown.Value   = 0;
            FechaDateTimePicker.Value      = DateTime.Now;
            ClienteComboBox.SelectedIndex  = 0;
            ProductoComboBox.SelectedIndex = 0;
            CantidadNumericUpDown.Value    = 0;
            PrecioNumericUpDown.Value      = 0;
            ImporteNumericUpDown.Value     = 0;
            SuBTotalNumericUpDown.Value    = 0;
            ITBISNumericUpDown.Value       = 0;
            TotalNumericUpDown.Value       = 0;
            DetalledataGridView.DataSource = null;
            GeneralErrorProvider.Clear();



            GeneralErrorProvider.Clear();
        }
Exemplo n.º 19
0
        private void buttonGuardar_Click(object sender, EventArgs e)
        {
            bool      paso     = false;
            Articulos articulo = Llenaclase();

            if (validar(2))
            {
                MessageBox.Show("Introduzca Las Casillas Correspondientes!");
            }
            else
            {
                if (ArticuloIdNumericUpDown.Value == 0)
                {
                    paso = ArticulosBLL.Guardar(articulo);
                }
                else
                {
                    int id        = Convert.ToInt32(ArticuloIdNumericUpDown.Value);
                    var articulos = ArticulosBLL.Buscar(id);
                    if (articulos != null)
                    {
                        paso = ArticulosBLL.Modificar(articulo);
                    }
                    else
                    {
                        MessageBox.Show("Id No Encotrado!", "Fallo",
                                        MessageBoxButtons.OK, MessageBoxIcon.Error);
                    }
                }
                LimpiarCampos();
                GeneralErrorProvider.Clear();
                if (paso)
                {
                    MessageBox.Show("Guardado!", "Exitoso",
                                    MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("No pudo Guardar!", "Fallo",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Exemplo n.º 20
0
        private void buttonGuardar_Click(object sender, EventArgs e)
        {
            if (Validar(2))
            {
                MessageBox.Show("Debe Agregar Algun Producto al Grid", "Validación",
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            else
            {
                Mantenimiento mantenimiento = LlenaClase();
                bool          Paso          = false;

                if (MantenimientoIdNumericUpDown.Value == 0)
                {
                    Paso = MantenimientoBLL.Guardar(mantenimiento);
                    GeneralErrorProvider.Clear();
                }
                else
                {
                    int id             = Convert.ToInt32(MantenimientoIdNumericUpDown.Value);
                    var mantenimientos = MantenimientoBLL.Buscar(id);
                    if (mantenimientos != null)
                    {
                        Paso = MantenimientoBLL.Modificar(mantenimiento);
                    }
                    GeneralErrorProvider.Clear();
                }

                if (Paso)
                {
                    LimpiarCampos();
                    MessageBox.Show("Guardado!!", "Exito",
                                    MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("No se pudo guardar!!", "Fallo",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Exemplo n.º 21
0
        public void LimpiarCampos()
        {
            VentaIdNumericUpDown.Value     = 0;
            FechaVentaDateTimePicker.Value = DateTime.Now;
            DescripcionTextBox.Clear();
            NombreClienteTextBox.Clear();
            TelefonomaskedTextBox.Clear();
            CantidadNumericUpDown.Value = 0;
            SubTotalTextBox.Text        = 0.ToString();
            ItbisTextBox.Text           = 0.ToString();
            TotalTextBox.Clear();

            ImporteTextBox.Clear();
            TotalTextBox.Text = 0.ToString();
            VentaDetalleDataGridView.DataSource = null;

            //Total = 0;

            GeneralErrorProvider.Clear();
        }
Exemplo n.º 22
0
        //private void LlenarUsuario()
        //{
        //    UsuariosComboBox.DataBindings.Clear();
        //    var Usuario = UsuariosBLL.GetList(u => true);
        //    Binding doBinding = new Binding("Text", Usuario, "Nombres");
        //    UsuariosComboBox.DataBindings.Add(doBinding);
        //}


        private void BuscarFacturaIdButton_Click(object sender, EventArgs e)//Buscar FacturaId
        {
            int      id       = Convert.ToInt32(FacturaIdNumericUpDown.Value);
            Facturas facturas = BLL.FacturasBLL.Buscar(id);

            if (facturas != null)
            {
                FacturaIdNumericUpDown.Value   = facturas.FacturaId;
                SuBTotalNumericUpDown.Value    = facturas.SubTotal;
                ITBISNumericUpDown.Value       = facturas.Itbis;
                TotalNumericUpDown.Value       = facturas.Total;
                DetalledataGridView.DataSource = facturas.Detalle.ToList();
            }
            else
            {
                MessageBox.Show("No se encontro", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            GeneralErrorProvider.Clear();
        }
Exemplo n.º 23
0
        public void LimpiarCampos()
        {
            MantenimientoIdNumericUpDown.Value = 0;
            FechaDateTimePicker.Value          = DateTime.Now;
            CantidadNumericUpDown.Value        = 0;
            TotalTextBox.Clear();

            ImporteTextBox.Clear();
            SubtotalTextBox.Text           = 0.ToString();
            TotalTextBox.Text              = 0.ToString();
            ITBISTextBox.Text              = 0.ToString();
            DetalleDataGridView.DataSource = null;

            itbis = 0;

            Total = 0;


            GeneralErrorProvider.Clear();
        }
Exemplo n.º 24
0
        private void GuardarButton_Click(object sender, EventArgs e)
        {
            bool     paso     = false;
            Clientes clientes = new Clientes();

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

            GeneralErrorProvider.Clear();

            clientes = LlenarClase();

            if (ClienteIdNumericUpDown.Value == 0)
            {
                paso = BLL.ClientesBLL.Guardar(clientes);
            }
            else
            {
                int      id        = Convert.ToInt32(ClienteIdNumericUpDown.Value);
                Clientes clientesd = BLL.ClientesBLL.Buscar(id);

                //if(clientesd != null)
                //{
                paso = BLL.ClientesBLL.Modificar(clientes);
                //}
                //else
                //    MessageBox.Show("No se pudo encontrar", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            if (paso)
            {
                MessageBox.Show("Guardado", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("No se pudo guardar", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 25
0
        //private void FechaDateTimePicker_ValueChanged(object sender, EventArgs e)
        //{
        //    ProximodaMantenimientoTimePicker.Value = FechaDateTimePicker.Value.AddMonths(3);
        //}

        private void Eliminarbutton_Click(object sender, EventArgs e)
        {
            int id = Convert.ToInt32(MantenimientoIdNumericUpDown.Value);

            if (BLL.MantenimientoBLL.Eliminar(id))
            {
                MessageBox.Show("Eliminado!!", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("No se pudo eliminar!!", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            GeneralErrorProvider.Clear();

            //if (Validar())
            //{
            //    MessageBox.Show("agregar ariticulos al Grid", "Validar", MessageBoxButtons.OK, MessageBoxIcon.Error);
            //    return;
            //}
        }
Exemplo n.º 26
0
        private void BuscarButton_Click(object sender, EventArgs e)
        {
            int       id        = Convert.ToInt32(ArticuloIDNumericUpDown.Value);
            Articulos articulos = BLL.ArticulosBLL.Buscar(id);

            if (articulos != null)
            {
                ArticuloIDNumericUpDown.Value = articulos.ArticuloId;
                DescripcionTextBox.Text       = articulos.Descripcion;
                CostoNumericUpDown.Value      = Convert.ToDecimal(articulos.Costo);
                PrecioNumericUpDown.Value     = Convert.ToDecimal(articulos.Precio);
                GananciaTextBox.Text          = articulos.Ganancia.ToString();
                //GananciaNumericUpDown.Value = Convert.ToDecimal(articulos.Ganancia);
                InventarioNumericUpDown.Value = Convert.ToDecimal(articulos.Inventario);
            }
            else
            {
                MessageBox.Show("no se encontro", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            GeneralErrorProvider.Clear();
        }
Exemplo n.º 27
0
        private void BuscarButton_Click(object sender, EventArgs e)
        {
            int      id       = Convert.ToInt32(ClienteIdNumericUpDown.Value);
            Clientes clientes = BLL.ClientesBLL.Buscar(id);

            if (clientes != null)
            {
                ClienteIdNumericUpDown.Value = clientes.ClienteId;
                NombresTextBox.Text          = clientes.Nombres;
                SexoComboBox.Text            = clientes.Sexo;
                CedulaMaskedTextBox.Text     = clientes.Cedula.ToString();
                FechaDateTimePicker.ResetText();
                DireccionTextBox.Text           = clientes.Direccion;
                NumeroCelularMaskedTextBox.Text = clientes.NumeroCelular.ToString();
            }
            else
            {
                MessageBox.Show("no se encontro", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            GeneralErrorProvider.Clear();
        }
        private void Eliminarbutton_Click(object sender, EventArgs e)
        {
            GeneralErrorProvider.Clear();

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

            int id = Convert.ToInt32(IdnumericUpDown.Value);

            if (BLL.ArticulosBLL.Eliminar(id))
            {
                MessageBox.Show("Eliminado", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("No se pudo eliminar", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 29
0
        private void buttonGuardar_Click(object sender, EventArgs e)
        {
            bool      paso      = false;
            Vehiculos vehiculos = Llenaclase();


            if (validar(2))
            {
                MessageBox.Show("Llene las casillas correspondientes");
            }
            else
            {
                if (vehiculoIdNumericUpDown.Value == 0)
                {
                    paso = VehiculosBLL.Guardar(vehiculos);
                }
                else
                {
                    int id             = Convert.ToInt32(vehiculoIdNumericUpDown.Value);
                    var mantenimientos = VehiculosBLL.Buscar(id);
                    if (mantenimientos != null)
                    {
                        paso = VehiculosBLL.Modificar(vehiculos);
                    }
                }
                LimpiarCampos();
                GeneralErrorProvider.Clear();
                if (paso)
                {
                    MessageBox.Show("Guardado!", "Exitoso",
                                    MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("No pudo Guardar!", "Fallo",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Exemplo n.º 30
0
        private void Guardarbutton_Click(object sender, EventArgs e)
        {
            bool      paso      = false;
            Articulos articulos = new Articulos();

            if (Validar())
            {
                MessageBox.Show("Favor revisar todos los campos", "Validación",
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            GeneralErrorProvider.Clear();

            articulos = LlenarClase();

            if (ArticuloIDNumericUpDown.Value == 0)
            {
                paso = BLL.ArticulosBLL.Guardar(articulos);
            }
            else
            {
                int id = Convert.ToInt32(ArticuloIDNumericUpDown.Value);

                Articulos articulosd = BLL.ArticulosBLL.Buscar(id);

                if (articulosd != null)
                {
                    paso = BLL.ArticulosBLL.Modificar(articulos);
                }
            }
            if (paso)
            {
                MessageBox.Show("Guardado", "Exito", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("No se pudo guardar", "Fallo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }