protected override void RefreshMainData()
        {
            PgMng.Grow(string.Empty, "Prestamo");

            long oid = ActiveOID;

            switch (DataType)
            {
            case EntityMngFormTypeData.Default:
                if (moleQule.Common.ModulePrincipal.GetUseActiveYear())
                {
                    List = LoanList.GetList(_loan_type, moleQule.Common.ModulePrincipal.GetActiveYear().Year, false);
                }
                else
                {
                    List = LoanList.GetList(_loan_type, false);
                }
                break;

            case EntityMngFormTypeData.ByParameter:
                _sorted_list = List.GetSortedList();
                break;
            }
            PgMng.Grow(string.Empty, "Lista de Prestamos");
        }
        public override void UpdateList()
        {
            switch (_current_action)
            {
            case molAction.Add:
            case molAction.Copy:
                if (_entity == null)
                {
                    return;
                }
                List.AddItem(_entity.GetInfo());
                if (FilterType == IFilterType.Filter)
                {
                    LoanList listA = LoanList.GetList(_filter_results);
                    listA.AddItem(_entity.GetInfo());
                    _filter_results = listA.GetSortedList();
                }
                break;

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

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

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