예제 #1
0
        protected override void SetUnlinkedGridValues(Control control)
        {
            SortedBindingList <NominaInfo> nominas = Datos_Lineas.DataSource as SortedBindingList <NominaInfo>;
            PayrollList list = PayrollList.GetList(nominas);

            if (nominas != null)
            {
                list.UpdatePagoValues(_entity);
            }
            Datos_Lineas.DataSource = list.GetSortedList();
            UpdateAllocated();
        }
예제 #2
0
        protected override void RefreshMainData()
        {
            Datos.DataSource = _entity;
            PgMng.Grow();

            Datos_Lineas.DataSource = PayrollList.GetSortedList(_payrolls, "PrevisionPago", ListSortDirection.Ascending);
            PgMng.Grow();

            Fecha_DTP.Value       = _entity.Fecha;
            Vencimiento_DTP.Value = _entity.Vencimiento;

            base.RefreshMainData();
        }
        public override void UpdateList()
        {
            switch (_current_action)
            {
            case molAction.Add:
                if (_entity == null)
                {
                    return;
                }
                List.AddItem(_entity.GetInfo(false));
                if (FilterType == IFilterType.Filter)
                {
                    PayrollList listA = PayrollList.GetList(_filter_results);
                    listA.AddItem(_entity.GetInfo(false));
                    _filter_results = listA.GetSortedList();
                }
                break;

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

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

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