码迷,mamicode.com
首页 > 其他好文 > 详细

ERP权限系统(七)

时间:2016-10-09 23:20:51      阅读:276      评论:0      收藏:0      [点我收藏+]

标签:

添加链接权限的字段:

                //权限管理
                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 

 

ERP权限系统(七)

标签:

原文地址:http://www.cnblogs.com/sunliyuan/p/5944102.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!