Example #1
0
        private bool LoadByPrimaryKeyDynamic(System.Int32 storeId, System.String name)
        {
            StoreSettingQuery query = new StoreSettingQuery();

            query.Where(query.StoreId == storeId, query.Name == name);
            return(this.Load(query));
        }
Example #2
0
        protected void InitQuery(StoreSettingQuery query)
        {
            query.OnLoadDelegate = this.OnQueryLoaded;

            if (!query.es2.HasConnection)
            {
                query.es2.Connection = ((IEntityCollection)this).Connection;
            }
        }
Example #3
0
        private void LoadSettings()
        {
            var q = new StoreSettingQuery();

            q.Select(q.Name, q.Value);
            q.Where(q.StoreId == this.Id.Value);

            Dictionary <string, string> dict = new Dictionary <string, string>();

            using (IDataReader reader = q.ExecuteReader())
            {
                while (reader.Read())
                {
                    dict[reader.GetString(0)] = reader.GetString(1);
                }
                reader.Close();
            }

            this.settings = dict;
        }
Example #4
0
 public bool Load(StoreSettingQuery query)
 {
     this.query = query;
     InitQuery(this.query);
     return(Query.Load());
 }