📄 userlist.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/HT.master" CodeFile="userlist.aspx.cs" Inherits="userlist" %>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder2">
<script language="javascript" type="text/javascript">
function quanxuan(cboTitle){
var chk=document.getElementsByTagName("input");
for(i=0;i<chk.length;i++){
if(chk[i].type=='checkbox'){
chk[i].checked=cboTitle.checked;
}
}
}
function qy()
{
return confirm('确定要启用所选用户吗?');
}
function jz()
{
return confirm('确定要禁止所选用户吗?');
}
function del()
{
return confirm('确定删除用户吗?');
}
</script>
<div id="div_bg" style="z-index: 101; left: 20px; width: 800px; position: absolute;
top: -3px; height: 600px">
<table style="width:800px;">
<tr class="category">
<td align="center" valign="middle"><span style="color:Gray; font-size:12px;">用户列表:</span></td>
</tr>
<tr><td>
<center>
<table style="width:785px;">
<tr class="category">
<td style="width: 785px" align="left" valign="baseline" colspan="10" class="t_number">
<span style=" color:Gray;">
<asp:DropDownList ID="ddlstUsertype" runat="server" Width="71px" DataSourceID="objRole" DataTextField="Name" DataValueField="Id" AutoPostBack="True" OnSelectedIndexChanged="ddlstUsertype_SelectedIndexChanged" >
</asp:DropDownList><asp:ObjectDataSource ID="objRole" runat="server" SelectMethod="selRole"
TypeName="CommBLL.SelDataSouce"></asp:ObjectDataSource>
<asp:Button ID="btnMonry" runat="server" Text="启动用户" Height="20px" OnClick="btnMonry_Click" OnClientClick="return qy()"/>
<asp:Button ID="btndate" runat="server" Text="禁止用户" Height="20px" OnClientClick="return jz()" OnClick="btndate_Click"/></span>
</td>
</tr>
<tr class="t3">
<td style="width: 50px;height: 16px;">
<input type="checkbox" id="cboTitle" onclick="quanxuan(this)"/>全选
</td>
<td style="width: 60px;height: 16px;">
用户名</td>
<td style=" width: 60px;height: 16px;">
姓名</td>
<td style="width: 60px; height: 16px;">
密码</td>
<td style="width: 150px; height: 16px;">
地址</td>
<td style="width: 72px;height: 16px;">
联系电话
</td>
<td style="width: 80px; height: 16px;">
电子邮箱</td>
<td style="width: 50px; height: 16px;">
角色
</td>
<td style=" width: 50px;height: 16px;">
状态</td>
<td style="width: 78px; height: 16px;">
操作</td>
</tr>
<tr>
<td colspan="10">
<span style="margin:0px 0px 0px 0px">
<asp:GridView ID="gdvUserinfo" runat="server" Width="785px" AutoGenerateColumns="False" ShowHeader="False" >
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="ckb" runat="server" TextAlign="Left" Width="50px" />
<asp:HiddenField ID="HiddenField1" runat="server" Value='<%#Eval("Id") %>' />
</ItemTemplate>
<ItemStyle Width="50px" />
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton ID="btnUserLoginName" runat="server" Width="60px"><%#Eval("LoginId") %></asp:LinkButton>
</ItemTemplate>
<ItemStyle Width="60px" />
</asp:TemplateField>
<asp:BoundField HtmlEncode="False" InsertVisible="False" ShowHeader="False" DataField="Name" >
<ItemStyle Width="60px" />
</asp:BoundField>
<asp:BoundField DataField="LoginPwd" >
<ItemStyle Width="60px" />
</asp:BoundField>
<asp:BoundField DataField="Address" >
<ItemStyle Width="150px" />
</asp:BoundField>
<asp:BoundField DataField="Phone" >
<ItemStyle Width="72px" />
</asp:BoundField>
<asp:BoundField DataField="Mail" >
<ItemStyle Width="80px" />
</asp:BoundField>
<asp:TemplateField>
<ItemTemplate>
<asp:Label ID="lblRole" runat="server" Text='<%#Eval("Role.Name") %>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="50px" />
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Label ID="lblState" runat="server" Text='<%#Eval("State.Name") %>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="50px" />
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Button ID="Button1" runat="server" Text="详细" CommandArgument='<%#Eval("Id")%>' CommandName="XX" OnCommand="Button1_Command"/>
<asp:Button ID="Button2" runat="server" Text="删除" OnClientClick="return del()" CommandArgument='<%#Eval("Id")%>' CommandName="del" OnCommand="Button2_Command"/>
</ItemTemplate>
<ItemStyle Width="78px" />
</asp:TemplateField>
</Columns>
</asp:GridView>
</span>
</td>
</tr>
<tr>
<td style="width: 750px; height: 20px;" align="right" valign="middle" class="t_number" colspan="10">
<asp:ImageButton ID="btnFirst" runat="server" OnClick="btnFirst_Click" ImageUrl="~/image/_firstpg.gif" Height="18px"/>
<asp:ImageButton ID="ImageButton2" runat="server" OnClick="ImageButton2_Click" ImageUrl="~/image/_prevpg.gif" Height="18px"/>
<asp:ImageButton ID="btnNext" runat="server" OnClick="btnNext_Click" ImageUrl="~/image/_nextpg.gif" Height="18px"/>
<asp:ImageButton ID="btnLast" runat="server" OnClick="btnLast_Click" ImageUrl="~/image/_lastpg.gif" Height="18px"/>
当前页:<asp:Label ID="lblCruutPager" runat="server" Text="1"></asp:Label>
共记
<asp:Label ID="lblcountPager" runat="server" Text="0"></asp:Label>
页 跳转到第
<asp:TextBox ID="txtPage" runat="server" Height="16px" Width="34px"></asp:TextBox>
页
<asp:Button ID="btnpage" runat="server" Text="确定" Height="20px" OnClick="btnpage_Click" />
</td>
</tr>
</table>
</center> </td></tr>
</table>
</div>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -