예제 #1
0
 // Token: 0x06000078 RID: 120 RVA: 0x0000AAF4 File Offset: 0x00008CF4
 protected override void View()
 {
     this.channellist = ChannelBll.GetChannelList();
     if (this.channelid == 0 && this.channellist.Count > 0)
     {
         this.channelid = this.channellist[0].id;
     }
     if (this.ispost)
     {
         if (!this.isperm)
         {
             this.ShowErr("对不起,您没有权限操作。");
             return;
         }
         int @int = FPRequest.GetInt("id");
         if (this.action.Equals("delete"))
         {
             SortInfo sortInfo = DbHelper.ExecuteModel <SortInfo>(@int);
             if (DbHelper.ExecuteDelete <SortInfo>(@int) > 0)
             {
                 StringBuilder stringBuilder = new StringBuilder();
                 stringBuilder.AppendFormat("DELETE FROM [{0}WMS_SortInfo] WHERE [id] IN (SELECT [id] FROM [{0}WMS_SortInfo]  WHERE [parentlist] LIKE '{1},%');", DbConfigs.Prefix, sortInfo.parentlist);
                 stringBuilder.AppendFormat("UPDATE [{0}WMS_SortInfo] SET [subcounts]=[subcounts]-1 WHERE [id]={1};", DbConfigs.Prefix, sortInfo.parentid);
                 DbHelper.ExecuteSql(stringBuilder.ToString());
             }
         }
         FPCache.Remove("FP_SORTTREE" + this.channelid.ToString());
         base.Response.Redirect("sortmanage.aspx?channelid=" + this.channelid);
     }
     this.sortlist = SortBll.GetSortList(this.channelid, 0);
     base.SaveRightURL();
 }
예제 #2
0
 // Token: 0x0600009F RID: 159 RVA: 0x0000D124 File Offset: 0x0000B324
 protected override void View()
 {
     this.roleinfo = DbHelper.ExecuteModel <RoleInfo>(this.rid);
     if (this.roleinfo.id == 0)
     {
         this.ShowErr("对不起,该角色不存在或已被删除。");
     }
     else
     {
         if (this.ispost)
         {
             string   @string = FPRequest.GetString("sorts");
             string   text    = "";
             string[] array   = FPUtils.SplitString(@string);
             int      i       = 0;
             while (i < array.Length)
             {
                 string text2 = array[i];
                 if (text != "")
                 {
                     text += ",";
                 }
                 if (text2.Length > 1)
                 {
                     if (FPUtils.StrToInt(text2.Substring(1, text2.Length - 1)) != 0)
                     {
                         text += text2.Substring(1, text2.Length - 1);
                     }
                 }
                 //IL_E4:
                 i++;
                 //continue;
                 //goto IL_E4;
             }
             this.roleinfo.sorts = text;
             DbHelper.ExecuteUpdate <RoleInfo>(this.roleinfo);
             if (this.roleinfo.id == this.roleid)
             {
                 base.ResetUser();
             }
             base.Response.Redirect(this.pagename + "?rid=" + this.rid);
         }
         List <ChannelInfo> channelList = ChannelBll.GetChannelList();
         foreach (ChannelInfo channelInfo in channelList)
         {
             if (this.zNodes != "")
             {
                 this.zNodes += ",";
             }
             object obj = this.zNodes;
             this.zNodes = string.Concat(new object[]
             {
                 obj,
                 "{ id: ",
                 channelInfo.id,
                 "0, pId: 0, name: \"",
                 channelInfo.name,
                 "\",open:true, icon: \"",
                 this.webpath,
                 (this.sysconfig.adminpath == "") ? "" : (this.sysconfig.adminpath + "/"),
                 "images/sysmenu1.gif\" }"
             });
             string sortTree = this.GetSortTree(channelInfo.id, 0);
             if (sortTree != "")
             {
                 this.zNodes = this.zNodes + "," + sortTree;
             }
         }
         base.SaveRightURL();
     }
 }