예제 #1
0
            internal void GetProducts()
            {
                SqlCommand            retCmd = cmdGetProduct();
                List <SiteMapProduct> xList  = new List <SiteMapProduct>();

                if (SiteMap.Settings.ProductFiltering)
                {
                    retCmd.Parameters["@StoreID"].Value = AppLogic.StoreID();
                }

                Action <System.Data.IDataReader> readEntities = rd =>
                {
                    while (rd.Read())
                    {
                        SiteMapProduct prd = new SiteMapProduct();
                        prd.EntityID      = rd.FieldInt("ProductID");
                        prd.MappingEntity = this.EntityType;
                        prd.Name          = XmlCommon.GetLocaleEntry(rd.Field("Name"), Customer.Current.LocaleSetting, false);
                        prd.SEName        = rd.Field("SEName");
                        xList.Add(prd);
                    }
                };

                DB.UseDataReader(retCmd, readEntities);
                Products = xList.ToArray();
            }
예제 #2
0
 public NestedSiteMapEntity()
 {
     Children = new NestedSiteMapEntity[] { };
     Products = new SiteMapProduct[] { };
 }