示例#1
0
 public void SetNameValue(string name, string value)
 {
     Settings s = sd.GetModel(name);
     if (s == null)
     {
         s = new Settings();
         s.Name = name;
         s.Value = value;
         dal.Add(s);
     }
     else
     {
         s.Value = value;
         dal.Update(s);
     }
     HttpRuntime.Cache["setting_" + name] = value;
 }
示例#2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(BookShop.Model.Settings model)
 {
     return(dal.Update(model));
 }
示例#3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(BookShop.Model.Settings model)
 {
     return(dal.Add(model));
 }