本文整理汇总了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);
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}