コード例 #1
0
        private void cmb_imprimir_Click(object sender, EventArgs e)
        {
            try
            {
                com_ordencompra_local_Info Info_OC = (com_ordencompra_local_Info)gridViewOrdComp.GetFocusedRow();
                if (Info_OC == null)
                {
                    return;
                }

                XCOMP_NATU_Rpt007_Rpt Reporte_Natu = new XCOMP_NATU_Rpt007_Rpt();
                Reporte_Natu.RequestParameters = false;
                ReportPrintTool pt_Natu = new ReportPrintTool(Reporte_Natu);
                pt_Natu.AutoShowParametersPanel   = false;
                Reporte_Natu.PIdEmpresa.Value     = param.IdEmpresa;
                Reporte_Natu.PIdSucursal.Value    = Info_OC.IdSucursal;
                Reporte_Natu.PIdOrdenCompra.Value = Info_OC.IdOrdenCompra;
                Reporte_Natu.ShowPreviewDialog();
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
コード例 #2
0
        private void ucGe_Menu_event_btnImprimir_Click(object sender, EventArgs e)
        {
            try
            {
                if (list_OrdComp.Count != 0)
                {
                    MessageBox.Show("Se procederá a imprimir todas las Ordenes de Compras", param.Nombre_sistema);

                    foreach (var item in ListaBind)
                    {
                        XCOMP_NATU_Rpt007_Rpt Reporte_Natu = new XCOMP_NATU_Rpt007_Rpt();
                        Reporte_Natu.RequestParameters = false;
                        ReportPrintTool pt_Natu = new ReportPrintTool(Reporte_Natu);
                        pt_Natu.AutoShowParametersPanel   = false;
                        Reporte_Natu.PIdEmpresa.Value     = param.IdEmpresa;
                        Reporte_Natu.PIdSucursal.Value    = item.IdSucursal;
                        Reporte_Natu.PIdOrdenCompra.Value = item.IdOrdenCompra;
                        Reporte_Natu.ShowPreviewDialog();
                    }
                }
            }
            catch (Exception ex)
            {
                Log_Error_bus = new Business.General.tb_sis_Log_Error_Vzen_Bus();
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }