标签:
添加链接权限的字段:
//权限管理 n.Target = "MainFrame"; //折叠 TreeView1.Nodes.Add(n); n.Expanded = false;
页面设计:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserRightManger.aspx.cs" Inherits="BioErpWeb.HRSystem.UserRightManger" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <link href="../Styles/ERPBaseStyle.css" rel="stylesheet" type="text/css" /> </head> <body> <form id="form1" runat="server"> <div> <div> <asp:Panel ID="Panel1" runat="server" CssClass="pLogo"> <table class="tb_mess"> <thead class="name"><caption>权限信息添加</caption></thead> <tr> <td>权限名</td><td> <asp:TextBox ID="txtRightName0" runat="server"></asp:TextBox></td> </tr> <tr> <td>备注</td><td> <asp:TextBox ID="txtReMark0" runat="server"></asp:TextBox></td> </tr> <tr> <td colspan="2" class="bottomtd"> <asp:Button ID="btnAdd" runat="server" Text="提交" /></td> </tr> </table> </asp:Panel> </div> <div> <asp:Panel ID="Panel2" runat="server" CssClass="pLogo"> <table class="tb_mess"> <thead class="name"><caption>权限信息编辑</caption></thead> <tr> <td>权限名</td><td> <asp:TextBox ID="txtRightName1" runat="server"></asp:TextBox></td> </tr> <tr> <td>备注</td><td> <asp:TextBox ID="txtReMark1" runat="server"></asp:TextBox></td> </tr> <tr> <td colspan="2" class="bottomtd"> <asp:Button ID="btnUpdate" runat="server" Text="提交" /></td> </tr> </table> </asp:Panel> </div> <table class="maintable"> <tr> <td class="titlebar"> 权限管理系统 </td> </tr> <tr> <td> </td> </tr> <tr> <td> <asp:GridView ID="GridView1" AutoGenerateColumns="false" runat="server"> </asp:GridView> </td> </tr> </table> </div> </form> </body> </html>
权限的添加和修改的存储过程:
ALTER PROCEDURE [dbo].[tbRight_ADD] @RightName nvarchar(50), @ReMark nvarchar(50) AS INSERT INTO [tbRight]( [RightName],[ReMark] )VALUES( @RightName,@ReMark ) --------修改----- ALTER PROCEDURE [dbo].[tbRight_Update] @ID int, @RightName nvarchar(50), @ReMark nvarchar(50) AS UPDATE [tbRight] SET [RightName] = @RightName,[ReMark] = @ReMark WHERE ID=@ID
标签:
原文地址:http://www.cnblogs.com/sunliyuan/p/5944102.html