/// <summary> /// Set the values of this object to the values of the dummy object, if the dummys value is non-null. /// </summary> /// <param name="dummy"> /// The dummy object, representing new values. /// </param> public void UpdateValues(IDataObject dummy) { LogDO logDummy = dummy as LogDO; Contract.Assert(logDummy != null); this.Time = logDummy.Time ?? this.Time; this.Table = logDummy.Table ?? this.Table; this.Cpr = logDummy.Cpr ?? this.Cpr; this.Activity = logDummy.Activity ?? this.Activity; }
/// <summary> /// Updates the log with activity registered for the current voter /// </summary> /// <param name="ae">The activity to be logged</param> private void UpdateLog(ActivityEnum ae) { try { //Create the log DAO with setup information, activity and current voter. var ldo = new LogDO(setupInfo.TableNo, currentVoter.PrimaryKey, ae); var ldao = new LogDAO(DigitalVoterList.GetInstanceFromServer(setupInfo.Ip)); ldao.Create(ldo); } catch (Exception) { ConnectionError(); } }