Exemplo n.º 1
0
        public void Refrescar(int ArticuloComboID)
        {
            RelacionCombosBL ObjetoRelacion = new RelacionCombosBL();

            dgvArticulos.AutoGenerateColumns = false;
            dgvArticulos.DataSource          = ObjetoRelacion.Listar(InventarioID);
        }
Exemplo n.º 2
0
        private void btnEliminar_Click(object sender, EventArgs e)
        {
            RelacionCombosBL ObjetoRelacion = new RelacionCombosBL();
            int I = (int)InventarioID;

            ObjetoRelacion.Eliminar(ArticuloID, I);
            Refrescar();
        }
Exemplo n.º 3
0
 public void ModificarCantidad(Int64 _InventarioID, Decimal Cantidad)
 {
     try
     {
         Int64            I = Convert.ToInt64(InventarioID);
         RelacionCombosBL ObjetoRelacion = new RelacionCombosBL();
         ObjetoRelacion.ActualizarCantidad(_InventarioID, I, Cantidad);
     }
     catch (Exception Ex)
     {
         MessageBox.Show(Ex.Message, "Error en cambio de cantidad", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 4
0
 private void frmVistaComponentesCombos_Load(object sender, EventArgs e)
 {
     try
     {
         RelacionCombosBL ObjetoRelacion = new RelacionCombosBL();
         dgvArticulos.AutoGenerateColumns = false;
         dgvArticulos.DataSource          = ObjetoRelacion.Listar(InventarioID);
     }
     catch (Exception Ex)
     {
         MessageBox.Show(Ex.Message);
     }
 }
Exemplo n.º 5
0
 public void Refrescar()
 {
     //Refresca el grid de articulos pertenecientes a un combo
     if (InventarioID.HasValue)
     {
         try
         {
             int I = Convert.ToInt32(InventarioID);
             RelacionCombosBL ObjetoRelacion = new RelacionCombosBL();
             dgvArticulos.AutoGenerateColumns = false;
             dgvArticulos.DataSource          = ObjetoRelacion.Listar(I);
         }
         catch (Exception Ex)
         {
             MessageBox.Show(Ex.Message);
         }
     }
 }
Exemplo n.º 6
0
        private Boolean IndCambioFechaVencimiento; //Indicador del cambio de valor en el campo fecha de vencimiento

        private void frmAgregarEditarInventario_Load(object sender, EventArgs e)
        {
            try
            {
                //CARGAMOS DEPENDENCIAS EN LOS COMBOBOX
                CargarDepedencias();

                /*SI LA VARIABLE CONTIENE VALOR ENTONCES BUSCAMOS LOS DATOS
                 * DEL PRODUCTO SELECCIONADO EN EL FORMULARIO DE GESTION*/
                if (InventarioID.HasValue)
                {
                    try
                    {
                        Int64        I = Convert.ToInt64(InventarioID);
                        InventarioBL ObjetoInventario = new InventarioBL();
                        //MOSTRAMOS EL RESULTADO DE LA BUSQUEDA DE ARTICULO
                        MostarResultado(ObjetoInventario.BuscarPorID(I));
                        //BLOQUEAMOS LOS CAMPOS NO EDITABLES
                        BloqueoCampos();

                        RelacionCombosBL ObjetoRelacion = new RelacionCombosBL();
                        dgvArticulos.AutoGenerateColumns = false;
                        dgvArticulos.DataSource          = ObjetoRelacion.Listar(I);
                    }
                    catch (Exception Ex)
                    {
                        MessageBox.Show(Ex.Message);
                    }
                }
                else
                {
                    btnAgregar.Enabled  = false;
                    btnEditar.Enabled   = false;
                    btnEliminar.Enabled = false;
                    txtID.Text          = "-1";
                }
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message);
            }
        }
Exemplo n.º 7
0
        public void AgregarArticulo(Int64 _InventarioID)
        {
            RelacionCombosBL ObjetoRelacion = new RelacionCombosBL();

            try
            {
                cRelacionCombos Combo = new cRelacionCombos();

                Combo.InventComboID = InventarioID;
                Combo.InventarioID  = _InventarioID;
                //Combo.AlmacenID = AlmacenID;
                Combo.Cantidad = 1;

                //Agrega el articulo al combo
                ObjetoRelacion.Crear(Combo);
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message, "Error al agregar articulo a combo", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }