Beispiel #1
0
        public DNNGo_ThemePlugin_MenuRowItem UpdatePane(BasePage Context, DNNGo_ThemePlugin_MenuRowItem RowItem)
        {
            RowItem.TagList = WebHelper.GetStringParam(Context.Request, "TagList", RowItem.TagList);
            RowItem.Title   = WebHelper.GetStringParam(Context.Request, "Title", RowItem.Title);
            //RowItem.RowType = WebHelper.GetIntParam(Context.Request, "RowType", 0);
            //RowItem.PaneID = WebHelper.GetIntParam(Context.Request, "PaneID", 0);
            RowItem.Sort = WebHelper.GetIntParam(Context.Request, "Sort", RowItem.Sort);
            //RowItem.TabID = WebHelper.GetIntParam(Context.Request, "EditTabID", 0);


            //绑定菜单
            RowItem.MenuLevel        = WebHelper.GetIntParam(Context.Request, "MenuLevel", RowItem.MenuLevel);
            RowItem.MenuSytle        = WebHelper.GetStringParam(Context.Request, "MenuSytle", RowItem.MenuSytle);
            RowItem.MenuDisplayTitle = WebHelper.GetIntParam(Context.Request, "MenuDisplayTitle", RowItem.MenuDisplayTitle);
            RowItem.MenuID           = WebHelper.GetIntParam(Context.Request, "MenuID", RowItem.MenuID);
            //绑定HTML
            RowItem.HTML_Title   = WebHelper.GetStringParam(Context.Request, "HTML_Title", RowItem.HTML_Title);
            RowItem.HTML_Content = WebHelper.GetStringParam(Context.Request, "HTML_Content", RowItem.HTML_Content);
            //绑定模块
            RowItem.BindModuleID = WebHelper.GetIntParam(Context.Request, "BindModuleID", RowItem.BindModuleID);
            RowItem.BindTabID    = WebHelper.GetIntParam(Context.Request, "BindTabID", RowItem.BindTabID);



            RowItem.LastIP   = WebHelper.UserHost;
            RowItem.LastTime = DateTime.Now;
            RowItem.LastUser = Context.UserId;

            RowItem.Update();

            return(RowItem);
        }
Beispiel #2
0
        public void Execute(BasePage Context)
        {
            JavaScriptSerializer        jsSerializer = new JavaScriptSerializer();
            Dictionary <String, Object> jsonPanes    = new Dictionary <string, Object>();

            Int32 EditTabID = WebHelper.GetIntParam(Context.Request, "EditTabID", 0);
            Int32 PaneID    = WebHelper.GetIntParam(Context.Request, "PaneID", 0);

            Int32   SortCount = 0;
            Boolean Success   = false;

            String SortJson = HttpUtility.UrlDecode(WebHelper.GetStringParam(Context.Request, "SortJson", "[]"));

            if (!String.IsNullOrEmpty(SortJson))
            {
                List <DNNGo_ThemePlugin_MenuPane> SortDicts = SortJson.ToObject <List <DNNGo_ThemePlugin_MenuPane> >();
                if (SortDicts != null && SortDicts.Count > 0)
                {
                    foreach (var SortDict in SortDicts)
                    {
                        if (PaneID > 0)
                        {
                            //设置的是行记录的排序

                            if (DNNGo_ThemePlugin_MenuRowItem.Update(new string[] { "Sort", "PaneID" }, new object[] { SortDict.Sort, PaneID }, new string[] { "ID" }, new object[] { SortDict.ID }) > 0)
                            {
                                SortCount++;
                            }
                        }
                        else
                        {
                            //设置的是列的排序
                            if (DNNGo_ThemePlugin_MenuPane.Update(String.Format("{0}={1}", DNNGo_ThemePlugin_MenuPane._.Sort, SortDict.Sort), String.Format("{0}={1}", DNNGo_ThemePlugin_MenuPane._.ID, SortDict.ID)) > 0)
                            {
                                SortCount++;
                            }
                        }
                        if (SortCount > 0)
                        {
                            Success = true;
                        }
                    }
                }
            }

            jsonPanes.Add("SortCount", SortCount);
            jsonPanes.Add("Success", Success);


            //转换数据为json
            ResponseString = jsSerializer.Serialize(jsonPanes);
        }