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 OpenEditForm()
        {
            moleQule.Store.Structs.ETipoExpediente tipo = ActiveItem == null ? _tipo_expediente : ActiveItem.ETipoExpediente;

            switch (tipo)
            {
            case moleQule.Store.Structs.ETipoExpediente.Almacen:
            {
                ExpedienteAlmacenEditForm form = new ExpedienteAlmacenEditForm(ActiveOID, this);
                if (form.Entity != null)
                {
                    AddForm(form);
                    _entity = form.Entity;
                }
            }
            break;

            case moleQule.Store.Structs.ETipoExpediente.Alimentacion:
            case moleQule.Store.Structs.ETipoExpediente.Ganado:
            case moleQule.Store.Structs.ETipoExpediente.Maquinaria:
            {
                ContenedorEditForm form = new ContenedorEditForm(ActiveOID, tipo, this);
                AddForm(form);
                _entity = form.Entity;
            }
            break;

            case moleQule.Store.Structs.ETipoExpediente.Project:
            {
                ProjectEditForm form = new ProjectEditForm(ActiveOID, this);
                if (form.Entity != null)
                {
                    AddForm(form);
                    _entity = form.Entity;
                }
            }
            break;

            case moleQule.Store.Structs.ETipoExpediente.Work:
            {
                WorkEditForm form = new WorkEditForm(ActiveOID, this);
                if (form.Entity != null)
                {
                    AddForm(form);
                    _entity = form.Entity;
                }
            }
            break;
            }
        }