Beispiel #1
0
        private void TipoExpediente_CB_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (TipoExpediente_CB.SelectedItem == null)
            {
                return;
            }
            if (_facturas_todas == null)
            {
                return;
            }

            ETipoExpediente tipo = (ETipoExpediente)((long)TipoExpediente_CB.SelectedValue);

            if (tipo != ETipoExpediente.Todos)
            {
                FCriteria criteria = new FCriteria <long>("TipoExpediente", (long)TipoExpediente_CB.SelectedValue);
                _facturas = LineaFomentoList.GetSortedList(_facturas_todas.GetSubList(criteria), "NExpediente", ListSortDirection.Ascending);
            }
            else
            {
                _facturas = LineaFomentoList.GetSortedList(_facturas_todas, "NExpediente", ListSortDirection.Ascending);
            }

            Datos_Facturas.DataSource = _facturas;
            SetUnlinkedGridValues(Facturas_DGW.Name);
            SetGridColors(Facturas_DGW);
        }
Beispiel #2
0
        protected override void RefreshMainData()
        {
            Datos.DataSource = _entity;
            PgMng.Grow();

            _facturas_todas           = LineaFomentoList.GetPendientesList(DateTime.MaxValue, false);
            _facturas                 = LineaFomentoList.GetSortedList(_facturas_todas, "NExpediente", ListSortDirection.Ascending);
            Datos_Facturas.DataSource = _facturas;
            SetGridColors(Facturas_DGW);
            SetComboYears();
            PgMng.Grow();

            base.RefreshMainData();
        }
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)
                {
                    LineaFomentoList listA = LineaFomentoList.GetList(_filter_results);
                    listA.AddItem(_entity.GetInfo(false));
                    _filter_results = listA.GetSortedList();
                }
                break;

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

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

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