Exemple #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
            }
        }
 /// <summary>
 /// </summary>
 public UserDailyRestrain()
     : base(false)
 {
     RestrainProperty = new RestrainProperty();
 }        
 /// <summary>
 /// </summary>
 public UserDailyRestrain()
     : base(false)
 {
     RestrainProperty = new RestrainProperty();
 }
Exemple #4
0
 /// <summary>
 /// </summary>
 public UserDailyRestrain(int userId)
     : this()
 {
     _userId = userId;
     _restrainProperty = new RestrainProperty();
 }
Exemple #5
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
     }
 }
Exemple #6
0
 /// <summary>
 /// </summary>
 public UserDailyRestrain(int userId)
     : this()
 {
     _userId           = userId;
     _restrainProperty = new RestrainProperty();
 }