本文整理汇总了C#中Sybase.SetEntity方法的典型用法代码示例。如果您正苦于以下问题:C# Sybase.SetEntity方法的具体用法?C# Sybase.SetEntity怎么用?C# Sybase.SetEntity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sybase
的用法示例。
在下文中一共展示了Sybase.SetEntity方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FindWithQuery
/// <summary>
/// Find a List of RespuestaInteraccionFormulario
/// </summary>
/// <param name="query">The query to be filter.</param>
/// <exception cref="PersistenceException">Thrown if unable to retrieve mobile business object.</exception>
/// <remarks> </remarks>
public static Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.RespuestaInteraccionFormulario> FindWithQuery(Sybase.Persistence.Query query)
{
Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection();
try
{
query.SetEntity(META_DATA);
query.SetDatabaseMetaData(YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.Metadata);
Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.RespuestaInteraccionFormulario> list_3 = new Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.RespuestaInteraccionFormulario>();
Sybase.Persistence.AbstractEntity.FindWithQuery(_conn, query, list_3, typeof(YPF.Comercial.RRCC.SUP.RespuestaInteraccionFormulario));
return list_3;
}
catch (Sybase.Persistence.PersistenceException ex_10)
{
throw ex_10;
}
finally
{
YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
}
}
示例2: FindWithQuery
/// <summary>
/// Find a List of CalendarioInteraccionLocal
/// </summary>
/// <param name="query">The query to be filter.</param>
/// <exception cref="PersistenceException">Thrown if unable to retrieve mobile business object.</exception>
/// <remarks> </remarks>
public static Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal> FindWithQuery(Sybase.Persistence.Query query)
{
Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection();
try
{
query.SetEntity(META_DATA);
query.SetDatabaseMetaData(YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.Metadata);
int count_2 = 0;
Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal> list_3 = new Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal>();
if(query.Take == 0)
{
return list_3;
}
com.sybase.afx.db.DynamicQuery query_4 = new com.sybase.afx.db.DynamicQuery();
System.Data.IDbCommand ps_5 = query_4.CreateCommand(_conn, query);
System.Data.IDataReader rs_6 = ps_5.ExecuteReader();
Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile();
while (com.sybase.afx.db.ReaderUtil.Read(profile, rs_6))
{
YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal entity_9 = new YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal();
entity_9.Bind(profile, rs_6);
list_3.Add(entity_9);
count_2++;
}
if (rs_6 != null) com.sybase.afx.db.ReaderUtil.Close(profile, rs_6, count_2);
if (ps_5 != null) ps_5.Dispose();
return list_3;
}
catch (Sybase.Persistence.PersistenceException ex_10)
{
throw ex_10;
}
finally
{
YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
}
}
示例3: GetSize
/// <summary>
/// return MBO count filter by query object
/// </summary>
public static int GetSize(Sybase.Persistence.Query query)
{
Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection();
try
{
query.SetEntity(META_DATA);
query.SetDatabaseMetaData(YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.Metadata);
return Sybase.Persistence.AbstractEntity.GetRowCount(_conn, query);
}
catch (Sybase.Persistence.PersistenceException ex_10)
{
throw ex_10;
}
finally
{
YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
}
}
示例4: GetSize
/// <summary>
/// return MBO count filter by query object
/// </summary>
public static int GetSize(Sybase.Persistence.Query query)
{
Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection();
try
{
query.SetEntity(META_DATA);
query.SetDatabaseMetaData(YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.Metadata);
int count_2 = 0;
com.sybase.afx.db.DynamicQuery query_4 = new com.sybase.afx.db.DynamicQuery();
System.Data.IDbCommand ps_5 = query_4.CreateCommand(_conn, query,true);
System.Data.IDataReader rs_6 = ps_5.ExecuteReader();
Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile();
com.sybase.afx.db.ReaderUtil.Read(profile, rs_6);
count_2 = com.sybase.afx.db.ReaderUtil.GetInt(profile, rs_6, "count", 0);
if (rs_6 != null) com.sybase.afx.db.ReaderUtil.Close(profile, rs_6, count_2);
if (ps_5 != null) ps_5.Dispose();
return count_2;
}
catch (Sybase.Persistence.PersistenceException ex_10)
{
throw ex_10;
}
finally
{
YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
}
}