Beispiel #1
0
        public void Exportar(ref System.Windows.Forms.ProgressBar pgbarrNativo)
        {
            try
            {
                TipoPresentacion = F_Tipo.Equals("A") ? Tipo.Anual : Tipo.Mensual;

                ObservableCollection <Infrastructure.Aspect.DataAccess.DataAccessFilterSQL> _listFilters = new ObservableCollection <Infrastructure.Aspect.DataAccess.DataAccessFilterSQL>();
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@psinEMPR_Codigo", FilterValue = Controls.Entorno.ItemEmpresa.EMPR_Codigo, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Int16, FilterSize = 2
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@Tipo", FilterValue = F_Tipo, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Char, FilterSize = 1
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@Periodo", FilterValue = F_Periodo, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Char, FilterSize = 4
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@pchrCUBA_Codigo", FilterValue = F_CUBA_Codigo, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Char, FilterSize = 3
                });
                _listFilters.Add(new Infrastructure.Aspect.DataAccess.DataAccessFilterSQL()
                {
                    FilterName = "@IncluirDiferidos", FilterValue = F_IncluirDiferidos, FilterType = Infrastructure.Aspect.DataAccess.DataAccessFilterTypes.Boolean, FilterSize = 1
                });
                DTReporte = Client.GetDTCtaCte("CAJ_REPOSS_FlujoCaja", _listFilters);
                if (DTReporte != null)
                {
                    switch (TReporte)
                    {
                    case TipoReporte.Excel:
                        GenerarXLS(DTReporte, ref pgbarrNativo);
                        break;

                    case TipoReporte.Reporte:
                        LView.GenerarReporte();
                        break;

                    default:
                        break;
                    }
                }
                else
                {
                    Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeInformacion(Title, "No existen datos para mostrar el reporte.");
                }
            }
            catch (Exception ex)
            { Infrastructure.WinForms.Controls.Dialogos.MostrarMensajeError(Title, "Ha ocurrido un error Exportando el Reporte.", ex); }
        }