/// <summary> /// Update the mobile business object /// </summary> public void Update() { Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBWriteConnection(); try { int count = 1; System.Data.IDbCommand cmd = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, "update crmmobiledesa_1_0_representantecomercial_pull_pq set \"username\"=?,\"remoteId\"=?,\"UsuarioParam\"=? where \"id\"=?"); com.sybase.afx.db.CommandUtil.SetNullableString(_conn.GetConnectionProfile(), cmd, "username", this.Username); com.sybase.afx.db.CommandUtil.SetNullableString(_conn.GetConnectionProfile(), cmd, "remoteId", this.RemoteId); com.sybase.afx.db.CommandUtil.SetNullableString(_conn.GetConnectionProfile(), cmd, "UsuarioParam", this.UsuarioParam); com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), cmd, "id", this.Id); count = cmd.ExecuteNonQuery(); cmd.Dispose();; _isNew = false; _isDirty = false; _isDeleted = false; } catch (System.Data.DataException ex) { throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex); } finally { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection(); } }
/// <summary> /// Update the mobile business object /// </summary> public void Update() { Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBWriteConnection(); try { int count = 1; System.Data.IDbCommand cmd = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, "update co_crmmobiledesa_1_0_localkeygenerator set \"first_id\"=?,\"last_id\"=?,\"next_id\"=? where \"remote_id\"=? and \"batch_id\"=?"); com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), cmd, "firstId", this.FirstId); com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), cmd, "lastId", this.LastId); com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), cmd, "nextId", this.NextId); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), cmd, "remoteId", this.RemoteId); com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), cmd, "batchId", this.BatchId); count = cmd.ExecuteNonQuery(); cmd.Dispose();; _isNew = false; _isDirty = false; _isDeleted = false; } catch (System.Data.DataException ex) { throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex); } finally { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection(); } }
/// <summary> /// Update the mobile business object /// </summary> public void Update() { lock (YPF.Comercial.RRCC.SUP.CRMMobileDesaDB._synchronizeLock) { Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBWriteConnection(); try { int count = 1; System.Data.IDbCommand cmd = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, "update co_crmmobiledesa_1_0_representantecomercialsp set \"Usuario\"=?,\"UsuarioUserDefined\"=?,\"size_sp\"=? where \"user_sp\"=?"); com.sybase.afx.db.CommandUtil.SetNullableString(_conn.GetConnectionProfile(), cmd, "Usuario", this.Usuario); com.sybase.afx.db.CommandUtil.SetBoolean(_conn.GetConnectionProfile(), cmd, "UsuarioUserDefined", this.UsuarioUserDefined); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), cmd, "size_sp", this.Size_sp); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), cmd, "user_sp", this.User_sp); count = cmd.ExecuteNonQuery(); cmd.Dispose();; _isNew = false; _isDirty = false; _isDeleted = false; } catch (System.Data.DataException ex) { throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex); } finally { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection(); } } }
/// <summary> /// Update the mobile business object /// </summary> public void Update() { Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBWriteConnection(); try { int count = 1; System.Data.IDbCommand cmd = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, "update crmmobiledesa_1_0_changelogimpl set \"c\"=?,\"d\"=?,\"e\"=? where \"a\"=? and \"b\"=?"); com.sybase.afx.db.CommandUtil.SetChar(_conn.GetConnectionProfile(), cmd, "operationType", this.OperationType); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), cmd, "rootEntityType", this.RootEntityType); com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), cmd, "rootSurrogateKey", this.RootSurrogateKey); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), cmd, "entityType", this.EntityType); com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), cmd, "surrogateKey", this.SurrogateKey); count = cmd.ExecuteNonQuery(); cmd.Dispose();; _isNew = false; _isDirty = false; _isDeleted = false; } catch (System.Data.DataException ex) { throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex); } finally { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection(); } }
/// <summary> /// Delete the mobile business object. /// </summary> public void Delete() { Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBWriteConnection(); try { int count = 1; System.Data.IDbCommand ps1 = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, "delete sup_sis_subscription where \"domain\"=? and \"pkg\"=? and \"sync_group\"=? and \"cid\"=?"); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps1, "domain", this.Domain); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps1, "package", this.Package); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps1, "syncGroup", this.SyncGroup); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps1, "clientId", this.ClientId); count = ps1.ExecuteNonQuery(); ps1.Dispose();; _isNew = false; _isDeleted = true; } catch (System.Data.DataException ex) { throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex); } finally { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection(); } }
/// <summary> /// Delete the mobile business object. /// </summary> public void Delete() { Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBWriteConnection(); try { int count = 1; System.Data.IDbCommand ps1 = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, "delete co_crmmobiledesa_1_0_calendariointeraccionlocal where \"a\"=? and \"b\"=? and \"c\"=? and \"f\"=?"); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps1, "diaInteraccion", this.DiaInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps1, "mesInteraccion", this.MesInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps1, "anioInteraccion", this.AnioInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps1, "idTipoInteraccion", this.IdTipoInteraccion); count = ps1.ExecuteNonQuery(); ps1.Dispose();; _isNew = false; _isDeleted = true; } catch (System.Data.DataException ex) { throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex); } finally { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection(); } }
private void CreateBySQL(Sybase.Persistence.ConnectionWrapper _conn, string sql, YPF.Comercial.RRCC.SUP.OfflineAuthentication __theObject) { System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "passwordHash", __theObject.PasswordHash); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "user", __theObject.User); ps.ExecuteNonQuery(); ps.Dispose();; }
private void CreateBySQL(Sybase.Persistence.ConnectionWrapper _conn, string sql, YPF.Comercial.RRCC.SUP.intrnl.RepresentanteComercial_pull_pq __theObject) { System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql); com.sybase.afx.db.CommandUtil.SetNullableString(_conn.GetConnectionProfile(), ps, "username", __theObject.Username); com.sybase.afx.db.CommandUtil.SetNullableString(_conn.GetConnectionProfile(), ps, "remoteId", __theObject.RemoteId); com.sybase.afx.db.CommandUtil.SetNullableString(_conn.GetConnectionProfile(), ps, "UsuarioParam", __theObject.UsuarioParam); com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), ps, "id", __theObject.Id); ps.ExecuteNonQuery(); ps.Dispose();; }
private void CreateBySQL(Sybase.Persistence.ConnectionWrapper _conn, string sql, YPF.Comercial.RRCC.SUP.RepresentanteComercialSynchronizationParameters __theObject) { System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql); com.sybase.afx.db.CommandUtil.SetNullableString(_conn.GetConnectionProfile(), ps, "Usuario", __theObject.Usuario); com.sybase.afx.db.CommandUtil.SetBoolean(_conn.GetConnectionProfile(), ps, "UsuarioUserDefined", __theObject.UsuarioUserDefined); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "size_sp", __theObject.Size_sp); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "user_sp", __theObject.User_sp); ps.ExecuteNonQuery(); ps.Dispose();; }
private void CreateBySQL(Sybase.Persistence.ConnectionWrapper _conn, string sql, YPF.Comercial.RRCC.SUP.LocalKeyGenerator __theObject) { System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql); com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), ps, "firstId", __theObject.FirstId); com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), ps, "lastId", __theObject.LastId); com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), ps, "nextId", __theObject.NextId); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "remoteId", __theObject.RemoteId); com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), ps, "batchId", __theObject.BatchId); ps.ExecuteNonQuery(); ps.Dispose();; }
private void CreateBySQL(Sybase.Persistence.ConnectionWrapper _conn, string sql, YPF.Comercial.RRCC.SUP.ChangeLogImpl __theObject) { System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql); com.sybase.afx.db.CommandUtil.SetChar(_conn.GetConnectionProfile(), ps, "operationType", __theObject.OperationType); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "rootEntityType", __theObject.RootEntityType); com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), ps, "rootSurrogateKey", __theObject.RootSurrogateKey); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "entityType", __theObject.EntityType); com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), ps, "surrogateKey", __theObject.SurrogateKey); ps.ExecuteNonQuery(); ps.Dispose();; }
/// <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> /// Delete the mobile business object. /// </summary> public void Delete() { lock (YPF.Comercial.RRCC.SUP.CRMMobileDesaDB._synchronizeLock) { Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBWriteConnection(); try { int count = 1; System.Data.IDbCommand ps1 = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, "delete co_crmmobiledesa_1_0_representantecomercialsp where \"user_sp\"=?"); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps1, "user_sp", this.User_sp); count = ps1.ExecuteNonQuery(); ps1.Dispose();; _isNew = false; _isDeleted = true; } catch (System.Data.DataException ex) { throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex); } finally { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection(); } } RepresentanteComercial.Unsubscribe_all_pull(); }
/// <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(); } }
/// <summary> /// Find a mobile business object YPF.Comercial.RRCC.SUP.intrnl.RepresentanteComercial_pull_pq /// </summary> /// <exception cref="PersistentException">Thrown if unable to retrieve mobile business object.</exception> /// <remarks> </remarks> public static YPF.Comercial.RRCC.SUP.intrnl.RepresentanteComercial_pull_pq FindSub(string _username , string Usuario) { YPF.Comercial.RRCC.SUP.intrnl.RepresentanteComercial_pull_pq 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 s.\"username\",s.\"remoteId\",s.\"UsuarioParam\",s.\"id\" from \"crmmobiledesa_1_0_representantecomercial_pull_pq\" s where s.\"username\" =? and ( s.\"UsuarioParam\"=? or (s.\"UsuarioParam\" IS NULL AND CAST(? AS varchar(100)) IS NULL))"; System.Data.IDbCommand ps_3 = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, _selectSQL); com.sybase.afx.db.CommandUtil.SetNullableString(_conn.GetConnectionProfile(), ps_3, "_username", _username); com.sybase.afx.db.CommandUtil.SetNullableString(_conn.GetConnectionProfile(), ps_3, "Usuario", Usuario); com.sybase.afx.db.CommandUtil.SetNullableString(_conn.GetConnectionProfile(), ps_3, "Usuario", Usuario); 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.RepresentanteComercial_pull_pq entity_6 = new YPF.Comercial.RRCC.SUP.intrnl.RepresentanteComercial_pull_pq(); 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.ClientPersonalization /// </summary> /// <exception cref="PersistentException">Thrown if unable to retrieve mobile business object.</exception> /// <remarks> </remarks> public static Sybase.Collections.GenericList <YPF.Comercial.RRCC.SUP.ClientPersonalization> FindByUser(string user, int skip, int take) { skip = skip + 1; Sybase.Collections.GenericList <YPF.Comercial.RRCC.SUP.ClientPersonalization> result_2 = new Sybase.Collections.GenericList <YPF.Comercial.RRCC.SUP.ClientPersonalization>(); 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 = " p.\"key_name\",p.\"user\",p.\"value\",p.\"user_defined\",p.\"description\",p.\"id\" from \"co_crmmobiledesa_1_0_clientpersonalization\" p where p.\"user\" = ?"; _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.SetString(_conn.GetConnectionProfile(), ps_3, "user", user); 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.ClientPersonalization entity_6 = new YPF.Comercial.RRCC.SUP.ClientPersonalization(); 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 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); }
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(); } }
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> /// Update the mobile business object /// </summary> public void Update() { Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBWriteConnection(); try { int count = 1; System.Data.IDbCommand cmd = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, "update co_crmmobiledesa_1_0_clientpersonalization set \"key_name\"=?,\"user\"=?,\"value\"=?,\"user_defined\"=?,\"description\"=? where \"id\"=?"); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), cmd, "key_name", this.Key_name); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), cmd, "user", this.User); com.sybase.afx.db.CommandUtil.SetNullableString(_conn.GetConnectionProfile(), cmd, "value", this.Value); com.sybase.afx.db.CommandUtil.SetBoolean(_conn.GetConnectionProfile(), cmd, "user_defined", this.User_defined); com.sybase.afx.db.CommandUtil.SetNullableString(_conn.GetConnectionProfile(), cmd, "description", this.Description); com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), cmd, "id", this.Id); count = cmd.ExecuteNonQuery(); cmd.Dispose();; _isNew = false; _isDirty = false; _isDeleted = false; } catch (System.Data.DataException ex) { throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex); } finally { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection(); } }
/// <summary> /// Update the mobile business object /// </summary> public void Update() { Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBWriteConnection(); try { int count = 1; System.Data.IDbCommand cmd = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, "update co_crmmobiledesa_1_0_customlocaldata set \"b\"=?,\"c\"=?,\"d\"=?,\"e\"=?,\"f\"=? where \"a\"=?"); com.sybase.afx.db.CommandUtil.SetNullableBoolean(_conn.GetConnectionProfile(), cmd, "valorBoolean", this.ValorBoolean); com.sybase.afx.db.CommandUtil.SetNullableInt(_conn.GetConnectionProfile(), cmd, "valorInteger", this.ValorInteger); com.sybase.afx.db.CommandUtil.SetNullableString(_conn.GetConnectionProfile(), cmd, "valorString", this.ValorString); com.sybase.afx.db.CommandUtil.SetNullableDouble(_conn.GetConnectionProfile(), cmd, "valorDouble", this.ValorDouble); com.sybase.afx.db.CommandUtil.SetNullableDateTime(_conn.GetConnectionProfile(), cmd, "valorDateTime", this.ValorDateTime); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), cmd, "idCustomLocalData", this.IdCustomLocalData); count = cmd.ExecuteNonQuery(); cmd.Dispose();; _isNew = false; _isDirty = false; _isDeleted = false; } catch (System.Data.DataException ex) { throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex); } finally { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection(); } }
private static YPF.Comercial.RRCC.SUP.ChangeLogImpl _find(YPF.Comercial.RRCC.SUP.ChangeLogKey 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.ChangeLogImpl _rt = null; System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "entityType", id.EntityType); com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), ps, "surrogateKey", id.SurrogateKey); _rs = ps.ExecuteReader(); Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile(); while (com.sybase.afx.db.ReaderUtil.Read(profile, _rs)) { _rt = new YPF.Comercial.RRCC.SUP.ChangeLogImpl(); _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(); } }
private static YPF.Comercial.RRCC.SUP.RepresentanteComercialSynchronizationParameters _find(string 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.RepresentanteComercialSynchronizationParameters _rt = null; System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "user_sp", id); _rs = ps.ExecuteReader(); Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile(); while (com.sybase.afx.db.ReaderUtil.Read(profile, _rs)) { _rt = new YPF.Comercial.RRCC.SUP.RepresentanteComercialSynchronizationParameters(); _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> /// Delete the mobile business object. /// </summary> public void Delete() { Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBWriteConnection(); try { int count = 1; System.Data.IDbCommand ps1 = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, "delete crmmobiledesa_1_0_keygenerator where \"remote_id\"=? and \"batch_id\"=?"); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps1, "remoteId", this.RemoteId); com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), ps1, "batchId", this.BatchId); count = ps1.ExecuteNonQuery(); ps1.Dispose();; _isNew = false; _isDeleted = true; } catch (System.Data.DataException ex) { throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex); } finally { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection(); } }
/// <summary> /// Update the mobile business object /// </summary> public void Update() { Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBWriteConnection(); try { int count = 1; System.Data.IDbCommand cmd = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, "update co_crmmobiledesa_1_0_offlineauthentication set \"b\"=? where \"a\"=?"); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), cmd, "passwordHash", this.PasswordHash); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), cmd, "user", this.User); count = cmd.ExecuteNonQuery(); cmd.Dispose();; _isNew = false; _isDirty = false; _isDeleted = false; } catch (System.Data.DataException ex) { throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex); } finally { YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection(); } }
private void CreateBySQL(Sybase.Persistence.ConnectionWrapper _conn, string sql, YPF.Comercial.RRCC.SUP.ClientPersonalization __theObject) { System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "key_name", __theObject.Key_name); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "user", __theObject.User); com.sybase.afx.db.CommandUtil.SetNullableString(_conn.GetConnectionProfile(), ps, "value", __theObject.Value); com.sybase.afx.db.CommandUtil.SetBoolean(_conn.GetConnectionProfile(), ps, "user_defined", __theObject.User_defined); com.sybase.afx.db.CommandUtil.SetNullableString(_conn.GetConnectionProfile(), ps, "description", __theObject.Description); com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), ps, "id", __theObject.Id); ps.ExecuteNonQuery(); ps.Dispose();; }
private void CreateBySQL(Sybase.Persistence.ConnectionWrapper _conn, string sql, YPF.Comercial.RRCC.SUP.CustomLocalData __theObject) { System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql); com.sybase.afx.db.CommandUtil.SetNullableBoolean(_conn.GetConnectionProfile(), ps, "valorBoolean", __theObject.ValorBoolean); com.sybase.afx.db.CommandUtil.SetNullableInt(_conn.GetConnectionProfile(), ps, "valorInteger", __theObject.ValorInteger); com.sybase.afx.db.CommandUtil.SetNullableString(_conn.GetConnectionProfile(), ps, "valorString", __theObject.ValorString); com.sybase.afx.db.CommandUtil.SetNullableDouble(_conn.GetConnectionProfile(), ps, "valorDouble", __theObject.ValorDouble); com.sybase.afx.db.CommandUtil.SetNullableDateTime(_conn.GetConnectionProfile(), ps, "valorDateTime", __theObject.ValorDateTime); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "idCustomLocalData", __theObject.IdCustomLocalData); ps.ExecuteNonQuery(); ps.Dispose();; }
private void CreateBySQL(Sybase.Persistence.ConnectionWrapper _conn, string sql, YPF.Comercial.RRCC.SUP.CalendarioInteraccionLocal __theObject) { System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql); com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps, "tipoInteraccion", __theObject.TipoInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "cantidadInteraccion", __theObject.CantidadInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "diaInteraccion", __theObject.DiaInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "mesInteraccion", __theObject.MesInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "anioInteraccion", __theObject.AnioInteraccion); com.sybase.afx.db.CommandUtil.SetInt(_conn.GetConnectionProfile(), ps, "idTipoInteraccion", __theObject.IdTipoInteraccion); ps.ExecuteNonQuery(); ps.Dispose();; }
/// <summary> /// Find a List of ChangeLogImpl /// </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.ChangeLogImpl> 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.ChangeLogImpl> list_3 = new Sybase.Collections.GenericList <YPF.Comercial.RRCC.SUP.ChangeLogImpl>(); 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.ChangeLogImpl entity_9 = new YPF.Comercial.RRCC.SUP.ChangeLogImpl(); 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(); } }
/// <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); }