コード例 #1
0
        protected override object this[string index]
        {
            get
            {
                #region
                switch (index)
                {
                case "UserId": return(_userId);

                case "RefreshDate": return(_refreshDate);

                case "RestrainProperty": return(_restrainProperty);

                default: throw new ArgumentException(string.Format("UserDailyRestrain index[{0}] isn't exist.", index));
                }
                #endregion
            }
            set
            {
                #region
                switch (index)
                {
                case "UserId":
                    _userId = value.ToInt();
                    break;

                case "RefreshDate":
                    _refreshDate = value.ToDateTime();
                    break;

                case "RestrainProperty":
                    _restrainProperty = ConvertCustomField <RestrainProperty>(value, index);
                    break;

                default: throw new ArgumentException(string.Format("UserDailyRestrain index[{0}] isn't exist.", index));
                }
                #endregion
            }
        }
コード例 #2
0
 /// <summary>
 /// </summary>
 public UserDailyRestrain()
     : base(false)
 {
     RestrainProperty = new RestrainProperty();
 }        
コード例 #3
0
ファイル: UserDailyRestrain.cs プロジェクト: isoundy000/mmddz
 /// <summary>
 /// </summary>
 public UserDailyRestrain()
     : base(false)
 {
     RestrainProperty = new RestrainProperty();
 }
コード例 #4
0
ファイル: UserDailyRestrain.cs プロジェクト: kehaoran74/Scut
 /// <summary>
 /// </summary>
 public UserDailyRestrain(int userId)
     : this()
 {
     _userId = userId;
     _restrainProperty = new RestrainProperty();
 }
コード例 #5
0
ファイル: UserDailyRestrain.cs プロジェクト: kehaoran74/Scut
 protected override object this[string index]
 {
     get
     {
         #region
         switch (index)
         {
             case "UserId": return _userId;
             case "RefreshDate": return _refreshDate;
             case "RestrainProperty": return _restrainProperty;
             default: throw new ArgumentException(string.Format("UserDailyRestrain index[{0}] isn't exist.", index));
         }
         #endregion
     }
     set
     {
         #region
         switch (index)
         {
             case "UserId":
                 _userId = value.ToInt();
                 break;
             case "RefreshDate":
                 _refreshDate = value.ToDateTime();
                 break;
             case "RestrainProperty":
                 _restrainProperty = ConvertCustomField<RestrainProperty>(value, index);
                 break;
             default: throw new ArgumentException(string.Format("UserDailyRestrain index[{0}] isn't exist.", index));
         }
         #endregion
     }
 }
コード例 #6
0
 /// <summary>
 /// </summary>
 public UserDailyRestrain(int userId)
     : this()
 {
     _userId           = userId;
     _restrainProperty = new RestrainProperty();
 }