protected override void SetUnlinkedGridValues(Control control)
 {
     if (_gastos != null)
     {
         _gastos.UpdatePagoValues(_entity);
     }
     Expenses_BS.DataSource = ExpenseList.GetSortedList(_gastos, "PrevisionPago", ListSortDirection.Ascending);
     UpdateAllocated();
     RefreshAction();
 }
Exemplo n.º 2
0
        public override void UpdateList()
        {
            switch (_current_action)
            {
            case molAction.Add:
            case molAction.Copy:
                if (_entity == null)
                {
                    return;
                }
                List.AddItem(_entity.GetInfo(false));
                if (FilterType == IFilterType.Filter)
                {
                    ExpenseList listA = ExpenseList.GetList(_filter_results);
                    listA.AddItem(_entity.GetInfo(false));
                    //_filter_results.Clear();
                    _filter_results = listA.GetSortedList();
                }
                break;

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

            RefreshSources();
            if (_entity != null)
            {
                Select(_entity.Oid);
            }
            _entity = null;
        }
Exemplo n.º 3
0
        protected override void SetUnlinkedGridValues(string gridName)
        {
            SortedBindingList <ExpenseInfo> gastos = Datos_Lineas.DataSource as Csla.SortedBindingList <ExpenseInfo>;
            ExpenseList list = ExpenseList.GetList(gastos);

            if (gastos != null)
            {
                list.UpdatePagoValues(_entity);
            }
            Datos_Lineas.DataSource = list.GetSortedList();
            UpdateAllocated();
        }
Exemplo n.º 4
0
        protected override void RefreshMainData()
        {
            Datos.DataSource = _entity;
            PgMng.Grow();

            Datos_Lineas.DataSource = ExpenseList.GetSortedList(_expenses, "PrevisionPago", ListSortDirection.Ascending);
            PgMng.Grow();

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

            base.RefreshMainData();
        }