public static void ResequenceRecords()
        {
            var objCtrl = new NBrightBuyController();
            var pdata   = PluginUtils.GetPluginList();
            var lp      = 0;

            foreach (var p in pdata)
            {
                p.SetXmlProperty("genxml/hidden/index", lp.ToString(), TypeCode.Double);
                objCtrl.Update(p);
                lp += 1;
            }
        }
Exemple #2
0
 public PluginData(int portalId, bool usecache = true)
 {
     _cachekey = "pluginlist" + portalId;
     if (usecache)
     {
         var pList = NBrightBuyUtils.GetCache(_cachekey);
         if (pList != null)
         {
             _pluginList = (List <NBrightInfo>)pList;
         }
         // if we have zero plugins, try and reload
         if (pList == null || !_pluginList.Any())
         {
             _pluginList = PluginUtils.GetPluginList(portalId);
             NBrightBuyUtils.SetCache(_cachekey, _pluginList);
         }
     }
     else
     {
         _pluginList = PluginUtils.GetPluginList(portalId);
     }
 }