当前位置: 首页>>代码示例>>C#>>正文


C# GisaDataSetHelper.HoldOpen类代码示例

本文整理汇总了C#中GISA.Model.GisaDataSetHelper.HoldOpen的典型用法代码示例。如果您正苦于以下问题:C# GisaDataSetHelper.HoldOpen类的具体用法?C# GisaDataSetHelper.HoldOpen怎么用?C# GisaDataSetHelper.HoldOpen使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GisaDataSetHelper.HoldOpen类属于GISA.Model命名空间,在下文中一共展示了GisaDataSetHelper.HoldOpen类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: comprovativoToolMenuItem_Click

        private void comprovativoToolMenuItem_Click(object sender, EventArgs e)
        {
            GISADataset.MovimentoRow movRow = (GISADataset.MovimentoRow)this.movList.SelectedItems[0].Tag;

            List<MovimentoRule.DocumentoMovimentado> documents = new List<MovimentoRule.DocumentoMovimentado>();
            GisaDataSetHelper.HoldOpen ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
            try
            {
                documents = MovimentoRule.Current.GetDocumentos(movRow.ID, GisaDataSetHelper.GetInstance(), ho.Connection);
            }
            catch (Exception ex)
            {
                Trace.WriteLine(ex);
                throw;
            }
            finally
            {
                ho.Dispose();
            }

            Reports.Movimentos.RelatorioMovimento report = new Reports.Movimentos.RelatorioMovimento(movRow, documents,
                string.Format("Requisicao_{0}", movRow.ID), SessionHelper.GetGisaPrincipal().TrusteeUserOperator.ID);
            
            object o = new Reports.BackgroundRunner(TopLevelControl, report, 1);
        }        
开发者ID:aureliopires,项目名称:gisa,代码行数:25,代码来源:MasterPanelRequisicoes.cs

示例2: btnNavegar_Click

        private void btnNavegar_Click(object sender, EventArgs e)
        {
            currentState = currentState == State.filter ? State.navigation : State.filter;
            this.grpNavegacao.Visible = currentState == State.navigation;
            this.controloAutList1.Visible = currentState == State.filter;
            this.btnNavegar.ImageIndex = currentState == State.filter ? 0 : 1;
            this.btnNavegar.Text = currentState == State.filter ? "Tesauro" : "Voltar";
            this.toolTip1.SetToolTip(this.btnNavegar, currentState == State.filter ? SharedResourcesOld.CurrentSharedResources.NavThesaurusStrings[0] : SharedResourcesOld.CurrentSharedResources.NavThesaurusStrings[1]);

            if (currentState == State.navigation)
            {
                var cadRow = this.controloAutList1.SelectedItems[0].Tag as GISADataset.ControloAutDicionarioRow;

                GisaDataSetHelper.HoldOpen ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
                try
                {
                    this.controlTermosIndexacao1.trVwTermoIndexacao.Nodes.Clear();
                    this.controlTermosIndexacao1.LoadData(cadRow.ControloAutRow, ho.Connection);
                }
                catch (Exception)
                {
                    throw;
                }
                finally
                {
                    ho.Dispose();
                }
            }
        }
开发者ID:aureliopires,项目名称:gisa,代码行数:29,代码来源:FormThesaurusNavigator.cs

示例3: LoadData

        public override void LoadData()
        {
            if (CurrentContext.Movimento == null)
            {
                CurrentMovimento = null;
                return;
            }

            CurrentMovimento = CurrentContext.Movimento;

            GisaDataSetHelper.HoldOpen ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetTempConnection());
            try
            {
                documentos = MovimentoRule.Current.GetDocumentos(CurrentMovimento.ID, GisaDataSetHelper.GetInstance(), ho.Connection);
            }
            catch (Exception ex)
            {
                Trace.WriteLine(ex);
                throw;
            }
            finally
            {
                ho.Dispose();
            }
        }
开发者ID:aureliopires,项目名称:gisa,代码行数:25,代码来源:SlavePanelMovimentos.cs

