Ejemplo n.º 1
0
        public override void LoadData(DataRow CurrentDataRow, IDbConnection conn)
        {
            IsLoaded       = false;
            CurrentFRDBase = (GISADataset.FRDBaseRow)CurrentDataRow;

            try
            {
                GisaPrincipalPermission gpp = new GisaPrincipalPermission(SessionHelper.GetGisaPrincipal(), "GISA.SlavePanelFedora", GisaPrincipalPermission.READ);
                gpp.Demand();
            }
            catch (System.Security.SecurityException)
            {
                IsReadOnlyMode = true;
            }

            splitContainerOdsReadOnly.Visible = IsReadOnlyMode;
            controlObjetoDigital1.Visible     = !IsReadOnlyMode;

            if (IsReadOnlyMode)
            {
                if (SessionHelper.AppConfiguration.GetCurrentAppconfiguration().IsFedoraEnable())
                {
                    var rhRow = CurrentFRDBase.NivelRow.GetRelacaoHierarquicaRowsByNivelRelacaoHierarquica().First();
                    FedoraRule.Current.LoadObjDigitalData(GisaDataSetHelper.GetInstance(), CurrentFRDBase.IDNivel, rhRow.IDTipoNivelRelacionado, conn);
                }
            }
            else
            {
                odHelper.currentNivel = CurrentFRDBase.NivelRow;
                odHelper.LoadData();
            }

            IsLoaded = true;
        }
Ejemplo n.º 2
0
        public override void LoadData()
        {
            if (CurrentContext.FedoraNivel == null)
            {
                odHelper.currentNivel = null;
                return;
            }

            odHelper.currentNivel = CurrentContext.FedoraNivel;
            odHelper.LoadData();

            if (odHelper.currentODComp != null)
            {
                CurrentContext.ObjetoDigital = odHelper.currentODComp;
            }
            else
            {
                CurrentContext.ObjetoDigital = odHelper.currentODSimples.Count == 1 ? odHelper.currentODSimples[0] : null;
            }
        }