コード例 #1
0
ファイル: UptimeEventType.cs プロジェクト: Confirmit/Portal
        /// <summary>
        /// Статический конструктор.
        /// </summary>
        static UptimeEventType()
        {
            DataTable dt = m_OldDictionaries["UptimeEventTypes"];
            if ((dt == null) || (dt.Rows.Count == 0))
                return;

            foreach (DataRow row in dt.Rows)
            {
                UptimeEventType eventType = new UptimeEventType(row);
                m_EventTypes[eventType.ID] = eventType;
            }
        }
コード例 #2
0
ファイル: UserList.cs プロジェクト: Confirmit/Portal
        /// <summary>
        /// Конструктор с интервалом времени.
        /// </summary>
        /// <param name="userID">ID пользователя.</param>
        /// <param name="userName">Имя пользователя.</param>
        /// <param name="uslName">Трехбуквенный код пользователя.</param>
        /// <param name="eventType">Тип состояние пользователя.</param>
        /// <param name="beginTime">Begin Main work.</param>
        /// <param name="endTime">End Main work.</param>
        public UserStatusInfo( int userID, string userName, string uslName, UptimeEventType eventType,
										DateTime beginTime, DateTime endTime )
        {
            m_UserID = userID;
            if( string.IsNullOrEmpty( userName ) )
                throw new ArgumentNullException( "userName" );
            if( string.IsNullOrEmpty( uslName ) )
                throw new ArgumentNullException( "uslName" );
            if( eventType == null )
                throw new ArgumentNullException( "eventType" );

            m_UserName = userName;
            m_USLName = uslName;
            m_EventType = eventType;
            m_BeginWork = beginTime;
            m_EndWork = endTime;
        }