/// <summary> /// Find a mobile business object YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal /// </summary> /// <exception cref="PersistentException">Thrown if unable to retrieve mobile business object.</exception> /// <remarks> </remarks> public static YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal FindByPrimaryKey(int diaInteraccion , int mesInteraccion , int anioInteraccion , int idTipoInteraccion) { YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal result_2 = null; System.Data.IDataReader rs_4 = null; int count_5 = 0; Sybase.Persistence.ConnectionWrapper _conn = null; try { _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection(); string _selectSQL = "SELECT x.\"d\",x.\"e\",x.\"a\",x.\"b\",x.\"c\",x.\"f\" FROM \"co_crmmobiledesa_1_0_calendariointeraccionlocal\" x WHERE x.\"a\" = ? AND x.\"b\" = ? AND x.\"c\" = ? AND x.\"f\" = ?"; System.Data.IDbCommand ps_3 = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, _selectSQL); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps_3, "diaInteraccion", diaInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps_3, "mesInteraccion", mesInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps_3, "anioInteraccion", anioInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps_3, "idTipoInteraccion", idTipoInteraccion); rs_4 = ps_3.ExecuteReader(); Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile(); while (com.sybase.afx.db.ReaderUtil.Read(profile, rs_4)) { YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal entity_6 = new YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal(); entity_6.Bind(profile, rs_4); count_5++; result_2 = entity_6; } if (rs_4 != null) { com.sybase.afx.db.ReaderUtil.Close(profile, rs_4, count_5); } if (ps_3 != null) { ps_3.Dispose(); } _selectSQL = null; } catch (System.Data.DataException ex) { throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex); } finally { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection(); } return(result_2); }
/// <summary> /// Find a List of YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal /// </summary> /// <exception cref="PersistentException">Thrown if unable to retrieve mobile business object.</exception> /// <remarks> </remarks> public static Sybase.Collections.GenericList <YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal> FindByIdTipoInteraccion(int idTipoInteraccion, int skip, int take) { skip = skip + 1; Sybase.Collections.GenericList <YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal> result_2 = new Sybase.Collections.GenericList <YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal>(); System.Data.IDataReader rs_4 = null; int count_5 = 0; Sybase.Persistence.ConnectionWrapper _conn = null; try { _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection(); string _selectSQL = " x.\"d\",x.\"e\",x.\"a\",x.\"b\",x.\"c\",x.\"f\" FROM \"co_crmmobiledesa_1_0_calendariointeraccionlocal\" x WHERE x.\"f\" = ?"; _selectSQL = "select top " + take + " start at " + skip + " " + _selectSQL; System.Data.IDbCommand ps_3 = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, _selectSQL); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps_3, "idTipoInteraccion", idTipoInteraccion); rs_4 = ps_3.ExecuteReader(); Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile(); while (com.sybase.afx.db.ReaderUtil.Read(profile, rs_4)) { YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal entity_6 = new YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal(); entity_6.Bind(profile, rs_4); count_5++; result_2.Add(entity_6); } if (rs_4 != null) { com.sybase.afx.db.ReaderUtil.Close(profile, rs_4, count_5); } if (ps_3 != null) { ps_3.Dispose(); } _selectSQL = null; } catch (System.Data.DataException ex) { throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex); } finally { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection(); } return(result_2); }
/// <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(); } }
private static YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal _find(YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocalKey id, String sql, bool findOs, bool findNonPending) { Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection(); System.Data.IDataReader _rs = null; int count = 0; try { YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal _rt = null; System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "diaInteraccion", id.DiaInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "mesInteraccion", id.MesInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "anioInteraccion", id.AnioInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "idTipoInteraccion", id.IdTipoInteraccion); _rs = ps.ExecuteReader(); Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile(); while (com.sybase.afx.db.ReaderUtil.Read(profile, _rs)) { _rt = new YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal(); _rt.Bind(profile, _rs); count++; } if (_rs != null) { com.sybase.afx.db.ReaderUtil.Close(profile, _rs, count); } if (ps != null) { ps.Dispose(); } return(_rt); } catch (System.Data.DataException ex) { throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex); } finally { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection(); } }
/// <summary> /// Find a mobile business object YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal /// </summary> /// <exception cref="PersistentException">Thrown if unable to retrieve mobile business object.</exception> /// <remarks> </remarks> public static YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal FindByPrimaryKey(int diaInteraccion ,int mesInteraccion ,int anioInteraccion ,int idTipoInteraccion) { YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal result_2 = null; System.Data.IDataReader rs_4 = null; int count_5 = 0; Sybase.Persistence.ConnectionWrapper _conn = null; try { _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection(); string _selectSQL = "SELECT x.\"d\",x.\"e\",x.\"a\",x.\"b\",x.\"c\",x.\"f\" FROM \"co_crmmobiledesa_1_0_calendariointeraccionlocal\" x WHERE x.\"a\" = ? AND x.\"b\" = ? AND x.\"c\" = ? AND x.\"f\" = ?"; System.Data.IDbCommand ps_3 = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, _selectSQL); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps_3, "diaInteraccion", diaInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps_3, "mesInteraccion", mesInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps_3, "anioInteraccion", anioInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps_3, "idTipoInteraccion", idTipoInteraccion); rs_4 = ps_3.ExecuteReader(); Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile(); while (com.sybase.afx.db.ReaderUtil.Read(profile, rs_4)) { YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal entity_6 = new YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal(); entity_6.Bind(profile, rs_4); count_5++; result_2 = entity_6; } if (rs_4 != null) com.sybase.afx.db.ReaderUtil.Close(profile, rs_4, count_5); if (ps_3 != null) ps_3.Dispose(); _selectSQL = null; } catch (System.Data.DataException ex) { throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex); } finally { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection(); } return result_2; }
/// <summary> /// Find a List of YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal /// </summary> /// <exception cref="PersistentException">Thrown if unable to retrieve mobile business object.</exception> /// <remarks> </remarks> public static Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal> FindByIdTipoInteraccion(int idTipoInteraccion, int skip, int take) { skip = skip + 1; Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal> result_2 = new Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal>(); System.Data.IDataReader rs_4 = null; int count_5 = 0; Sybase.Persistence.ConnectionWrapper _conn = null; try { _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection(); string _selectSQL = " x.\"d\",x.\"e\",x.\"a\",x.\"b\",x.\"c\",x.\"f\" FROM \"co_crmmobiledesa_1_0_calendariointeraccionlocal\" x WHERE x.\"f\" = ?"; _selectSQL = "select top " + take + " start at " + skip + " " + _selectSQL; System.Data.IDbCommand ps_3 = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, _selectSQL); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps_3, "idTipoInteraccion", idTipoInteraccion); rs_4 = ps_3.ExecuteReader(); Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile(); while (com.sybase.afx.db.ReaderUtil.Read(profile, rs_4)) { YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal entity_6 = new YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal(); entity_6.Bind(profile, rs_4); count_5++; result_2.Add(entity_6); } if (rs_4 != null) com.sybase.afx.db.ReaderUtil.Close(profile, rs_4, count_5); if (ps_3 != null) ps_3.Dispose(); _selectSQL = null; } catch (System.Data.DataException ex) { throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex); } finally { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection(); } return result_2; }
/// <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(); } }
private static YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal _find(YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocalKey id, String sql, bool findOs, bool findNonPending) { Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection(); System.Data.IDataReader _rs = null; int count = 0; try { YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal _rt = null; System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "diaInteraccion", id.DiaInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "mesInteraccion", id.MesInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "anioInteraccion", id.AnioInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "idTipoInteraccion", id.IdTipoInteraccion); _rs = ps.ExecuteReader(); Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile(); while (com.sybase.afx.db.ReaderUtil.Read(profile, _rs)) { _rt = new YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal(); _rt.Bind(profile, _rs); count++; } if (_rs != null) com.sybase.afx.db.ReaderUtil.Close(profile, _rs, count); if (ps != null) ps.Dispose(); return _rt; } catch(System.Data.DataException ex) { throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex); } finally { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection(); } }