/// <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)); }
/// <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); } }