示例#1
0
        protected override void SetRowFormat(DataGridViewRow row)
        {
            if (row.IsNewRow)
            {
                return;
            }

            OutputInvoiceLineInfo item = row.DataBoundItem as OutputInvoiceLineInfo;

            //Face.Common.ControlTools.Instance.SetRowColor(row, item.EEstado);
        }
示例#2
0
        protected virtual void ViewConceptoFacturaEAction()
        {
            if (!ControlsMng.IsCurrentItemValid(ConceptosE_DGW))
            {
                return;
            }

            OutputInvoiceLineInfo line = ControlsMng.GetCurrentItem(ConceptosE_DGW) as OutputInvoiceLineInfo;

            InvoiceViewForm form = new InvoiceViewForm(line.OidFactura, this);

            form.ShowDialog(this);
        }
示例#3
0
        public override void UpdateList()
        {
            switch (_current_action)
            {
            case molAction.Add:
                if (_entity == null)
                {
                    return;
                }
                if (List.GetItem(_entity.Oid) != null)
                {
                    return;
                }
                List.AddItem(_entity.GetInfo(false));
                if (FilterType == IFilterType.Filter)
                {
                    OutputInvoiceLineList listA = OutputInvoiceLineList.GetList(_filter_results);
                    listA.AddItem(_entity.GetInfo(false));
                    _filter_results = listA.GetSortedList();
                }
                break;

            case molAction.CustomAction1:
            case molAction.CustomAction2:
            case molAction.Edit:
            case molAction.Lock:
            case molAction.Unlock:

                if (_selected != null)
                {
                    List <OutputInvoiceLineInfo> entities = (List <OutputInvoiceLineInfo>)_selected;
                    foreach (OutputInvoiceLineInfo item in entities)
                    {
                        List.GetItem(item.Oid).CopyFrom(item);
                        if (FilterType == IFilterType.Filter)
                        {
                            OutputInvoiceLineList list   = OutputInvoiceLineList.GetList(_filter_results);
                            OutputInvoiceLineInfo entity = list.GetItem(item.Oid);
                            if (entity != null)
                            {
                                entity.CopyFrom(item);
                            }
                            _filter_results = list.GetSortedList();
                        }
                    }
                }

                if (_entity == null)
                {
                    return;
                }
                ActiveItem.CopyFrom(_entity);

                break;

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

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