private static string PasajeroAeronaveRoleAddSql(ONSqlSelect onSql, JoinType joinType, string facet, ONPath onPath, ONPath processedPath, string role, bool force, bool isLinkedTo) { ONPath lOnPath = new ONPath(processedPath); lOnPath += role; //Source table string lAliasProcessed = onSql.GetAlias("Aeronave", processedPath, isLinkedTo); if (lAliasProcessed == "") { force = false; lAliasProcessed = onSql.CreateAlias(joinType, lAliasProcessed, CtesBD.TBL_AERONAVE, processedPath, "Aeronave", force, isLinkedTo); } //Target table string lAlias = onSql.GetAlias("PasajeroAeronave", lOnPath, isLinkedTo); if (lAlias == "") { force = false; lAlias = onSql.CreateAlias(joinType, lAliasProcessed, CtesBD.TBL_PASAJEROAERONAVE, lOnPath, "PasajeroAeronave", force, isLinkedTo); onSql.AddAliasWhere(lAlias, lAliasProcessed + "." + CtesBD.FLD_AERONAVE_ID_AERONAVE + "=" + lAlias + "." + CtesBD.FLD_PASAJEROAERONAVE_FK_AERONAVE_1); } //Target path if ((((object)onPath == null) || (onPath.Count == 0)) && (string.Compare("PasajeroAeronave", facet, true) == 0) && (!force)) { return(lAlias); } return(PasajeroAeronaveData.AddPath(onSql, joinType, facet, onPath, lOnPath, "", force, isLinkedTo)); }
private static string AeronaveFacetAddSql(JoinType joinType, ONSqlSelect onSql, ONPath onPath, bool force, bool isLinkedTo) { //Target table string lAliasFacet = ""; string lAlias = onSql.CreateAlias(joinType, "", CtesBD.TBL_AERONAVE, onPath, "Aeronave", false, isLinkedTo); // Load facet from 'Aeronave' to 'Aeronave' lAliasFacet = onSql.GetAlias("Aeronave", onPath, isLinkedTo); if ((lAliasFacet == "") || force) { if (force) { lAliasFacet = onSql.CreateAlias(joinType, "", CtesBD.TBL_AERONAVE, onPath, "Aeronave", force, isLinkedTo); } else { lAliasFacet = onSql.CreateAlias(joinType, lAlias, CtesBD.TBL_AERONAVE, onPath, "Aeronave", force, isLinkedTo); } onSql.AddAliasWhere(lAliasFacet, lAlias + "." + CtesBD.FLD_AERONAVE_ID_AERONAVE + " = " + lAliasFacet + "." + CtesBD.FLD_AERONAVE_ID_AERONAVE); } return(lAliasFacet); }
private static string NaveNodrizaFacetAddSql(JoinType joinType, ONSqlSelect onSql, ONPath onPath, bool force, bool isLinkedTo) { //Target table string lAliasFacet = ""; string lAlias = onSql.CreateAlias(joinType, "", CtesBD.TBL_NAVENODRIZA, onPath, "NaveNodriza", false, isLinkedTo); // Load facet from 'NaveNodriza' to 'NaveNodriza' lAliasFacet = onSql.GetAlias("NaveNodriza", onPath, isLinkedTo); if ((lAliasFacet == "") || force) { if (force) { lAliasFacet = onSql.CreateAlias(joinType, "", CtesBD.TBL_NAVENODRIZA, onPath, "NaveNodriza", force, isLinkedTo); } else { lAliasFacet = onSql.CreateAlias(joinType, lAlias, CtesBD.TBL_NAVENODRIZA, onPath, "NaveNodriza", force, isLinkedTo); } onSql.AddAliasWhere(lAliasFacet, lAlias + "." + CtesBD.FLD_NAVENODRIZA_ID_NAVENODRIZA + " = " + lAliasFacet + "." + CtesBD.FLD_NAVENODRIZA_ID_NAVENODRIZA); } return(lAliasFacet); }
private static string AdministradorFacetAddSql(JoinType joinType, ONSqlSelect onSql, ONPath onPath, bool force, bool isLinkedTo) { //Target table string lAliasFacet = ""; string lAlias = onSql.CreateAlias(joinType, "", CtesBD.TBL_ADMINISTRADOR, onPath, "Administrador", false, isLinkedTo); // Load facet from 'Administrador' to 'Administrador' lAliasFacet = onSql.GetAlias("Administrador", onPath, isLinkedTo); if ((lAliasFacet == "") || force) { if (force) { lAliasFacet = onSql.CreateAlias(joinType, "", CtesBD.TBL_ADMINISTRADOR, onPath, "Administrador", force, isLinkedTo); } else { lAliasFacet = onSql.CreateAlias(joinType, lAlias, CtesBD.TBL_ADMINISTRADOR, onPath, "Administrador", force, isLinkedTo); } onSql.AddAliasWhere(lAliasFacet, lAlias + "." + CtesBD.FLD_ADMINISTRADOR_ID_ADMINISTRADOR + " = " + lAliasFacet + "." + CtesBD.FLD_ADMINISTRADOR_ID_ADMINISTRADOR); } return(lAliasFacet); }
private static string PasajeroFacetAddSql(JoinType joinType, ONSqlSelect onSql, ONPath onPath, bool force, bool isLinkedTo) { //Target table string lAliasFacet = ""; string lAlias = onSql.CreateAlias(joinType, "", CtesBD.TBL_PASAJERO, onPath, "Pasajero", false, isLinkedTo); // Load facet from 'Pasajero' to 'Pasajero' lAliasFacet = onSql.GetAlias("Pasajero", onPath, isLinkedTo); if ((lAliasFacet == "") || force) { if (force) { lAliasFacet = onSql.CreateAlias(joinType, "", CtesBD.TBL_PASAJERO, onPath, "Pasajero", force, isLinkedTo); } else { lAliasFacet = onSql.CreateAlias(joinType, lAlias, CtesBD.TBL_PASAJERO, onPath, "Pasajero", force, isLinkedTo); } onSql.AddAliasWhere(lAliasFacet, lAlias + "." + CtesBD.FLD_PASAJERO_ID_PASAJERO + " = " + lAliasFacet + "." + CtesBD.FLD_PASAJERO_ID_PASAJERO); } return(lAliasFacet); }