示例#1
0
        public static string RetrieveInstances(ONSqlSelect onSql, ONDisplaySet displaySet, ONPath onPath, ONContext onContext)
        {
            string       lAlias    = onSql.CreateAlias(CtesBD.TBL_REVISION, onPath, "Revision");
            ONDisplaySet lSourceDS = null;

            if (displaySet != null)
            {
                lSourceDS = new ONDisplaySet(displaySet);
                displaySet.Clear();
            }
            if (displaySet == null)
            {
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_REVISION_ID_REVISARAERONAVE + ", " + lAlias + "." + CtesBD.FLD_REVISION_ESTADOOBJ + ", " + lAlias + "." + CtesBD.FLD_REVISION_FUM + ", " + lAlias + "." + CtesBD.FLD_REVISION_NOMBREREVISOR + ", " + lAlias + "." + CtesBD.FLD_REVISION_FECHAREVISION + ", " + lAlias + "." + CtesBD.FLD_REVISION_ID_AERONAVE);
            }
            else
            {
                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_REVISION_ID_REVISARAERONAVE));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_REVISION_ID_REVISARAERONAVE);

                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_REVISION_ESTADOOBJ));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_REVISION_ESTADOOBJ);

                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_REVISION_FUM));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_REVISION_FUM);

                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_REVISION_NOMBREREVISOR));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_REVISION_NOMBREREVISOR);

                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_REVISION_FECHAREVISION));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_REVISION_FECHAREVISION);

                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_REVISION_ID_AERONAVE));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_REVISION_ID_AERONAVE);
            }


            // Related attributes
            if (displaySet != null)
            {
                foreach (ONDisplaySetItem lDisplaySetItem in lSourceDS)
                {
                    if ((lDisplaySetItem.Path.IndexOf(".") > 0) && (lDisplaySetItem.InData) && (!lDisplaySetItem.HasHV))
                    {
                        displaySet.Add(lDisplaySetItem);

                        string lPath      = lDisplaySetItem.Path.Substring(0, lDisplaySetItem.Path.LastIndexOf("."));
                        string lFacetName = RevisionInstance.GetTargetClass(onContext, typeof(RevisionInstance), new ONPath(lDisplaySetItem.Path));
                        onSql.AddSelect(AddPath(onSql, JoinType.LeftJoin, lFacetName, new ONPath(lPath), onPath, "", false) + "." + ONInstance.GetFieldNameOfAttribute(typeof(RevisionInstance), new ONPath(lDisplaySetItem.Path)));
                    }
                }
            }
            return(lAlias);
        }
示例#2
0
        public static string RetrieveInstances(ONSqlSelect onSql, ONDisplaySet displaySet, ONPath onPath, ONContext onContext)
        {
            string       lAlias    = onSql.CreateAlias(CtesBD.TBL_PASAJERO, onPath, "Pasajero");
            ONDisplaySet lSourceDS = null;

            if (displaySet != null)
            {
                lSourceDS = new ONDisplaySet(displaySet);
                displaySet.Clear();
            }
            if (displaySet == null)
            {
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_PASAJERO_ID_PASAJERO + ", " + lAlias + "." + CtesBD.FLD_PASAJERO_ESTADOOBJ + ", " + lAlias + "." + CtesBD.FLD_PASAJERO_FUM);
            }
            else
            {
                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_PASAJERO_ID_PASAJERO));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_PASAJERO_ID_PASAJERO);

                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_PASAJERO_ESTADOOBJ));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_PASAJERO_ESTADOOBJ);

                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_PASAJERO_FUM));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_PASAJERO_FUM);

                if (lSourceDS.Contains(CtesBD.FLD_PASAJERO_NOMBRE))
                {
                    displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_PASAJERO_NOMBRE));
                    onSql.AddSelect(lAlias + "." + CtesBD.FLD_PASAJERO_NOMBRE);
                }
            }


            // Related attributes
            if (displaySet != null)
            {
                foreach (ONDisplaySetItem lDisplaySetItem in lSourceDS)
                {
                    if ((lDisplaySetItem.Path.IndexOf(".") > 0) && (lDisplaySetItem.InData) && (!lDisplaySetItem.HasHV))
                    {
                        displaySet.Add(lDisplaySetItem);

                        string lPath      = lDisplaySetItem.Path.Substring(0, lDisplaySetItem.Path.LastIndexOf("."));
                        string lFacetName = PasajeroInstance.GetTargetClass(onContext, typeof(PasajeroInstance), new ONPath(lDisplaySetItem.Path));
                        onSql.AddSelect(AddPath(onSql, JoinType.LeftJoin, lFacetName, new ONPath(lPath), onPath, "", false) + "." + ONInstance.GetFieldNameOfAttribute(typeof(PasajeroInstance), new ONPath(lDisplaySetItem.Path)));
                    }
                }
            }
            return(lAlias);
        }
