Beispiel #1
0
        protected override void RefreshMainData()
        {
            InputInvoiceList list = InputInvoiceList.GetListByPagoAndPendientesByAcreedor(_entity.Oid, _holder.Oid, _holder.ETipoAcreedor, false);

            Datos_Lineas.DataSource = InputInvoiceList.GetSortedList(list, "Prevision", ListSortDirection.Ascending);
            PgMng.Grow();

            base.RefreshMainData();
        }
Beispiel #2
0
        protected virtual void SetUnlinkedGridValues(Control control)
        {
            SortedBindingList <InputInvoiceInfo> invoices = Datos_Lineas.DataSource as SortedBindingList <InputInvoiceInfo>;
            InputInvoiceList list = InputInvoiceList.GetList(invoices);

            if (invoices != null)
            {
                list.UpdatePagoValues(_entity);
            }
            Datos_Lineas.DataSource = list.GetSortedList();
            UpdateAllocated();
        }
Beispiel #3
0
        public override void UpdateList()
        {
            switch (_current_action)
            {
            case molAction.Add:
                if (_entity == null)
                {
                    return;
                }
                List.AddItem(_entity.GetInfo(false));
                if (FilterType == IFilterType.Filter)
                {
                    InputInvoiceList listA = InputInvoiceList.GetList(_filter_results);
                    listA.AddItem(_entity.GetInfo(false));
                    _filter_results = listA.GetSortedList();
                }
                break;

            case molAction.Edit:
            case molAction.ChangeStateContabilizado:
            case molAction.ChangeStateEmitido:
            case molAction.Unlock:
                if (_entity == null)
                {
                    return;
                }
                ActiveItem.CopyFrom(_entity);
                break;

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

            RefreshSources();
            if (_entity != null)
            {
                Select(_entity.Oid);
            }
            _entity = null;
        }