// Token: 0x0600005A RID: 90 RVA: 0x0000820C File Offset: 0x0000640C protected override void View() { if (this.id > 0) { this.channelinfo = DbHelper.ExecuteModel <ChannelInfo>(this.id); } else { this.channelinfo.display = FPUtils.StrToInt(DbHelper.ExecuteMax <ChannelInfo>("display").ToString()) + 1; } if (this.ispost) { this.link = "channelmanage.aspx"; this.channelinfo = FPRequest.GetModel <ChannelInfo>(this.channelinfo); if (this.channelinfo.id > 0) { DbHelper.ExecuteUpdate <ChannelInfo>(this.channelinfo); base.AddMsg("更新频道成功!"); } else { this.channelinfo.id = DbHelper.ExecuteInsert <ChannelInfo>(this.channelinfo); if (this.channelinfo.id > 0 && FPRequest.GetInt("ismenu") == 1) { MenuInfo menuInfo = new MenuInfo(); menuInfo.name = this.channelinfo.name; SqlParam sqlParam = DbHelper.MakeAndWhere("parentid", menuInfo.parentid); menuInfo.display = DbHelper.ExecuteCount <MenuInfo>(new SqlParam[] { sqlParam }) + 1; menuInfo.lefturl = "sorttree.aspx?channelid=" + this.channelinfo.id; menuInfo.id = DbHelper.ExecuteInsert <MenuInfo>(menuInfo); RoleInfo roleInfo = RoleBll.GetRoleInfo(1); RoleInfo roleInfo2 = roleInfo; roleInfo2.menus += ((roleInfo.menus == "") ? menuInfo.id.ToString() : ("," + menuInfo.id)); DbHelper.ExecuteUpdate <RoleInfo>(roleInfo); } base.AddMsg("添加频道成功!"); } } base.SaveRightURL(); }
// Token: 0x06000039 RID: 57 RVA: 0x00005AE8 File Offset: 0x00003CE8 protected override void View() { if (this.id > 0) { this.menuinfo = DbHelper.ExecuteModel <MenuInfo>(this.id); this.parentid = this.menuinfo.parentid; } if (this.ispost) { this.menuinfo = FPRequest.GetModel <MenuInfo>(this.menuinfo); if (this.menuinfo.id > 0) { DbHelper.ExecuteUpdate <MenuInfo>(this.menuinfo); } else { SqlParam sqlParam = DbHelper.MakeAndWhere("parentid", this.menuinfo.parentid); this.menuinfo.display = DbHelper.ExecuteCount <MenuInfo>(new SqlParam[] { sqlParam }) + 1; this.menuinfo.id = DbHelper.ExecuteInsert <MenuInfo>(this.menuinfo); RoleInfo roleInfo = RoleBll.GetRoleInfo(1); RoleInfo roleInfo2 = roleInfo; roleInfo2.menus += ((roleInfo.menus == "") ? this.menuinfo.id.ToString() : ("," + this.menuinfo.id)); DbHelper.ExecuteUpdate <RoleInfo>(roleInfo); base.ResetUser(); } base.Response.Redirect("sysmenumanage.aspx"); } SqlParam sqlParam2 = DbHelper.MakeAndWhere("parentid", 0); OrderByParam orderby = DbHelper.MakeOrderBy("display", OrderBy.ASC); this.menulist = DbHelper.ExecuteList <MenuInfo>(orderby, new SqlParam[] { sqlParam2 }); base.SaveRightURL(); }