示例4: UpdateTrustees

        protected override void UpdateTrustees(GISADataset.TrusteeRow tRow)
        {
            GisaDataSetHelper.HoldOpen ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
            try
            {
                TrusteeRule.Current.LoadTrusteesUsr(GisaDataSetHelper.GetInstance(), ho.Connection);
            }
            catch (Exception ex)
            {
                Trace.WriteLine(ex);
                throw;
            }
            finally
            {
                ho.Dispose();
            }

            lstVwTrustees.Items.Clear();
            ListViewItem item = null;
            ListViewItem selItem = null;
            foreach (var t in GisaDataSetHelper.GetInstance().Trustee.Cast<GISADataset.TrusteeRow>().ToList())
            {
#if TESTING
               
                item = lstVwTrustees.Items.Add("");
                if (t == tRow)
                {
                    selItem = item;
                }
                UpdateListViewItem(item, t);
                if (t.BuiltInTrustee)
                {
                    item.ForeColor = System.Drawing.Color.Gray;
                }
#else
				if (! t.BuiltInTrustee && t.IsVisibleObject)
				{
					item = lstVwTrustees.Items.Add("");
					if (t == tRow)
					{
						selItem = item;
					}
					UpdateListViewItem(item, t);
				}
#endif
            }
            lstVwTrustees.Sort();
            if (selItem != null)
            {
                lstVwTrustees.EnsureVisible(selItem.Index);
                lstVwTrustees.selectItem(selItem);
            }
        }
开发者ID:aureliopires,项目名称:gisa,代码行数:53,代码来源:MasterPanelPermissoesDesposito.cs

示例5: LoadData

        public override void LoadData()
        {
            try
            {
                ((frmMain)TopLevelControl).EnterWaitMode();
                GisaDataSetHelper.HoldOpen ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
                try
                {
                    GisaDataSetHelper.ManageDatasetConstraints(false);

                    if (!isLoaded)
                    {
                        if (CurrentContext.Deposito == null) return;

                        // Recarregar a uf actual e guardar um contexto localmente
                        DepositoRule.Current.LoadDepositoData(GisaDataSetHelper.GetInstance(), CurrentContext.Deposito.ID, ho.Connection);
                        CurrentDeposito = GisaDataSetHelper.GetInstance().Deposito.Cast<GISADataset.DepositoRow>().SingleOrDefault(d => d.ID == CurrentContext.Deposito.ID);

                        if (CurrentDeposito == null || CurrentDeposito.RowState == DataRowState.Detached || 
                            CurrentContext.Deposito == null || CurrentContext.Deposito.RowState == DataRowState.Detached) return;
                        
                        isLoaded = true;
                    }
                    GisaDataSetHelper.ManageDatasetConstraints(false);
                    GISAPanel selectedPanel = (GISAPanel)this.DropDownTreeView1.SelectedNode.Tag;
                    if (!selectedPanel.IsLoaded)
                    {
                        long startTicks = 0;
                        startTicks = DateTime.Now.Ticks;
                        selectedPanel.LoadData(CurrentDeposito, ho.Connection);
                        Debug.WriteLine("Time dispend loading " + selectedPanel.ToString() + ": " + new TimeSpan(DateTime.Now.Ticks - startTicks).ToString());
                    }
                    GisaDataSetHelper.ManageDatasetConstraints(true);
                }
                catch (System.Data.ConstraintException Ex)
                {
                    Trace.WriteLine(Ex);
                    GisaDataSetHelper.FixDataSet(GisaDataSetHelper.GetInstance(), ho.Connection);
                }
                finally
                {
                    ho.Dispose();
                }
            }
            finally
            {
                ((frmMain)TopLevelControl).LeaveWaitMode();
            }
        }
开发者ID:aureliopires,项目名称:gisa,代码行数:49,代码来源:FRDDepositos.cs

示例6: validate_generated_ead

 [Test] public void validate_generated_ead() {
     GisaDataSetHelper.HoldOpen ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
     try {
         string fileName = "GISA_EAD_Test.xml";
         EADGenerator gen_to_test = new EADGenerator(fileName, ho.Connection);
         long IDNivel_PAI = 214;
         long idNivel = 215;
         gen_to_test.generate(IDNivel_PAI, idNivel);
         validate(fileName);
         Assert.IsTrue(isValid);
     }
     finally {
         ho.Dispose();
     }
 }
开发者ID:aureliopires,项目名称:gisa,代码行数:15,代码来源:EADGen_Test.cs

