Beispiel #1
0
        public override void UpdateList()
        {
            switch (_current_action)
            {
            case molAction.Add:
                if (_entity == null)
                {
                    return;
                }
                List.NewItem(_entity.GetInfo(false));
                List.UpdateBalance();
                if (FilterType == IFilterType.Filter)
                {
                    LivestockBookLineList listA = LivestockBookLineList.GetList(_filter_results);
                    listA.NewItem(_entity.GetInfo(false));
                    _filter_results = listA.GetSortedList();
                }
                break;

            case molAction.Edit:
            case molAction.Lock:
            case molAction.Unlock:
            case molAction.CustomAction1:
                if (_entity == null)
                {
                    return;
                }
                ActiveItem.CopyFrom(_entity);
                List.UpdateBalance();
                if (FilterType == IFilterType.Filter)
                {
                    LivestockBookLineList list = LivestockBookLineList.GetList(_filter_results);
                    list.UpdateBalance();
                    _filter_results = list.GetSortedList();
                }
                break;

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

            RefreshSources();
            if (_entity != null)
            {
                Select(_entity.Oid);
            }
            _entity = null;
        }
Beispiel #2
0
        public override void PrintList()
        {
            PgMng.Reset(3, 1, Face.Resources.Messages.LOADING_DATA, this);
            LivestockBookReportMng reportMng = new LivestockBookReportMng(AppContext.ActiveSchema, this.Text, FilterValues);

            PgMng.Grow(Face.Resources.Messages.BUILDING_REPORT);
            ReportClass report = reportMng.GetListReport(LivestockBookLineList.GetList((IList <LivestockBookLineInfo>)Datos.List));

            PgMng.FillUp();
            ShowReport(report);
        }
Beispiel #3
0
        protected override void RefreshMainData()
        {
            PgMng.Grow(string.Empty, "Expedient");

            _selectedOid = ActiveOID;

            switch (DataType)
            {
            case EntityMngFormTypeData.Default:
                List = LivestockBookLineList.GetList(_book_oid, false);
                break;

            case EntityMngFormTypeData.ByParameter:
                _sorted_list = List.GetSortedList();
                break;
            }
            PgMng.Grow(string.Empty, "Expedients");
        }