示例#1
0
        private Boolean SaveSetting(CommonUnit.Settings type, String value)
        {
            Setting setting;

            try {
                setting = new Setting();

                setting.Type  = type.ToString();
                setting.Value = value;
                if (!_settingsService.SaveSetting(setting, SessionData.customer.id))
                {
                    base.Log(SessionData.exception);
                    return(false);
                }
            }
            catch (Exception ex) {
                base.Log(ex);
                return(false);
            }
            finally {
            }
            return(true);
        }
        public String GetSettings(Int32 id, CommonUnit.Settings type)
        {
            menuzRusDataContext db = new menuzRusDataContext(base.connectionString);

            return(db.Settings.Where(m => m.CustomerId == id && m.Type == type.ToString()).Select(m => m.Value).FirstOrDefault());
        }