本文整理汇总了C#中GISA.Model.GisaDataSetHelper.HoldOpen类的典型用法代码示例。如果您正苦于以下问题:C# GisaDataSetHelper.HoldOpen类的具体用法?C# GisaDataSetHelper.HoldOpen怎么用?C# GisaDataSetHelper.HoldOpen使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GisaDataSetHelper.HoldOpen类属于GISA.Model命名空间,在下文中一共展示了GisaDataSetHelper.HoldOpen类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: GetFRDBaseAsRTF
private string GetFRDBaseAsRTF(GISADataset.FRDBaseRow FRDBaseRow) {
GisaDataSetHelper.ManageDatasetConstraints(false);
StringBuilder Result = new StringBuilder();
var cotas = new List<string>();
GisaDataSetHelper.HoldOpen ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
try
{
string IDFRDbase = FRDBaseRow.ID.ToString();
PesquisaRule.Current.LoadFRDBaseData(GisaDataSetHelper.GetInstance(), IDFRDbase, ho.Connection);
if (FRDBaseRow.NivelRow.IDTipoNivel == TipoNivel.ESTRUTURAL)
DBAbstractDataLayer.DataAccessRules.ControloAutRule.Current.LoadControloAutFromNivel(GisaDataSetHelper.GetInstance(), FRDBaseRow.NivelRow.ID, ho.Connection);
// Obter info sobre cota se for documento ou subdocumento
var idTipoNivelRelacionado = FRDBaseRow.NivelRow.GetRelacaoHierarquicaRowsByNivelRelacaoHierarquica().First().IDTipoNivelRelacionado;
if (idTipoNivelRelacionado == TipoNivelRelacionado.D || idTipoNivelRelacionado == TipoNivelRelacionado.SD)
cotas = PesquisaRule.Current.LoadDocumentoCotas(IDFRDbase, ho.Connection);
// --Identificação--
Result.Append("\\fs36\\b{}Identificação\\b0{}\\fs24\\sb196\\sa48\\par{}\\sb0\\sa0{}");
// Codigo de Referência
Result.Append(GetConditionalText("\\i{}Código de referencia: \\i0{}",
DBAbstractDataLayer.DataAccessRules.NivelRule.Current.GetCodigoOfNivel(FRDBaseRow.NivelRow.ID, ho.Connection)[0].ToString(), "\\par{}"));
}
catch (Exception ex)
{
Trace.WriteLine(ex);
}
finally
{
ho.Dispose();
GisaDataSetHelper.ManageDatasetConstraints(true);
}
// Nivel de descrição (TipoNivel)
Result.Append(GetConditionalText("\\i{}Nível de descrição: \\i0{}", TipoNivelRelacionado.GetTipoNivelRelacionadoDaPrimeiraRelacaoEncontrada(FRDBaseRow.NivelRow).Designacao, "\\par{}"));
// Título
//Result.Append("\\i{}Designação: \\i0{}" + Nivel.GetDesignacao(FRDBaseRow.NivelRow) + "\\par{}");
Result.Append("\\i{}Título: \\i0{}" + Nivel.GetDesignacao(FRDBaseRow.NivelRow) + "\\par{}");
// Datas
if (FRDBaseRow.GetSFRDDatasProducaoRows().Length == 1)
{
string inicioTexto = string.Empty;
if (!FRDBaseRow.GetSFRDDatasProducaoRows()[0].IsInicioTextoNull())
inicioTexto = FRDBaseRow.GetSFRDDatasProducaoRows()[0].InicioTexto + " ";
Result.Append("\\i{}Data(s) de produção: \\i0{}" + inicioTexto + GUIHelper.GUIHelper.FormatDateInterval(FRDBaseRow.GetSFRDDatasProducaoRows()[0]) + "\\par{}");
}
// Agrupador
if (FRDBaseRow.GetSFRDAgrupadorRows().Length == 1)
Result.Append(GetConditionalText("\\i{}Agrupador: \\i0{}", FRDBaseRow.GetSFRDAgrupadorRows()[0].Agrupador, "\\par{}"));
//Dimensão do documento
var dimSup = GisaDataSetHelper.GetInstance().SFRDDimensaoSuporte.Cast<GISADataset.SFRDDimensaoSuporteRow>()
.SingleOrDefault(r => r.IDFRDBase == FRDBaseRow.ID);
if (dimSup != null)
Result.Append(GetConditionalText("\\i{}Dimensão: \\i0{}", dimSup["Nota"] == DBNull.Value ? "" : dimSup.Nota, "\\par{}"));
// Cota do documento na UF
if (cotas.Count > 0)
{
Result.AppendLine("\\i{}Cota: \\i0{}\\par{}");
var cotasStr = new StringBuilder();
cotas.ForEach(c => {
if (cotasStr.Length > 0)
cotasStr.Append("\\b, \\b0");
cotasStr.Append(c);
});
Result.Append(cotasStr);
Result.Append("\\par{}");
}
// --Contexto--
StringBuilder Contexto = new StringBuilder();
if (FRDBaseRow.GetSFRDContextoRows().Length == 1)
{
if (FRDBaseRow.NivelRow.IDTipoNivel != TipoNivel.ESTRUTURAL)
Contexto.Append(GetConditionalText("\\i{}História administrativa: \\i0{}\\par{}", string.Format("{0}", FRDBaseRow.GetSFRDContextoRows()[0]["HistoriaAdministrativa"]), "\\par{}"));
else
{
GISADataset.ControloAutRow caRow = FRDBaseRow.NivelRow.GetNivelControloAutRows()[0].ControloAutRow;
GISADataset.ControloAutDatasExistenciaRow cadeRow = null;
if (caRow.GetControloAutDatasExistenciaRows().Length > 0)
{
cadeRow = caRow.GetControloAutDatasExistenciaRows()[0];
Contexto.Append(GetConditionalText("\\i{}Datas de existência: \\i0{}\\par{}", GUIHelper.GUIHelper.FormatDateInterval(cadeRow), "\\par{}"));
}
Contexto.Append(GetConditionalText("\\i{}História: \\i0{}\\par{}", string.Format("{0}", caRow["DescHistoria"]), "\\par{}"));
Contexto.Append(GetConditionalText("\\i{}Zona geográfica: \\i0{}\\par{}", string.Format("{0}", caRow["DescZonaGeografica"]), "\\par{}"));
Contexto.Append(GetConditionalText("\\i{}Estatuto legal: \\i0{}\\par{}", string.Format("{0}", caRow["DescEstatutoLegal"]), "\\par{}"));
Contexto.Append(GetConditionalText("\\i{}Funções, ocupações e atividades: \\i0{}\\par{}", string.Format("{0}", caRow["DescOcupacoesActividades"]), "\\par{}"));
Contexto.Append(GetConditionalText("\\i{}Enquadramento legal: \\i0{}\\par{}", string.Format("{0}", caRow["DescEnquadramentoLegal"]), "\\par{}"));
Contexto.Append(GetConditionalText("\\i{}Estrutura interna: \\i0{}\\par{}", string.Format("{0}", caRow["DescEstruturaInterna"]), "\\par{}"));
Contexto.Append(GetConditionalText("\\i{}Contexto geral: \\i0{}\\par{}", string.Format("{0}", caRow["DescContextoGeral"]), "\\par{}"));
Contexto.Append(GetConditionalText("\\i{}Outras informações relevantes: \\i0{}\\par{}", string.Format("{0}", caRow["DescOutraInformacaoRelevante"]), "\\par{}"));
}
//.........这里部分代码省略.........
开发者ID:anvpires,项目名称:gisa,代码行数:101,代码来源:SlavePanelPesquisa.cs
示例17: RTFBuilder
private string RTFBuilder(long IDNivel) {
GisaDataSetHelper.ManageDatasetConstraints(false);
GisaDataSetHelper.HoldOpen ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
try
{
string filter = string.Format("IDNivel = {0} ", IDNivel);
PesquisaRule.Current.LoadSelectedData(GisaDataSetHelper.GetInstance(), IDNivel, Convert.ToInt64(TipoFRDBase.FRDOIRecolha), ho.Connection);
DataRow[] frdbaseRows = frdbaseRows = GisaDataSetHelper.GetInstance().FRDBase.Select(filter);
if (frdbaseRows.Length > 0)
return this.GetFRDBaseAsRTF((GISADataset.FRDBaseRow)(frdbaseRows[0]));
return "";
}
catch (Exception ex)
{
Trace.WriteLine(ex);
throw;
}
finally
{
ho.Dispose();
GisaDataSetHelper.ManageDatasetConstraints(true);
}
}
开发者ID:anvpires,项目名称:gisa,代码行数:26,代码来源:SlavePanelPesquisa.cs
示例18: AddDetalhe
private void AddDetalhe(GISADataset.NivelRow nRow, string nCod)
{
if (detalhes[nRow.ID] == null)
{
ArrayList aux = new ArrayList();
GISADataset.SFRDDatasProducaoRow sfrddprow = null;
string ia = null;
string im = null;
string id = null;
string fa = null;
string fm = null;
string fd = null;
if (nRow.GetFRDBaseRows()[0].GetSFRDDatasProducaoRows().Length > 0)
{
sfrddprow = (GISADataset.SFRDDatasProducaoRow)(nRow.GetFRDBaseRows()[0].GetSFRDDatasProducaoRows()[0]);
if (sfrddprow.IsInicioAnoNull())
ia = "";
else
ia = sfrddprow.InicioAno;
if (sfrddprow.IsInicioMesNull())
im = "";
else
im = sfrddprow.InicioMes;
if (sfrddprow.IsInicioDiaNull())
id = "";
else
id = sfrddprow.InicioDia;
if (sfrddprow.IsFimAnoNull())
fa = "";
else
fa = sfrddprow.FimAno;
if (sfrddprow.IsFimMesNull())
fm = "";
else
fm = sfrddprow.FimMes;
if (sfrddprow.IsFimDiaNull())
fd = "";
else
fd = sfrddprow.FimDia;
}
else
{
ia = "";
im = "";
id = "";
fa = "";
fm = "";
fd = "";
}
GisaDataSetHelper.HoldOpen ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
try
{
if (nRow.IDTipoNivel == 3)
aux.Add(nRow.GetNivelDesignadoRows()[0].Designacao);
else
{
DBAbstractDataLayer.DataAccessRules.NivelRule.Current.FillNivelControloAutRows(GisaDataSetHelper.GetInstance(), nRow.ID, ho.Connection);
if (nRow.GetNivelControloAutRows().Length > 0)
aux.Add(nRow.GetNivelControloAutRows()[0].ControloAutRow.GetControloAutDicionarioRows()[0].DicionarioRow.Termo);
else if (nRow.GetNivelDesignadoRows().Length > 0)
aux.Add(nRow.GetNivelDesignadoRows()[0].Designacao);
}
aux.Add(nRow.GetRelacaoHierarquicaRowsByNivelRelacaoHierarquica()[0].TipoNivelRelacionadoRow.ID);
aux.Add(ia);
aux.Add(im);
aux.Add(id);
aux.Add(fa);
aux.Add(fm);
aux.Add(fd);
aux.Add(nCod);
aux.Add("1"); // Se aparece aqui é porque temos permissao...
if (MovimentoRule.Current.estaRequisitado(nRow.ID, ho.Connection))
aux.Add(true);
else
aux.Add(false);
}
catch (Exception ex)
{
Trace.WriteLine(ex);
throw;
}
finally
{
ho.Dispose();
}
detalhes.Add(nRow.ID, aux);
}
}
开发者ID:aureliopires,项目名称:gisa,代码行数:100,代码来源:PanelUFUnidadesDescricao.cs
示例19: ShowSelection
private void ShowSelection(MasterPanelPesquisa MasterPanel)
{
ToolBar_ButtonClick(this, new ToolBarButtonClickEventArgs(ToolBarButton2));
GISADataset.RelacaoHierarquicaRow rhRow = null;
var ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
try
{
if (MasterPanel.cnList.SelectedRelacaoHierarquica != null)
{
rhRow = MasterPanel.cnList.SelectedRelacaoHierarquica;
if (TipoNivelRelacionado.GetTipoNivelRelacionadoFromRelacaoHierarquica(rhRow).IDTipoNivel != TipoNivel.DOCUMENTAL)
return;
PesquisaRule.Current.LoadSelectedData(GisaDataSetHelper.GetInstance(), rhRow.ID, Convert.ToInt64(TipoFRDBase.FRDOIRecolha), ho.Connection);
}
// se não existir um nó selecionado para o nivel do nó selecionado ignora-se a chamada a este metodo
if (rhRow == null)
return;
try
{
// este teste relevou-se necessário para algumas sequencias de acções faziam o TopLevelControl ser null quando chegavamos a este ponto
if (TopLevelControl != null)
((frmMain)TopLevelControl).EnterWaitMode();
this.lblFuncao.Text = string.Format("selecionado {0}", rhRow.TipoNivelRelacionadoRow.Designacao);
this.lblFuncao.Update();
}
catch (Exception Ex)
{
Trace.WriteLine(Ex);
}
finally
{
if (TopLevelControl != null)
((frmMain)TopLevelControl).LeaveWaitMode();
}
}
catch (Exception ex)
{
Trace.WriteLine(ex);
throw;
}
finally
{
ho.Dispose();
}
}
开发者ID:anvpires,项目名称:gisa,代码行数:51,代码来源:SlavePanelPesquisa.cs
示例20: ExecuteQuery
private void ExecuteQuery(MasterPanelPesquisa MasterPanel)
{
ToolBar_ButtonClick(this, new ToolBarButtonClickEventArgs(ToolBarButton2));
try
{
((frmMain)TopLevelControl).EnterWaitMode();
this.lblFuncao.Text = string.Format("Resultados da pesquisa (em curso)");
this.lblFuncao.Update();
GisaDataSetHelper.HoldOpen ho = new GisaDataSetHelper.HoldOpen(GisaDataSetHelper.GetConnection());
try
{
resultNumber = 0;
bool ShowResults = true;
long calc = DateTime.Now.Ticks;
try
{
long user = SessionHelper.GetGisaPrincipal().TrusteeUserOperator.ID;
resultNumber = ExecuteSearch(ho.Connection);
}
catch (Exception ex)
{
MessageBox.Show("Não foi possível completar a pesquisa solicitada. " + Environment.NewLine + "Erro: " + ex.Message, "Determinação dos resultados de pesquisa", MessageBoxButtons.OK, MessageBoxIcon.Warning);
ShowResults = false;
Debug.WriteLine(ex);
throw;
}
Debug.WriteLine("<<cálculo da pesquisa>>: " + new TimeSpan(DateTime.Now.Ticks - calc).ToString());
if (ShowResults)
{
Trace.WriteLine(string.Format("Found {0} results from search server.", resultNumber));
calc = DateTime.Now.Ticks;
PesquisaList1.ReloadList();
PesquisaList1.NewSearch = false;
resultNumber = PesquisaList1.NrResults;
Trace.WriteLine(string.Format("{0} results after filter permissions and expired docs.", resultNumber));
Debug.WriteLine("<<Popular resultados da pesquisa>>: " + new TimeSpan(DateTime.Now.Ticks - calc).ToString());
this.lblFuncao.Text = string.Format("Resultados da pesquisa ({0} {1})", resultNumber, ((resultNumber == 1) ? "descrição" : "descrições"));
}
else
{
resultNumber = 0;
this.lblFuncao.Text = string.Format("Resultados da pesquisa");
}
}
catch (Exception ex)
{
Trace.WriteLine(ex);
this.lblFuncao.Text = string.Format("Resultados da pesquisa");
}
finally
{
ho.Dispose();
}
}
catch (Exception Ex)
{
Trace.WriteLine(Ex);
this.lblFuncao.Text = string.Format("Resultados da pesquisa");
}
finally
{
((frmMain)TopLevelControl).LeaveWaitMode();
}
}
开发者ID:anvpires,项目名称:gisa,代码行数:73,代码来源:SlavePanelPesquisa.cs
注:本文中的GISA.Model.GisaDataSetHelper.HoldOpen类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论