コード例 #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;
        }
コード例 #2
0
        public LivestockBookLineSelectForm(Form parent, LivestockBookLineList list)
            : base(true, parent, list, 0)
        {
            InitializeComponent();

            SetView(molView.Select);

            DialogResult = DialogResult.Cancel;
        }
コード例 #3
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);
        }
コード例 #4
0
        protected LivestockBookLineInfo SelectEntryPair()
        {
            LivestockBookLineList list = LivestockBookLineList.GetAvailableList(_entity.OidLibro, false);

            LivestockBookLineSelectForm form = new LivestockBookLineSelectForm(this, list);

            form.ShowDialog();

            if (form.ActionResult == System.Windows.Forms.DialogResult.OK)
            {
                return(form.Selected as LivestockBookLineInfo);
            }

            return(null);
        }
コード例 #5
0
        public LivestockBookLineMngForm(bool isModal, Form parent, LivestockBookLineList list, long oidBook)
            : base(isModal, parent, list)
        {
            InitializeComponent();
            SetView();

            // Parche para poder abrir el formulario en modo diseño y no perder la configuracion de columnas
            DatosLocal_BS    = Datos;
            Tabla.DataSource = DatosLocal_BS;

            SetMainDataGridView(Tabla);
            Datos.DataSource = LivestockBookLineList.NewList().GetSortedList();
            SortProperty     = Fecha.DataPropertyName;
            SortDirection    = ListSortDirection.Descending;

            _book_oid = oidBook;
        }
コード例 #6
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");
        }
コード例 #7
0
        protected override void LoadLibroGanadero()
        {
            try
            {
                if (_livestock_lines != null)
                {
                    return;
                }

                PgMng.Reset(3, 1, Face.Resources.Messages.LOADING_DATA, this);

                _livestock_lines = LivestockBookLineList.GetByExpedienteList(_entity.Oid, false);

                LivestockBook_BS.DataSource = _livestock_lines;
                PgMng.Grow(string.Empty);
            }
            finally
            {
                PgMng.FillUp();
            }
        }