private NBrightInfo CreateSettingsInfo(String moduleid, NBrightInfo nbi) { var objCtrl = new NBrightBuyController(); nbi = objCtrl.GetByType(PortalSettings.Current.PortalId, Convert.ToInt32(moduleid), "SETTINGS"); if (nbi == null) { nbi = new NBrightInfo(true); // populate empty XML so we can update nodes. nbi.GUIDKey = ""; nbi.PortalId = PortalSettings.Current.PortalId; nbi.ModuleId = Convert.ToInt32(moduleid); nbi.TypeCode = "SETTINGS"; nbi.Lang = ""; } //rebuild xml nbi.ModuleId = Convert.ToInt32(moduleid); nbi.GUIDKey = Utils.GetUniqueKey(10); nbi.SetXmlProperty("genxml/hidden/modref", nbi.GUIDKey); return(nbi); }