Beispiel #1
0
        public DateTime?GetDateTimeByName(string name)
        {
            AccountSetting setting = Items.FirstOrDefault(s => s.Name == name && s.IsActive);

            if (setting != null)
            {
                return(Convert.ToDateTime(setting.Value));
            }
            return(null);
        }
Beispiel #2
0
        public bool?GetBoolByName(string name)
        {
            AccountSetting setting = Items.FirstOrDefault(s => s.Name == name && s.IsActive);

            if (setting != null)
            {
                return(Convert.ToBoolean(setting.Value));
            }
            return(null);
        }
Beispiel #3
0
        public string GetStringByName(string name)
        {
            AccountSetting setting = Items.FirstOrDefault(s => s.Name == name && s.IsActive);

            if (setting != null)
            {
                return(setting.Value);
            }
            return(null);
        }
Beispiel #4
0
 public AccountSetting(AccountSetting accountSetting)
 {
     Name        = accountSetting.Name;
     Value       = accountSetting.Value;
     Application = accountSetting.Application;
     CreateDate  = accountSetting.CreateDate;
     CreateUser  = accountSetting.CreateUser;
     UpdateDate  = accountSetting.UpdateDate;
     UpdateUser  = accountSetting.UpdateUser;
     IsActive    = accountSetting.IsActive;
 }