Ejemplo n.º 1
0
        public override void PrintList()
        {
            PgMng.Reset(3, 1, Face.Resources.Messages.LOADING_DATA, this);
            BankLineReportMng reportMng = new BankLineReportMng(AppContext.ActiveSchema, this.Text, this.FilterValues);

            PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT);
            ReportClass report = reportMng.GetListReport((BankLineList.GetList(Datos.DataSource as IList <BankLineInfo>)));

            PgMng.FillUp();

            ShowReport(report);
        }
Ejemplo n.º 2
0
        protected override void PrintAction()
        {
            if (!ValidateInput())
            {
                _action_result = DialogResult.Ignore;
                return;
            }

            PgMng.Reset(5, 1, Face.Resources.Messages.RETRIEVING_DATA, this);

            string filtro = GetFilterValues();

            PgMng.Grow();

            Library.Invoice.QueryConditions conditions = new Library.Invoice.QueryConditions();
            conditions.TipoMovimientoBanco = (EBankLineType)(long)TipoMovimiento_CB.SelectedValue;
            conditions.TipoTitular         = (ETipoTitular)(long)TipoTitular_CB.SelectedValue;
            conditions.CuentaBancaria      = TodosCuentas_CkB.Checked ? null : _cuenta;
            conditions.MedioPago           = (EMedioPago)(long)MedioPago_CB.SelectedValue;
            conditions.FechaIni            = FInicial_DTP.Checked ? FInicial_DTP.Value : DateTime.MinValue;
            conditions.FechaFin            = FFinal_DTP.Checked ? FFinal_DTP.Value : DateTime.MaxValue;

            switch (conditions.TipoMovimientoBanco)
            {
            case EBankLineType.Cobro:
                conditions.Titular = (TodosCliente_CkB.Checked) ? null : (ITitular)_cliente;
                break;

            case EBankLineType.PagoFactura:
                conditions.Titular = (TodosAcreedor_CkB.Checked) ? null : (ITitular)_acreedor;
                break;

            case EBankLineType.Todos:
            case EBankLineType.SalidaCaja:
                conditions.Titular = null;
                break;
            }

            BankLineList movs = BankLineList.GetList(conditions, false);

            PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT);

            BankLineReportMng reportMng = new BankLineReportMng(AppContext.ActiveSchema, this.Text, filtro);
            ReportClass       rpt       = reportMng.GetListReport(movs);

            PgMng.FillUp();

            ShowReport(rpt);

            _action_result = DialogResult.Ignore;
        }