示例#3
0
        public static string RetrieveInstances(ONSqlSelect onSql, ONDisplaySet displaySet, ONPath onPath, ONContext onContext)
        {
            string lAlias = onSql.CreateAlias(CtesBD.TBL_AERONAVE, onPath, "Aeronave");
            ONDisplaySet lSourceDS = null;
            if(displaySet != null)
            {
                lSourceDS = new ONDisplaySet(displaySet);
                displaySet.Clear();
            }
            if (displaySet == null)
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_AERONAVE_ID_AERONAVE + ", " + lAlias + "." + CtesBD.FLD_AERONAVE_ESTADOOBJ + ", " + lAlias + "." + CtesBD.FLD_AERONAVE_FUM + ", " + lAlias + "." + CtesBD.FLD_AERONAVE_MAXIMOPASAJEROS);
            else
            {
                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_AERONAVE_ID_AERONAVE));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_AERONAVE_ID_AERONAVE);

                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_AERONAVE_ESTADOOBJ));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_AERONAVE_ESTADOOBJ);

                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_AERONAVE_FUM));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_AERONAVE_FUM);

                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_AERONAVE_MAXIMOPASAJEROS));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_AERONAVE_MAXIMOPASAJEROS);

                if (lSourceDS.Contains(CtesBD.FLD_AERONAVE_NOMBRE))
                {
                    displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_AERONAVE_NOMBRE));
                    onSql.AddSelect(lAlias + "." + CtesBD.FLD_AERONAVE_NOMBRE);
                }

                if (lSourceDS.Contains(CtesBD.FLD_AERONAVE_ORIGEN))
                {
                    displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_AERONAVE_ORIGEN));
                    onSql.AddSelect(lAlias + "." + CtesBD.FLD_AERONAVE_ORIGEN);
                }

                if (lSourceDS.Contains(CtesBD.FLD_AERONAVE_DESTINO))
                {
                    displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_AERONAVE_DESTINO));
                    onSql.AddSelect(lAlias + "." + CtesBD.FLD_AERONAVE_DESTINO);
                }

            }

            // Related attributes
            if (displaySet != null)
            {
                foreach (ONDisplaySetItem lDisplaySetItem in lSourceDS)
                {
                    if((lDisplaySetItem.Path.IndexOf(".") > 0) && (lDisplaySetItem.InData) && (! lDisplaySetItem.HasHV))
                    {
                        displaySet.Add(lDisplaySetItem);

                        string lPath = lDisplaySetItem.Path.Substring(0, lDisplaySetItem.Path.LastIndexOf("."));
                        string lFacetName = AeronaveInstance.GetTargetClass(onContext, typeof(AeronaveInstance), new ONPath(lDisplaySetItem.Path));
                        onSql.AddSelect(AddPath(onSql, JoinType.LeftJoin, lFacetName, new ONPath(lPath), onPath, "", false) + "." + ONInstance.GetFieldNameOfAttribute(typeof(AeronaveInstance), new ONPath(lDisplaySetItem.Path)));
                    }
                }
            }
            return (lAlias);
        }
        public static string RetrieveInstances(ONSqlSelect onSql, ONDisplaySet displaySet, ONPath onPath, ONContext onContext)
        {
            string lAlias = onSql.CreateAlias(CtesBD.TBL_NAVENODRIZA, onPath, "NaveNodriza");
            ONDisplaySet lSourceDS = null;
            if(displaySet != null)
            {
                lSourceDS = new ONDisplaySet(displaySet);
                displaySet.Clear();
            }
            if (displaySet == null)
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_NAVENODRIZA_ID_NAVENODRIZA + ", " + lAlias + "." + CtesBD.FLD_NAVENODRIZA_ESTADOOBJ + ", " + lAlias + "." + CtesBD.FLD_NAVENODRIZA_FUM + ", " + lAlias + "." + CtesBD.FLD_NAVENODRIZA_NOMBRE_NAVENODRIZA);
            else
            {
                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_NAVENODRIZA_ID_NAVENODRIZA));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_NAVENODRIZA_ID_NAVENODRIZA);

                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_NAVENODRIZA_ESTADOOBJ));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_NAVENODRIZA_ESTADOOBJ);

                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_NAVENODRIZA_FUM));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_NAVENODRIZA_FUM);

                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_NAVENODRIZA_NOMBRE_NAVENODRIZA));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_NAVENODRIZA_NOMBRE_NAVENODRIZA);

            }

            // Related attributes
            if (displaySet != null)
            {
                foreach (ONDisplaySetItem lDisplaySetItem in lSourceDS)
                {
                    if((lDisplaySetItem.Path.IndexOf(".") > 0) && (lDisplaySetItem.InData) && (! lDisplaySetItem.HasHV))
                    {
                        displaySet.Add(lDisplaySetItem);

                        string lPath = lDisplaySetItem.Path.Substring(0, lDisplaySetItem.Path.LastIndexOf("."));
                        string lFacetName = NaveNodrizaInstance.GetTargetClass(onContext, typeof(NaveNodrizaInstance), new ONPath(lDisplaySetItem.Path));
                        onSql.AddSelect(AddPath(onSql, JoinType.LeftJoin, lFacetName, new ONPath(lPath), onPath, "", false) + "." + ONInstance.GetFieldNameOfAttribute(typeof(NaveNodrizaInstance), new ONPath(lDisplaySetItem.Path)));
                    }
                }
            }
            return (lAlias);
        }
        public static string RetrieveInstances(ONSqlSelect onSql, ONDisplaySet displaySet, ONPath onPath, ONContext onContext)
        {
            string lAlias = onSql.CreateAlias(CtesBD.TBL_REVISIONPASAJERO, onPath, "RevisionPasajero");
            ONDisplaySet lSourceDS = null;
            if(displaySet != null)
            {
                lSourceDS = new ONDisplaySet(displaySet);
                displaySet.Clear();
            }
            if (displaySet == null)
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_REVISIONPASAJERO_ID_REVISIONPASAJERO + ", " + lAlias + "." + CtesBD.FLD_REVISIONPASAJERO_FK_REVISION_1 + ", " + lAlias + "." + CtesBD.FLD_REVISIONPASAJERO_FK_PASAJEROAERO_1 + ", " + lAlias + "." + CtesBD.FLD_REVISIONPASAJERO_ESTADOOBJ + ", " + lAlias + "." + CtesBD.FLD_REVISIONPASAJERO_FUM);
            else
            {
                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_REVISIONPASAJERO_ID_REVISIONPASAJERO));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_REVISIONPASAJERO_ID_REVISIONPASAJERO);

                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_REVISIONPASAJERO_FK_REVISION_1));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_REVISIONPASAJERO_FK_REVISION_1);

                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_REVISIONPASAJERO_FK_PASAJEROAERO_1));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_REVISIONPASAJERO_FK_PASAJEROAERO_1);

                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_REVISIONPASAJERO_ESTADOOBJ));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_REVISIONPASAJERO_ESTADOOBJ);

                displaySet.Add(new ONDisplaySetItem(CtesBD.FLD_REVISIONPASAJERO_FUM));
                onSql.AddSelect(lAlias + "." + CtesBD.FLD_REVISIONPASAJERO_FUM);

            }

            // Related attributes
            if (displaySet != null)
            {
                foreach (ONDisplaySetItem lDisplaySetItem in lSourceDS)
                {
                    if((lDisplaySetItem.Path.IndexOf(".") > 0) && (lDisplaySetItem.InData) && (! lDisplaySetItem.HasHV))
                    {
                        displaySet.Add(lDisplaySetItem);

                        string lPath = lDisplaySetItem.Path.Substring(0, lDisplaySetItem.Path.LastIndexOf("."));
                        string lFacetName = RevisionPasajeroInstance.GetTargetClass(onContext, typeof(RevisionPasajeroInstance), new ONPath(lDisplaySetItem.Path));
                        onSql.AddSelect(AddPath(onSql, JoinType.LeftJoin, lFacetName, new ONPath(lPath), onPath, "", false) + "." + ONInstance.GetFieldNameOfAttribute(typeof(RevisionPasajeroInstance), new ONPath(lDisplaySetItem.Path)));
                    }
                }
            }
            return (lAlias);
        }