Пример #1
0
 /// <summary>
 /// Refresh the mobile business object from database.
 /// </summary>
 public void Refresh()
 {
     if (!_isNew && !__isOsEntity)
     {
         YPF.Comercial.RRCC.SUP.FormularioPrecios ent = Load(_pk());
         CopyAll(ent);
         if (this.IsPending)
         {
             this.SetOriginalState(null);
             this.__originalStateValid = false;
         }
         else
         {
             YPF.Comercial.RRCC.SUP.FormularioPrecios os_1 = new YPF.Comercial.RRCC.SUP.FormularioPrecios();
             os_1.CopyAll(this);
             this.SetOriginalState(os_1);
         }
         _isNew = false;
         _isDirty = false;
     }
 }
Пример #2
0
 protected  override void Bind(Sybase.Persistence.ConnectionProfile profile, System.Data.IDataReader rs) 
 {
     this.__idInteraccion = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"idInteraccion",0);
     this.__formularioPreciosZonaInspeccion_CodigoSAP = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"formularioPreciosZonaInspeccion_CodigoSAP",1);
     this.__zonaPrecios = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"zonaPrecios",2);
     this.__cluster = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"cluster",3);
     this.__formularioPreciosRed_CodigoSAP = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"formularioPreciosRed_CodigoSAP",4);
     this.__APIES = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"APIES",5);
     this.__formularioPreciosMercado_CodigoSAP = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"formularioPreciosMercado_CodigoSAP",6);
     this.__submercado = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"submercado",7);
     this.__tasaServicio = com.sybase.afx.db.ReaderUtil.GetDecimal(profile,rs,"tasaServicio",8);
     this.__observacionesTasaServicio = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"observacionesTasaServicio",9);
     this.__tasaIncluida = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"tasaIncluida",10);
     this.__estrategica = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"estrategica",11);
     this.__camara = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"camara",12);
     this.__programaFidelizacion = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"programaFidelizacion",13);
     this.__otrosNegocios = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"otrosNegocios",14);
     this.__mediosPago = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"mediosPago",15);
     this.__pending = com.sybase.afx.db.ReaderUtil.GetBoolean(profile,rs,"pending",16);
     this.__pendingChange = com.sybase.afx.db.ReaderUtil.GetChar(profile,rs,"pendingChange",17);
     this.__replayPending = com.sybase.afx.db.ReaderUtil.GetLong(profile,rs,"replayPending",18);
     this.__replayFailure = com.sybase.afx.db.ReaderUtil.GetLong(profile,rs,"replayFailure",19);
     this.__interaccionFK = com.sybase.afx.db.ReaderUtil.GetNullableLong(profile,rs,"interaccionFK",20);
     this.__surrogateKey = com.sybase.afx.db.ReaderUtil.GetLong(profile,rs,"surrogateKey",21);
     this.__replayCounter = com.sybase.afx.db.ReaderUtil.GetLong(profile,rs,"replayCounter",22);
     this.__disableSubmit = com.sybase.afx.db.ReaderUtil.GetBoolean(profile,rs,"disableSubmit",23);
     _isNew = false;
     _isDirty = false;
     if (this.IsPending)
     {
         this.SetOriginalState(null);
         this.__originalStateValid = false;
     }
     else
     {
         YPF.Comercial.RRCC.SUP.FormularioPrecios os_1 = new YPF.Comercial.RRCC.SUP.FormularioPrecios();
         os_1.CopyAll(this);
         this.SetOriginalState(os_1);
     }
 }
Пример #3
0
 private void Internal_Create()
 {
     bool ok = true;
     Sybase.Persistence.LocalTransaction localTransaction = null;
     try
     {
         localTransaction = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.BeginTransaction();
         if(__surrogateKey == 0) __surrogateKey = (long)(YPF.Comercial.RRCC.SUP.KeyGenerator.GenerateId());
         YPF.Comercial.RRCC.SUP.FormularioPrecios os_1 = new YPF.Comercial.RRCC.SUP.FormularioPrecios();
         os_1.CopyAll(this);
         this.SetOriginalState(os_1);
         PendingChange = 'C';
         SetReplayCounter(KeyGenerator.GenerateId());
         SetReplayFailure(0);
         ReplayPending = 0;
         if(_isNew)
         {
             Create(true);
         }
         else
         {
             Update(true);
         }
     }
     catch(System.SystemException e)
     {
         ok = false;
         throw e;
     }
     finally
     {
         if(localTransaction != null)
         {
             localTransaction.EndTransaction(ok);
         }
     }
 }