コード例 #1
0
        public override void UpdateList()
        {
            switch (_current_action)
            {
            case molAction.Add:
                if (_entity == null)
                {
                    return;
                }
                List.AddItem(_entity.GetInfo(false));
                if (FilterType == IFilterType.Filter)
                {
                    BankLineList listA = BankLineList.GetList(_filter_results);
                    listA.AddItem(_entity.GetInfo(false));
                    listA.UpdateSaldo();
                    _filter_results = listA.GetSortedList();
                }
                break;

            case molAction.Edit:
            case molAction.Lock:
            case molAction.Unlock:
            case molAction.ChangeStateAnulado:
            case molAction.CustomAction1:
                if (_entity == null)
                {
                    return;
                }
                ActiveItem.CopyFrom(_entity);
                break;

            case molAction.Delete:
                if (ActiveItem == null)
                {
                    return;
                }
                List.RemoveItem(ActiveOID);
                if (FilterType == IFilterType.Filter)
                {
                    BankLineList listD = BankLineList.GetList(_filter_results);
                    listD.RemoveItem(ActiveOID);
                    listD.UpdateSaldo();
                    _filter_results = listD.GetSortedList();
                }
                break;
            }

            RefreshSources();
            if (_entity != null)
            {
                Select(_entity.Oid);
            }
            _entity = null;
        }
コード例 #2
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);
        }
コード例 #3
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;
        }