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


C# ONSqlSelect.AddSelect方法代码示例

本文整理汇总了C#中SIGEM.Business.SQL.ONSqlSelect.AddSelect方法的典型用法代码示例。如果您正苦于以下问题:C# ONSqlSelect.AddSelect方法的具体用法?C# ONSqlSelect.AddSelect怎么用?C# ONSqlSelect.AddSelect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SIGEM.Business.SQL.ONSqlSelect的用法示例。


在下文中一共展示了ONSqlSelect.AddSelect方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RetrieveInstances

        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);
        }
开发者ID:sgon1853,项目名称:UPM_MDD_Thesis,代码行数:62,代码来源:AeronaveData.cs

示例2: LoadTextOrigen

        /// <summary>Load the data retrieved from the Data Base to components of the application</summary>
        /// <param name="onContext">This parameter has the current context</param>
        /// <param name="oid">OID of the instance whose text attribute value is wanted to be loaded</param>
        public static ONText LoadTextOrigen(ONContext onContext, AeronaveOid oid)
        {
            ONSqlSelect lOnSql = new ONSqlSelect();

            lOnSql.CreateAlias(CtesBD.TBL_AERONAVE, null, "Aeronave");
            lOnSql.AddSelect(CtesBD.FLD_AERONAVE_ORIGEN);

            FixInstance(lOnSql, null, null, oid);

            // Create Data Component
            AeronaveData lData = new AeronaveData(onContext);

            // Execute query
            ArrayList lSqlParameters;
            ONText lReturn = new ONText((string) lData.ExecuteScalar(lOnSql.GenerateSQL(out lSqlParameters), lSqlParameters));
            return lReturn;
        }
开发者ID:sgon1853,项目名称:UPM_MDD_Thesis,代码行数:20,代码来源:AeronaveData.cs

示例3: LoadTextNombre

        /// <summary>Load the data retrieved from the Data Base to components of the application</summary>
        /// <param name="onContext">This parameter has the current context</param>
        /// <param name="oid">OID of the instance whose text attribute value is wanted to be loaded</param>
        public static ONText LoadTextNombre(ONContext onContext, PasajeroOid oid)
        {
            ONSqlSelect lOnSql = new ONSqlSelect();

            lOnSql.CreateAlias(CtesBD.TBL_PASAJERO, null, "Pasajero");
            lOnSql.AddSelect(CtesBD.FLD_PASAJERO_NOMBRE);

            FixInstance(lOnSql, null, null, oid);

            // Create Data Component
            PasajeroData lData = new PasajeroData(onContext);

            // Execute query
            ArrayList lSqlParameters;
            ONText lReturn = new ONText((string) lData.ExecuteScalar(lOnSql.GenerateSQL(out lSqlParameters), lSqlParameters));
            return lReturn;
        }
开发者ID:sgon1853,项目名称:UPM_MDD_Thesis,代码行数:20,代码来源:PasajeroData.cs

示例4: RetrieveInstances

        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);
        }
开发者ID:sgon1853,项目名称:UPM_MDD_Thesis,代码行数:44,代码来源:NaveNodrizaData.cs

示例5: RetrieveInstances

        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);
        }
开发者ID:sgon1853,项目名称:UPM_MDD_Thesis,代码行数:47,代码来源:RevisionPasajeroData.cs


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