コード例 #1
0
        public CsDealDetail[] GetDealDetailsByCategory(int categoryId, bool includeLinkedMenu)
        {
            string cachedKey = string.Format("GetDealDetailsByCategory_{0}", categoryId);
            if (WebSettings.Instance.EnaleCachingMasterData && Cache[cachedKey] != null)
            {
                return (CsDealDetail[])Cache[cachedKey];
            }

            var details = MenuItemProvider.GetInstance(_connectionString).GetDealDetails(categoryId, includeLinkedMenu);
            var items = new CsDealDetail[] { };
            if (details != null)
            {
                items = details.ToArray();
            }
            CacheData(cachedKey, items);
            return items;
        }
コード例 #2
0
 public CsDealDetail SaveDealDetail(CsDealDetail detail)
 {
     return MenuItemProvider.GetInstance(_connectionString).SaveDealDetail(detail);
 }
コード例 #3
0
 public CsDealDetail SaveDealDetail(CsDealDetail detail)
 {
     if (!Authenticate()) return null;
     if (_bzMenuItem == null)
     {
         _bzMenuItem = new MenuBusinessLogic(GetDbConnectionString());
     }
     return _bzMenuItem.SaveDealDetail(detail);
 }