示例7: GetRelatedControloAut

        public static List<CAAssociado> GetRelatedControloAut(List<GISADataset.ControloAutDicionarioRow> cadRows)
        {
            var res = new List<CAAssociado>();
            var ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
            try
            {
                var start = DateTime.Now.Ticks;
                res = DiplomaModeloRule.Current.GetCANiveisAssociados(cadRows.Select(r => r.IDControloAut).ToList(), ho.Connection);
                Trace.WriteLine("<<LoadNivelDesignadoOfSelfAndParent>>: " + new TimeSpan(DateTime.Now.Ticks - start).ToString());
            }
            catch (Exception ex) { Debug.WriteLine(ex); throw ex; }
            finally { ho.Dispose(); }

            return res;
        }
开发者ID:aureliopires,项目名称:gisa,代码行数:15,代码来源:ControloAutHelper.cs

示例8: LoadNivel

        private void LoadNivel(long idNivel)
        {
            GisaDataSetHelper.HoldOpen ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
			try{
                DBAbstractDataLayer.DataAccessRules.NivelRule.Current.LoadNivelParents(idNivel, GisaDataSetHelper.GetInstance(), ho.Connection);
            }
            catch (Exception ex)
            {
                Trace.WriteLine(ex);
                throw;
            }
            finally
            {
                ho.Dispose();
            }
        }
开发者ID:aureliopires,项目名称:gisa,代码行数:16,代码来源:PanelInfoEPs.cs

示例9: Display_MetrosLineares

        /*
         * Refresh do painel de apresentacao das metricas de espaco + pieChart
         */
        private void Display_MetrosLineares() {
            AutoEliminacaoRule.Info_UFs_Larguras ufs = new AutoEliminacaoRule.Info_UFs_Larguras();

            // Metros lineares totais:
            double Metros_lineares_totais = 0.0;
            this.globalConfigRow = (GISADataset.GlobalConfigRow)(GisaDataSetHelper.GetInstance().GlobalConfig.Rows[0]);
            if (this.globalConfigRow.IsMetrosLinearesTotaisNull())
                this.txt_metrosLinearesTotais.Text = "";
            else {
                Metros_lineares_totais = (double)this.globalConfigRow.MetrosLinearesTotais;
                this.txt_metrosLinearesTotais.Text = Metros_lineares_totais.ToString();
            }

            // Metros lineares ocupados:
            double Metros_lineares_ocupados = 0.0;
            GisaDataSetHelper.HoldOpen ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
            try {
                // UFS totais:
                ufs = AutoEliminacaoRule.Current.Get_Info_UFs_Larguras(ho.Connection);

                Metros_lineares_ocupados = AutoEliminacaoRule.Current.GetMetrosLinearesOcupados(ho.Connection);
                this.txt_metrosLinearesOcupados.Text = Metros_lineares_ocupados.ToString();
            }
            catch (Exception e) {
                Debug.WriteLine(e);
                throw;
            }
            finally { ho.Dispose(); }

            // Metros lineares livres:
            double Metros_lineares_livres = Metros_lineares_totais - Metros_lineares_ocupados;
            this.txt_metrosLinearesLivres.Text = Metros_lineares_livres.ToString();
            this.lblLivres.ForeColor = (Metros_lineares_livres <= 0.0 ? Color.Red : Color.Black);

            // Estimativa de ocupacao para ufs sem largura:
            double Metros_ocupados_estimados = ufs.Media_largura * ufs.TotalUFs_semLargura;
            if (Metros_lineares_livres > 0 && Metros_lineares_ocupados > 0)
                CreateChart(this.zedGraphPieChartControl, Metros_lineares_livres, Metros_lineares_ocupados, Metros_ocupados_estimados);
            else
                CreateEmptyChart(this.zedGraphPieChartControl);

            // UFs totais:
            this.txt_UFsTotais.Text = ufs.TotalUFs.ToString();
            this.txt_UFsSemLargura.Text = ufs.TotalUFs_semLargura.ToString();
        }
开发者ID:aureliopires,项目名称:gisa,代码行数:48,代码来源:MasterPanelDepositos.cs

