Ejemplo n.º 1
0
        public override void PrintObject()
        {
            PgMng.Reset(5, 1, Face.Resources.Messages.LOADING_DATA, this);

            OutputDeliveryReportMng reportMng = new OutputDeliveryReportMng(AppContext.ActiveSchema);

            OutputDeliveryInfo item = OutputDeliveryInfo.Get(EntityInfo.Oid, ETipoEntidad.WorkReport, true);

            PgMng.Grow();

            WorkReportInfo work_report = WorkReportInfo.Get(item.OidHolder, false);

            PgMng.Grow();

            ExpedientInfo work = ExpedientInfo.Get((work_report != null) ? work_report.OidExpedient : 0, false);

            PgMng.Grow();

            ReportClass report = reportMng.GetWorkDelivery(item, work);

            PgMng.FillUp();

            if (SettingsMng.Instance.GetUseDefaultPrinter())
            {
                int n_copias = SettingsMng.Instance.GetDefaultNCopies();
                PrintReport(report, n_copias);
            }
            else
            {
                ShowReport(report);
            }
        }
        public override void PrintDetailAction()
        {
            if (ActiveItem == null)
            {
                return;
            }

            PgMng.Reset(6, 1, Face.Resources.Messages.LOADING_DATA, this);

            OutputDeliveryReportMng reportMng = new OutputDeliveryReportMng(AppContext.ActiveSchema, this.Text, this.FilterValues);

            SerieInfo serie = SerieInfo.Get(ActiveItem.OidSerie, false);

            PgMng.Grow();

            ClienteInfo cliente = ClienteInfo.Get(ActiveItem.OidHolder, false);

            PgMng.Grow();

            FormatConfFacturaAlbaranReport conf = new FormatConfFacturaAlbaranReport();

            conf.nota            = (cliente.OidImpuesto == 1) ? Library.Invoice.Resources.Messages.NOTA_EXENTO_IGIC : string.Empty;
            conf.nota           += Environment.NewLine + (ActiveItem.Nota ? serie.Cabecera : "");
            conf.cuenta_bancaria = ActiveItem.CuentaBancaria;
            PgMng.Grow();

            OutputDeliveryInfo item = OutputDeliveryInfo.Get(ActiveOID, ActiveItem.EEntityType, true);

            PgMng.Grow();

            ReportClass report = reportMng.GetDetailReport(item, conf);

            PgMng.FillUp();

            if (SettingsMng.Instance.GetUseDefaultPrinter())
            {
                int n_copias = SettingsMng.Instance.GetDefaultNCopies();
                PrintReport(report, n_copias);
            }
            else
            {
                ShowReport(report);
            }
        }
        public override void ExportPDFAction()
        {
            if (ActiveItem == null)
            {
                return;
            }

            try
            {
                PgMng.Reset(7, 1, Face.Resources.Messages.RETRIEVING_DATA, this);

                OutputDeliveryReportMng reportMng = new OutputDeliveryReportMng(AppContext.ActiveSchema, this.Text, this.FilterValues);

                SerieInfo serie = SerieInfo.Get(ActiveItem.OidSerie, false);
                PgMng.Grow();

                ClienteInfo cliente = ClienteInfo.Get(ActiveItem.OidHolder, false);
                PgMng.Grow();

                FormatConfFacturaAlbaranReport conf = new FormatConfFacturaAlbaranReport();

                conf.nota            = (cliente.OidImpuesto == 1) ? Library.Invoice.Resources.Messages.NOTA_EXENTO_IGIC : string.Empty;
                conf.nota           += Environment.NewLine + (ActiveItem.Nota ? serie.Cabecera : "");
                conf.cuenta_bancaria = ActiveItem.CuentaBancaria;
                PgMng.Grow();

                OutputDeliveryInfo item = OutputDeliveryInfo.Get(ActiveOID, ActiveItem.EHolderType, true);
                PgMng.Grow();

                ReportClass rpt = reportMng.GetDetailReport(item, conf);
                PgMng.Grow();

                ExportPDF(rpt, ActiveItem.FileName);
            }
            finally
            {
                PgMng.FillUp();
            }
        }
Ejemplo n.º 4
0
        protected override void GetFormSourceData(long oid, object[] parameters)
        {
            ETipoEntidad holder_type = (ETipoEntidad)parameters[0];

            _entity = OutputDeliveryInfo.Get(oid, holder_type, true);
        }