public override void OpenEditForm()
        {
            ContenedorEditForm form = new ContenedorEditForm(ActiveItem.OidExpediente, this);

            if (form.Entity != null)
            {
                AddForm(form);
                _entity = form.Entity.ExpedientesREA.GetItem(ActiveItem.Oid);
            }
        }
        public override void UpdateList()
        {
            switch (_current_action)
            {
            case molAction.Add:
                if (_entity == null)
                {
                    return;
                }
                List.AddItem(_entity.GetInfo(false));
                if (FilterType == IFilterType.Filter)
                {
                    ExpedienteREAList listA = ExpedienteREAList.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)
                {
                    ExpedienteREAList listD = ExpedienteREAList.GetList(_filter_results);
                    listD.RemoveItem(ActiveOID);
                    _filter_results = listD.GetSortedList();
                }
                break;
            }

            RefreshSources();
            if (_entity != null)
            {
                Select(_entity.Oid);
            }
            _entity = null;
        }
        public static CobroREA NewChild(REAExpedient parent)
        {
            if (!CanAddObject())
            {
                throw new System.Security.SecurityException(Library.Resources.Messages.USER_NOT_ALLOWED);
            }

            CobroREA obj = new CobroREA();

            obj.OidExpedienteREA = parent.Oid;
            obj.OidExpediente    = parent.OidExpediente;

            return(obj);
        }
        protected override void SetExpedienteREAFormat()
        {
            foreach (DataGridViewRow row in ExpedienteREA_DGW.Rows)
            {
                if (row.IsNewRow)
                {
                    return;
                }

                REAExpedient item = (REAExpedient)row.DataBoundItem;
                Face.Common.ControlTools.Instance.SetRowColor(row, item.EEstado);

                SetRowFormat(row, "FechaDespachoREA", item.Fecha);
                SetRowFormat(row, "FechaCobroRea", item.FechaCobro);
            }
        }
 public CobroREA NewItem(REAExpedient parent)
 {
     this.AddItem(CobroREA.NewChild(parent));
     return(this[Count - 1]);
 }
        protected void ChangeEstadoExpedienteREA(DataGridViewRow row, moleQule.Base.EEstado estado)
        {
            REAExpedient item = row.DataBoundItem as REAExpedient;

            item.EEstado = estado;
        }