示例#1
0
        private void ResetPortalMenu()
        {
            var pass = GenXmlFunctions.GetField(rpData, "txtclearpass");
            if (pass == StoreSettings.Current.Get("adminpin") && pass != "")
            {
                DataCache.ClearCache();

                var pi = new PluginData(PortalId);
                pi.RemovePortalLevel();

                NBrightBuyUtils.SetNotfiyMessage(ModuleId, "completed", NotifyCode.ok);
            }
            else
            {
                NBrightBuyUtils.SetNotfiyMessage(ModuleId, "nopin", NotifyCode.fail);
            }
        }
示例#2
0
        protected void CtrlItemCommand(object source, RepeaterCommandEventArgs e)
        {
            var cArg = e.CommandArgument.ToString();
            var param = new string[3];
            var pluginData = new PluginData(PortalId);

            switch (e.CommandName.ToLower())
            {
                case "entrydetail":
                    param[0] = "eid=" + cArg;
                    Response.Redirect(NBrightBuyUtils.AdminUrl(TabId, param), true);
                    break;
                case "move":
                    MoveRecord(cArg);
                    Response.Redirect(NBrightBuyUtils.AdminUrl(TabId, param), true);
                    break;
                case "save":
                    if (Utils.IsNumeric(cArg))
                    {
                        pluginData.UpdatePlugin(rpData,Convert.ToInt32(cArg));
                        pluginData.Save();
                    }
                    Response.Redirect(NBrightBuyUtils.AdminUrl(TabId, param), true);
                    break;
                case "add":
                    pluginData.AddNewPlugin();
                    pluginData.Save();
                    param[0] = "";
                    Response.Redirect(NBrightBuyUtils.AdminUrl(TabId, param), true);
                    break;
                case "delete":
                    // NOTE: The delete button cannot work at portal level.  Each plugin must be entered at system level, therefore deleting at portal level has no effect
                    // the plugin is re-entered back into the portal from the system level. (This is CORRECT, pluging needs to be uninstalled to be removed, at portal level we simply hide them)
                    if (Utils.IsNumeric(cArg))
                    {
                        pluginData.RemovePlugin(Convert.ToInt32(cArg));
                        pluginData.Save();
                    }
                    param[0] = "";
                    Response.Redirect(NBrightBuyUtils.AdminUrl(TabId, param), true);
                    break;
                case "resetportal":
                    pluginData.RemovePortalLevel();
                    param[0] = "";
                    Response.Redirect(NBrightBuyUtils.AdminUrl(TabId, param), true);
                    break;
                case "reload":
                    param[0] = "";
                    Response.Redirect(NBrightBuyUtils.AdminUrl(TabId, param), true);
                    break;
                case "return":
                    param[0] = "";
                    Response.Redirect(NBrightBuyUtils.AdminUrl(TabId, param), true);
                    break;
            }
        }