示例10: LoadData

 public override void LoadData()
 {
     GisaDataSetHelper.HoldOpen ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
     try
     {
         NivelRule.Current.LoadImagemIlustracao(CurrentContext.GrupoArquivo.ID, GisaDataSetHelper.GetInstance(), ho.Connection);
         currentGARow = CurrentContext.GrupoArquivo;
     }
     catch (Exception ex)
     {
         Trace.WriteLine(ex);
         throw;
     }
     finally
     {
         ho.Dispose();
     }
 }
开发者ID:aureliopires,项目名称:gisa,代码行数:18,代码来源:SlavePanelNivelImagensIlustracao.cs

示例11: LoadData

 public override void LoadData()
 {
     var ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
     try
     {
         CurrentTrustee = CurrentContext.Trustee;
         if (CurrentTrustee != null)
             DepositoRule.Current.LoadDepositosPermissionsData(GisaDataSetHelper.GetInstance(), CurrentTrustee.ID, ho.Connection);
     }
     catch (Exception)
     {
         CurrentTrustee = null;
         return;
     }
     finally
     {
         ho.Dispose();
     }
 }
开发者ID:aureliopires,项目名称:gisa,代码行数:19,代码来源:SlavePanelPermissoesDesposito.cs

示例12: LoadData

        public void LoadData()
        {
            GisaDataSetHelper.HoldOpen ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
            try
            {
                FedoraRule.Current.LoadTitulos(GisaDataSetHelper.GetInstance(), ho.Connection);
            }
            catch (Exception ex)
            {
                Trace.WriteLine(ex.ToString());
                throw ex;
            }
            finally
            {
                ho.Dispose();
            }

            PopulateList(FilterTitle("",false));
        }
开发者ID:aureliopires,项目名称:gisa,代码行数:19,代码来源:FormPickTítulo.cs

示例13: Main

        public static void Main() {
            GisaDataSetHelper.HoldOpen ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
            try {
                string fileName = "GISA_EAD_Test.xml";
                EADGenerator gen_to_test = new EADGenerator(fileName, ho.Connection);
                //long idNivel = 100317;
                //long idNivel = 1865;
                //long idNivel = 23;

                // GISA_CS7_FEUP:
                //long idNivel = 14;    // Pautas ...
                //long idNivel = 212;     // Secretaria
                //long idNivel = 178;     // Conselho directivo
                //long IDNivel_PAI = 214;
                //long idNivel = 215;     // Direcao de servicos academicos...
                long IDNivel_PAI = 220;     // FEUP
                long idNivel = 222;
                //long IDNivel_PAI = 19;     // FEUP
                //long idNivel = 52416;
                //long idNivel = 219;     // Seccao de pessoal
                //long idNivel = 168;     // (Serie) Comissao cooordenadora...

                //long idNivel = 102027;      // Para imagens:

                // GISA_CS6_CMGaia: 48326; 50600
                //long idNivel = 50066;   // Secretaria
                //long idNivel = 50570;   // Orlando Miranda
                //long idNivel = 46139;       // Presidência. 2002-2008

                gen_to_test.generate(IDNivel_PAI, idNivel);
                validate(fileName);
            }
            finally {
                ho.Dispose();
            }

        }
开发者ID:aureliopires,项目名称:gisa,代码行数:37,代码来源:EADGen_Test.cs

示例14: HasSDocs

        public bool HasSDocs(long IDNivel)
        {
            long numSubDocs = 0;
            GisaDataSetHelper.HoldOpen ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
            try
            {
                numSubDocs = PesquisaRule.Current.CountSubDocumentos(IDNivel, ho.Connection);
            }
            catch (Exception ex)
            {
                Trace.WriteLine(ex);
                throw;
            }
            finally
            {
                ho.Dispose();
            }

            return numSubDocs > 0;
        }
开发者ID:anvpires,项目名称:gisa,代码行数:20,代码来源:SlavePanelPesquisa.cs

