Esempio n. 1
0
        public Signal Save()
        {
            var db = new DataProcess();

            if (History == null)
            {
                throw new SignalException("Signal should be associated to history.");
            }
            else
            {
                if (this.Id == null)
                {
                    Id = db.saveSignal(this);
                }
                else
                {
                    db.updateSignal(this);
                }
                return(this);
            }
        }
Esempio n. 2
0
 public Signal Save()
 {
     var db = new DataProcess();
     if (History == null)
     {
         throw new SignalException("Signal should be associated to history.");
     }
     else
     {
         if (this.Id == null)
         {
             Id = db.saveSignal(this);
         }
         else
         {
             db.updateSignal(this);
         }
         return this;
     }
 }