Пример #1
0
        protected override void RefreshMainData()
        {
            PgMng.Grow(string.Empty, "LineaRegistro");

            long oid = ActiveOID;

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

            case EntityMngFormTypeData.ByParameter:
                _sorted_list = List.GetSortedList();
                break;
            }
            PgMng.Grow(string.Empty, "Lista de LineaRegistros");
        }
Пример #2
0
        public override void UpdateList()
        {
            switch (_current_action)
            {
            case molAction.Add:
                if (_entity == null)
                {
                    return;
                }
                List.AddItem(_entity.GetInfo(false));
                if (FilterType == IFilterType.Filter)
                {
                    LineaRegistroList listA = LineaRegistroList.GetList(_filter_results);
                    listA.AddItem(_entity.GetInfo(false));
                    _filter_results = listA.GetSortedList();
                }
                break;

            case molAction.Edit:
            case molAction.Lock:
            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)
                {
                    LineaRegistroList listD = LineaRegistroList.GetList(_filter_results);
                    listD.RemoveItem(ActiveOID);
                    _filter_results = listD.GetSortedList();
                }
                break;
            }

            RefreshSources();
            if (_entity != null)
            {
                Select(_entity.Oid);
            }
            _entity = null;
        }
Пример #3
0
        public LineaRegistroMngForm(bool is_modal, Form parent, LineaRegistroList list)
            : base(is_modal, parent, list)
        {
            InitializeComponent();

            SetView(molView.Normal);

            // 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 = LineaRegistroList.NewList().GetSortedList();
            SortProperty     = IDCompuesto.DataPropertyName;
        }
Пример #4
0
        public override void PrintList()
        {
            RegistryReportMng reportMng = new RegistryReportMng(AppContext.ActiveSchema, this.Text, this.FilterValues);

            ReportClass report = null;

            switch (_tipo)
            {
            case ETipoRegistro.Fomento:
                report = reportMng.GetListFomentoReport(LineaRegistroList.GetList(Datos.DataSource as IList <LineaRegistroInfo>));
                break;

            default:
                report = reportMng.GetListReport(LineaRegistroList.GetList(Datos.DataSource as IList <LineaRegistroInfo>));
                break;
            }

            ShowReport(report);
        }