Ejemplo n.º 1
0
        private void cmb_add_Click(object sender, EventArgs e)
        {
            com_CotizacionPedidoDet_Info row = (com_CotizacionPedidoDet_Info)gv_detalle.GetFocusedRow();

            if (row == null)
            {
                return;
            }

            if (row.Add == false)
            {
                return;
            }

            FrmIn_Producto_Mant frmManProd = new FrmIn_Producto_Mant();

            frmManProd.set_Accion(Erp.Info.General.Cl_Enumeradores.eTipo_action.grabar);
            frmManProd.ShowDialog();
            var infoP = frmManProd.Get_producto();

            if (infoP != null)
            {
                if (infoP.IdProducto != 0)
                {
                    row.IdProducto             = infoP.IdProducto;
                    row.pr_descripcion         = infoP.pr_descripcion;
                    row.IdUnidadMedida         = infoP.IdUnidadMedida;
                    row.IdUnidadMedida_Consumo = infoP.IdUnidadMedida_Consumo;
                    row.IdCod_Impuesto         = infoP.IdCod_Impuesto_Iva;
                    row.Add   = false;
                    row.Selec = false;

                    bus_pedido_det.ActualizarProducto(row.opd_IdEmpresa, row.opd_IdOrdenPedido, row.opd_Secuencia, row.IdProducto ?? 0, row.IdUnidadMedida, row.pr_descripcion);

                    gc_detalle.RefreshDataSource();
                    btn_Buscar.Focus();
                }
            }
        }
Ejemplo n.º 2
0
        private void cmb_selec_Click(object sender, EventArgs e)
        {
            com_CotizacionPedidoDet_Info row = (com_CotizacionPedidoDet_Info)gv_detalle.GetFocusedRow();

            if (row == null)
            {
                return;
            }

            if (row.Add == false)
            {
                return;
            }

            FrmIn_ProductoSeleccionar frmProduC = new FrmIn_ProductoSeleccionar();

            frmProduC.ShowDialog();
            var infoP = frmProduC.info;

            if (infoP != null)
            {
                if (infoP.IdProducto != 0)
                {
                    row.IdProducto             = infoP.IdProducto;
                    row.pr_descripcion         = infoP.pr_descripcion;
                    row.IdUnidadMedida         = infoP.IdUnidadMedida;
                    row.IdUnidadMedida_Consumo = infoP.IdUnidadMedida_Consumo;
                    row.IdCod_Impuesto         = infoP.IdCod_Impuesto_Iva;
                    row.Add   = false;
                    row.Selec = false;

                    bus_pedido_det.ActualizarProducto(row.opd_IdEmpresa, row.opd_IdOrdenPedido, row.opd_Secuencia, row.IdProducto ?? 0, row.IdUnidadMedida, row.pr_descripcion);

                    gc_detalle.RefreshDataSource();
                    btn_Buscar.Focus();
                }
            }
        }
Ejemplo n.º 3
0
        private void cmb_search_Click(object sender, EventArgs e)
        {
            try
            {
                com_CotizacionPedidoDet_Info row = (com_CotizacionPedidoDet_Info)gv_detalle.GetFocusedRow();
                if (row == null)
                {
                    return;
                }

                if (row.IdPunto_cargo == null)
                {
                    return;
                }

                FrmCom_ComprasPorPuntoCargo frm = new FrmCom_ComprasPorPuntoCargo();
                frm.IdPunto_cargo = Convert.ToInt32(row.IdPunto_cargo);
                frm.ShowDialog();
            }
            catch (Exception)
            {
            }
        }
Ejemplo n.º 4
0
 private void gv_detalle_CellValueChanging(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
 {
     try
     {
         com_CotizacionPedidoDet_Info row = (com_CotizacionPedidoDet_Info)gv_detalle.GetRow(e.RowHandle);
         if (row == null)
         {
             return;
         }
         if (e.Column == colA)
         {
             row.R = !Convert.ToBoolean(e.Value ?? false);
         }
         else
         if (e.Column == colR)
         {
             row.A = !Convert.ToBoolean(e.Value ?? false);
         }
     }
     catch (Exception)
     {
     }
 }
Ejemplo n.º 5
0
        private void cmb_addPC_Click(object sender, EventArgs e)
        {
            try
            {
                com_CotizacionPedidoDet_Info row = (com_CotizacionPedidoDet_Info)gv_detalle.GetFocusedRow();
                if (row == null)
                {
                    return;
                }

                frmCon_Punto_Cargo_Mant frm = new frmCon_Punto_Cargo_Mant(Cl_Enumeradores.eTipo_action.grabar);
                frm.event_frmCon_Punto_Cargo_Mant_FormClosing += frm_event_frmCon_Punto_Cargo_Mant_FormClosing;
                frm.ShowDialog();
                if (frm.IdPuntoCargo > 0)
                {
                    row.IdPunto_cargo = frm.IdPuntoCargo;
                }

                gc_detalle.RefreshDataSource();
            }
            catch (Exception)
            {
            }
        }
Ejemplo n.º 6
0
        private void txtStock_DoubleClick(object sender, EventArgs e)
        {
            try
            {
                com_CotizacionPedidoDet_Info row = (com_CotizacionPedidoDet_Info)gv_detalle.GetFocusedRow();
                if (row == null)
                {
                    return;
                }

                if (row.IdProducto == null)
                {
                    return;
                }

                FrmIn_ProductoPorBodegaStock frm = new FrmIn_ProductoPorBodegaStock();
                frm._IdProducto = row.IdProducto ?? 0;
                frm.ShowDialog();
            }
            catch (Exception)
            {
                throw;
            }
        }