Exemple #1
0
 private void Clear()
 {
     _Id                   = 0;
     _Name                 = string.Empty;
     _ParticipantFrom      = null;
     _ParticipantTo        = null;
     _LogPosition          = 0;
     _PositionUpdateCount  = 0;
     _LastUpdateTime       = DateTime.MinValue;
     _LastUpdateUser       = string.Empty;
     _LastUpdateClientAddr = string.Empty;
 }
Exemple #2
0
        // - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        #region логгер

        //[NonSerialized]
        //private ILog log = LogManager.GetLogger(MethodInfo.GetCurrentMethod().DeclaringType);

        #endregion

        // - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        #region ISyncDataObject Members

        public void Fill(SyncDatabase db, IDataReader reader)
        {
            _Id                  = Convert.ToInt32(reader["ID"]);
            _Name                = Convert.ToString(reader["NAME"]);
            _ParticipantFrom     = SyncParticipant.GetById(Convert.ToInt32(reader["PARTICIPANT_FROM"]), db);
            _ParticipantTo       = SyncParticipant.GetById(Convert.ToInt32(reader["PARTICIPANT_TO"]), db);
            _LogPosition         = Convert.ToInt64(reader["LOG_POSITION"]);
            _PositionUpdateCount = Convert.ToInt32(reader["POSITION_UPD_COUNT"]);
            if (!reader.IsDBNull(reader.GetOrdinal("LAST_UPDATE_TM")))
            {
                _LastUpdateTime = Convert.ToDateTime(reader["LAST_UPDATE_TM"]);
            }
            if (!reader.IsDBNull(reader.GetOrdinal("LAST_UPDATE_USER_ID")))
            {
                _LastUpdateUser = Convert.ToString(reader["LAST_UPDATE_USER_ID"]);
            }
            if (!reader.IsDBNull(reader.GetOrdinal("LAST_UPDATE_CLIENT_ADDR")))
            {
                _LastUpdateClientAddr = Convert.ToString(reader["LAST_UPDATE_CLIENT_ADDR"]);
            }
        }