Example #1
0
 public string SetAppBaseSetting(Models.AppBaseSetting appSet)
 {
     using (var db = new AppDbContext())
     {
         var appBaseSetting = (from a in db.AppBaseSettings select a).Single();
         appBaseSetting.AppName = appSet.AppName;
         appBaseSetting.IsDisplayValidateCodeWithLogin    = appSet.IsDisplayValidateCodeWithLogin;
         appBaseSetting.IsDisplayValidateCodeWithRegister = appSet.IsDisplayValidateCodeWithRegister;
         appBaseSetting.IsAllowLoginAndRegister           = appSet.IsAllowLoginAndRegister;
         appBaseSetting.FootInfo = appSet.FootInfo;
         if (db.SaveChanges() > 0)
         {
             return("数据保存成功.");
         }
         else
         {
             return("数据保存失败.");
         }
     }
 }
Example #2
0
 public static string SetAppBaseSetting(Models.AppBaseSetting appSet)
 {
     return(dal.SetAppBaseSetting(appSet));
 }