/// <summary> /// Find a List of YPF.Comercial.RRCC.SUP.intrnl.SISSubscription /// </summary> /// <exception cref="PersistentException">Thrown if unable to retrieve mobile business object.</exception> /// <remarks> </remarks> public static Sybase.Collections.GenericList <YPF.Comercial.RRCC.SUP.intrnl.SISSubscription> FindAll(int skip, int take) { skip = skip + 1; Sybase.Collections.GenericList <YPF.Comercial.RRCC.SUP.intrnl.SISSubscription> result_2 = new Sybase.Collections.GenericList <YPF.Comercial.RRCC.SUP.intrnl.SISSubscription>(); 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 = " ss.\"device_id\",ss.\"user_name\",ss.\"h\",ss.\"i\",ss.\"admin_lock\",ss.\"l\",ss.\"m\",ss.\"n\",ss.\"domain\",ss.\"pkg\",ss.\"sync_group\",ss.\"cid\" FROM \"sup_sis_subscription\" ss"; _selectSQL = "select top " + take + " start at " + skip + " " + _selectSQL; System.Data.IDbCommand ps_3 = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, _selectSQL); 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.intrnl.SISSubscription entity_6 = new YPF.Comercial.RRCC.SUP.intrnl.SISSubscription(); 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); }
private static YPF.Comercial.RRCC.SUP.intrnl.SISSubscription _find(YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey 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.intrnl.SISSubscription _rt = null; System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "domain", id.Domain); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "package", id.Package); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "syncGroup", id.SyncGroup); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "clientId", id.ClientId); _rs = ps.ExecuteReader(); Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile(); while (com.sybase.afx.db.ReaderUtil.Read(profile, _rs)) { _rt = new YPF.Comercial.RRCC.SUP.intrnl.SISSubscription(); _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 List of YPF.Comercial.RRCC.SUP.intrnl.SISSubscription /// </summary> /// <exception cref="PersistentException">Thrown if unable to retrieve mobile business object.</exception> /// <remarks> </remarks> public static Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.intrnl.SISSubscription> FindAll(int skip, int take) { skip = skip + 1; Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.intrnl.SISSubscription> result_2 = new Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.intrnl.SISSubscription>(); 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 = " ss.\"device_id\",ss.\"user_name\",ss.\"h\",ss.\"i\",ss.\"admin_lock\",ss.\"l\",ss.\"m\",ss.\"n\",ss.\"domain\",ss.\"pkg\",ss.\"sync_group\",ss.\"cid\" FROM \"sup_sis_subscription\" ss"; _selectSQL = "select top " + take + " start at " + skip + " " + _selectSQL; System.Data.IDbCommand ps_3 = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, _selectSQL); 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.intrnl.SISSubscription entity_6 = new YPF.Comercial.RRCC.SUP.intrnl.SISSubscription(); 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; }
private static YPF.Comercial.RRCC.SUP.intrnl.SISSubscription _find(YPF.Comercial.RRCC.SUP.intrnl.SISSubscriptionKey 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.intrnl.SISSubscription _rt = null; System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "domain", id.Domain); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "package", id.Package); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "syncGroup", id.SyncGroup); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "clientId", id.ClientId); _rs = ps.ExecuteReader(); Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile(); while (com.sybase.afx.db.ReaderUtil.Read(profile, _rs)) { _rt = new YPF.Comercial.RRCC.SUP.intrnl.SISSubscription(); _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(); } }