示例15: ActivateDetalhesImagem

        private void ActivateDetalhesImagem()
        {
            ClearPreview();

            if (PesquisaList1.GetSelectedRows.Count() == 1)
            {
                ImagemEscolhida = null;
                lstImagens.Items.Clear();
                ClearPreview();
                trvODsFedora.Nodes.Clear();
                lstImagens.Items.Clear();
                lstImagens.DisplayMember = "Descricao";
                //var frdRow = PesquisaList1.SelectedItems[0].Tag as GISADataset.FRDBaseRow;
                var frdRow = PesquisaList1.SelectedRow as GISADataset.FRDBaseRow;
                var rhRow = frdRow.NivelRow.GetRelacaoHierarquicaRowsByNivelRelacaoHierarquica().First();

                GisaDataSetHelper.ManageDatasetConstraints(false);

                GisaDataSetHelper.HoldOpen ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
                try
                {
                    DBAbstractDataLayer.DataAccessRules.PesquisaRule.Current.LoadImagemVolume(GisaDataSetHelper.GetInstance(), frdRow.ID, ho.Connection);
                    DBAbstractDataLayer.DataAccessRules.FedoraRule.Current.LoadObjDigitalData(GisaDataSetHelper.GetInstance(), frdRow.IDNivel, rhRow.IDTipoNivelRelacionado, ho.Connection);
                }
                finally
                {
                    ho.Dispose();
                }

                GisaDataSetHelper.ManageDatasetConstraints(true);

                var isModoPublicadoOnly = MasterPanelPesquisa.cbModulo.SelectedItem.Equals(TranslationHelper.FormatModPesquisaIntToText(ModuloPesquisa.Publicacao));

                // listar imagens que não do tipo Fedora
                lstImagens.Items.AddRange(frdRow.GetSFRDImagemRows().Where(r => !r.Tipo.Equals(FedoraHelper.typeFedora)).OrderBy(r => r.GUIOrder).ToArray());

                // listar imagens do tipo fedora
                var odRows = FedoraHelper.GetObjetosDigitais(frdRow);

                foreach (var odRow in odRows.OrderBy(r => r.GUIOrder))
                {
                    var node = new TreeNode(); ;
                    node.ImageIndex = 3;
                    node.SelectedImageIndex = 3;
                    node.Text = odRow.Titulo;
                    node.Tag = odRow;
                    var odRowsSimples = odRow.GetObjetoDigitalRelacaoHierarquicaRowsByObjetoDigitalObjetoDigitalRelacaoHierarquicaUpper().Select(r => r.ObjetoDigitalRowByObjetoDigitalObjetoDigitalRelacaoHierarquica).ToList();
                    if (odRowsSimples.Count > 0)
                    {
                        foreach (var odRowSimples in odRowsSimples.OrderBy(r => r.GUIOrder))
                        {
                            var perm = PermissoesHelper.CalculateEffectivePermissions(odRowSimples, SessionHelper.GetGisaPrincipal().TrusteeUserOperator.TrusteeRow, frdRow.NivelRow, PermissoesHelper.ObjDigOpREAD.TipoOperationRow);
                            if (perm == PermissoesHelper.PermissionType.ExplicitDeny || perm == PermissoesHelper.PermissionType.ImplicitDeny || (isModoPublicadoOnly && !odRowSimples.Publicado)) continue;

                            var subDocNode = new TreeNode();
                            subDocNode.Text = odRowSimples.Titulo;
                            subDocNode.Tag = odRowSimples;
                            subDocNode.ImageIndex = 3;
                            subDocNode.SelectedImageIndex = 3;

                            node.Nodes.Add(subDocNode);
                        }

                        if (node.Nodes.Count == 0) continue;

                        if (!isModoPublicadoOnly || !odRow.Publicado)
                            node.ForeColor = Color.Gray;

                        node.Expand();
                    }
                    else
                    {
                        var perm = PermissoesHelper.CalculateEffectivePermissions(odRow, SessionHelper.GetGisaPrincipal().TrusteeUserOperator.TrusteeRow, frdRow.NivelRow, PermissoesHelper.ObjDigOpREAD.TipoOperationRow);
                        if (perm == PermissoesHelper.PermissionType.ExplicitDeny || perm == PermissoesHelper.PermissionType.ImplicitDeny || (isModoPublicadoOnly && !odRow.Publicado)) continue;
                    }

                    trvODsFedora.Nodes.Add(node);
                }

                pnlDetalhesImagem.BringToFront();
            }
            else
                ToolBar_ButtonClick(this, new ToolBarButtonClickEventArgs(ToolBarButton2));
        }
开发者ID:anvpires,项目名称:gisa,代码行数:84,代码来源:SlavePanelPesquisa.cs


注:本文中的GISA.Model.GisaDataSetHelper.HoldOpen类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。