public bool bPesquisaConcessoes(PERMISSOES enumPermissoes, CONCESSOES enumConcessoes, int nIdEspecifico, string strEspecifico) { bool bRetorno = false; try { mdlDataBaseAccess.Tabelas.XsdTbUsuariosPermissoesConcessoes.tbUsuariosPermissoesConcessoesRow dtrwTbUsuariosPermissoesConcessoes; if (m_typDatSetTbUsuariosPermissoesConcessoes == null) { carregaTypDatSet(); } if (enumConcessoes != m_enumConcessoes) { m_enumConcessoes = enumConcessoes; } if (enumPermissoes != m_enumPermissoes) { m_enumPermissoes = enumPermissoes; } dtrwTbUsuariosPermissoesConcessoes = m_typDatSetTbUsuariosPermissoesConcessoes.tbUsuariosPermissoesConcessoes.FindBynIdUsuarionIdPermissaonIdConcessaonIdEspecifico(m_nIdUsuario, (int)m_enumPermissoes, (int)m_enumConcessoes, nIdEspecifico); if ((dtrwTbUsuariosPermissoesConcessoes != null) && (dtrwTbUsuariosPermissoesConcessoes.strEspecifico == strEspecifico)) { bRetorno = true; } } catch { } return(bRetorno); }
public string[] arrStrPesquisaConcessoes(PERMISSOES enumPermissoes, CONCESSOES enumConcessoes) { string[] arrayIntRetorno = new string[0]; try { System.Data.DataRow[] dtRwRegistrosSelect; System.Collections.ArrayList arlValoresEspecificos = new System.Collections.ArrayList(); mdlDataBaseAccess.Tabelas.XsdTbUsuariosPermissoesConcessoes.tbUsuariosPermissoesConcessoesRow dtrwTbUsuariosPermissoesConcessoes; if (m_typDatSetTbUsuariosPermissoesConcessoes == null) { carregaTypDatSet(); } if (enumConcessoes != m_enumConcessoes) { m_enumConcessoes = enumConcessoes; } if (enumPermissoes != m_enumPermissoes) { m_enumPermissoes = enumPermissoes; } dtRwRegistrosSelect = m_typDatSetTbUsuariosPermissoesConcessoes.tbUsuariosPermissoesConcessoes.Select("nIdConcessao = " + ((int)m_enumConcessoes).ToString()); for (int nCount = 0; nCount < dtRwRegistrosSelect.Length; nCount++) { dtrwTbUsuariosPermissoesConcessoes = (mdlDataBaseAccess.Tabelas.XsdTbUsuariosPermissoesConcessoes.tbUsuariosPermissoesConcessoesRow)dtRwRegistrosSelect[nCount]; if (dtrwTbUsuariosPermissoesConcessoes.nIdPermissao == (int)m_enumPermissoes) { arlValoresEspecificos.Add(dtrwTbUsuariosPermissoesConcessoes.strEspecifico); } } arrayIntRetorno = new string[arlValoresEspecificos.Count]; for (int nCount = 0; nCount < arlValoresEspecificos.Count; nCount++) { arrayIntRetorno[nCount] = arlValoresEspecificos[nCount].ToString(); } } catch { } return(arrayIntRetorno); }