📄 usersform.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="usersform.aspx.cs" Inherits="depart_users_usersform" %>
<!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>
<script lang="javascript">
function adduser()
{
var hdn=document.getElementById("HiddenField1");
var urlstr="adduser.aspx?did="+hdn.value;
window.open(urlstr);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<table width=100%>
<tr>
<td>
<div id="btn" runat="server">
<input id="Btn_Add" type="button" value="添加用户" onclick="adduser()" />
</div>
</td>
</tr>
<tr>
<td>
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" PageSize="20" OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
<Columns>
<asp:BoundField DataField="id" HeaderText="id" InsertVisible="False" SortExpression="id" />
<asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
<asp:BoundField DataField="logname" HeaderText="logname" SortExpression="logname" />
<asp:BoundField DataField="password" HeaderText="password" SortExpression="password" />
<asp:BoundField DataField="rolename" HeaderText="rolename" SortExpression="rolename" />
<asp:BoundField DataField="departid" HeaderText="departid" SortExpression="departid" />
<asp:TemplateField AccessibleHeaderText="eidt">
<ItemTemplate>
<a href="adduser.aspx?uid=<%#Eval("id") %>&edit=1" class=link target="_blank" style=" font-size:12px">编辑</a>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="LinkButton2" runat="server" Font-Size=12px CausesValidation="False" CommandName="Select"
OnClientClick='return confirm("这项操作将删除对应的子部门,需慎重考虑,是否继续?");' Text="删除"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
</table>
<div id="norecord" runat="server" visible=false>
<table width=100% style=" border:solid 1px #000000">
<tr>
<td style="text-align: center">
<strong><span style="font-size: 14pt; color: #cc0033; font-family: 宋体">
没有相关记录!</span></strong>
</td>
</tr>
</table>
</div>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:sjglxt %>" SelectCommand="SELECT [user].id, [user].name, [user].logname, [user].password, [user].roleid, [user].departid, [user].authorize, [user].authordepart, role.name AS rolename FROM [user] INNER JOIN role ON [user].roleid = role.roleid WHERE ([user].departid = @id)">
<SelectParameters>
<asp:ControlParameter ControlID="HiddenField1" Name="id" PropertyName="Value" />
</SelectParameters>
</asp:SqlDataSource>
</div>
<asp:HiddenField ID="HiddenField1" runat="server" />
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -