/// <Description>
        /// 拼接数据项的设置参数
        /// </Description>
        /// <returns></returns>
        public String SetItemSettings()
        {
            //获取效果参数
            List <SettingEntity>  ItemSettingDB = Setting_ItemSettingDB;
            List <KeyValueEntity> list          = new List <KeyValueEntity>();

            if (ItemSettingDB != null && ItemSettingDB.Count > 0)
            {
                ControlHelper ControlItem = new ControlHelper(ModuleId);

                foreach (SettingEntity ri in ItemSettingDB)
                {
                    KeyValueEntity item = new KeyValueEntity();
                    item.Key   = ri.Name;
                    item.Value = ControlHelper.GetWebFormValue(ri, this);
                    list.Add(item);
                }
            }
            return(ConvertTo.Serialize <List <KeyValueEntity> >(list));
        }
Beispiel #2
0
        /// <summary>
        /// 保存需要提示的内容
        /// </summary>
        public void Put()
        {
            if (!String.IsNullOrEmpty(_Content))
            {
                //将当前的内容序列化到个人缓存

                String s = ConvertTo.Serialize <MessageTips>((MessageTips)this);
                //如果有Session的话需要先清除
                if (HttpContext.Current.Session[SessionName()] != null)
                {
                    HttpContext.Current.Session.Remove(SessionName());
                }
                //增加当前序列化的内容到Session
                HttpContext.Current.Session.Add(SessionName(), s);
            }
            //跳转
            if (!String.IsNullOrEmpty(_GoUrl))
            {
                HttpContext.Current.Response.Redirect(_GoUrl, true);
            }
        }
Beispiel #3
0
        /// <summary>
        /// 读取XML参数
        /// </summary>
        /// <param name="Name">参数名</param>
        /// <param name="DefaultValue">默认值</param>
        /// <returns></returns>
        public object ViewXmlSetting(String Name, object DefaultValue)
        {
            String SettingKey = EffectSettingsFormat(Settings_EffectName, Name);

            return(PowerForms_Settings[SettingKey] != null?ConvertTo.FormatValue(PowerForms_Settings[SettingKey].ToString(), DefaultValue.GetType()) : DefaultValue);
        }
Beispiel #4
0
 /// <summary>
 /// 读取参数
 /// </summary>
 /// <param name="Name">参数名</param>
 /// <param name="DefaultValue">默认值</param>
 /// <returns></returns>
 public object ViewSetting(String Name, object DefaultValue)
 {
     return(Settings[Name] != null?ConvertTo.FormatValue(Settings[Name].ToString(), DefaultValue.GetType()) : DefaultValue);
 }