<%@ Control Language="c#" AutoEventWireup="false" Codebehind="Operater.ascx.cs" Inherits="WebUI.MMS.Operater" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<script language="javascript" type="text/javascript">
<!--
function checkFormAll(chk)
{
	myform = document.forms[0];
	for( var i = 0; i < myform.elements.length; i++ )
	{
		if ( myform.elements[i].type=="checkbox" )
		{
			myform.elements[i].checked = chk;
		}
	}
}

function go(i)
{
	var theform;
	if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
		theform = document.forms["myform2"];
	}
	else {
		theform = document.myform2;
	}
	theform.PageIndex.value = i;
	theform.submit();		
}

//-->
</script>
<FONT face="宋体">
<input type="hidden" name="PageIndex" id="PageIndex" value="<%= this.PageIndex%>">
	<TABLE cellSpacing="0" cellPadding="0" width="98%" align="center">
		<TR>
			<TD class="mframe-t-left"></TD>
			<TD class="mframe-t-mid"><SPAN class="mframe-t-text"><%=this.PageTitle%></SPAN></TD>
			<TD class="mframe-t-right"></TD>
		</TR>
	</TABLE>
<table class="awidth" align="center" cellspacing="0" cellpadding="0">
<tr>
<td class="mframe-m-left"></td>
<td class="mframe-m-mid">

<!--信息编辑 Start-->	
	<asp:Panel id="pnlAdd" runat="server">
		<TABLE id="Table1" cellSpacing="1" cellPadding="3" width="98%" align="center">
			<TR>
				<TD align="right">帐&nbsp;&nbsp;号：</TD>
				<TD>
					<asp:TextBox id="txtUserAccount" width="120" runat="server"></asp:TextBox> <font color="red">*</font></TD>
			</TR>
			<TR>
				<TD align="right">密&nbsp;&nbsp;码：</TD>
				<TD>
					<asp:TextBox id="txtUserPwd" TextMode="Password" width="120" runat="server"></asp:TextBox> <font color="red">*</font></TD>
			</TR>
			<TR>
				<TD align="right">所属部门：</TD>
				<TD>
					<asp:DropDownList id="ddlOrganID" runat="server">
					</asp:DropDownList>
				</TD>
			</TR>
			<TR>
				<TD align="right">超级管理员：</TD>
				<TD>
					<asp:DropDownList ID="ddlManager" Runat="server">
					<asp:ListItem Value="0">否</asp:ListItem>
					<asp:ListItem Value="1">是</asp:ListItem>
					</asp:DropDownList>
					</TD>
			</TR>
			<TR>
				<TD align="right">系统权限：</TD>
				<TD>
					<asp:ListBox id="lstPower" runat="server" Width="230px"  Height="120px" SelectionMode="Multiple" />
				</TD>
			</TR>
			<TR>
				<TD align="right">部门权限：</TD>
				<TD>
					<asp:ListBox id="lstOrganPower" runat="server" Width="230px"  Height="120px" SelectionMode="Multiple" />
				</TD>
			</TR>			
			<TR>
				<TD align="right">栏目权限：</TD>
				<TD>
					<asp:ListBox id="lstClassPower" runat="server" Width="230px"  Height="120px" SelectionMode="Multiple" />
				</TD>
			</TR>			
			<TR>
				<TD align="right">使用状况：</TD>
				<TD>
					<asp:DropDownList id="ddlUserState" runat="server">
						<asp:ListItem Value="0">正 常</asp:ListItem>
						<asp:ListItem Value="1">停 用</asp:ListItem>
					</asp:DropDownList></TD>
			</TR>
			<TR>
				<TD align="right">备&nbsp;&nbsp;&nbsp; 注：</TD>
				<TD>
					<asp:TextBox id="txtUserNote" runat="server" TextMode="MultiLine" Height="100px" Width="350px"></asp:TextBox> <font color="red">*</font></TD>
			</TR>
			<TR>
				<TD align="right"></TD>
				<TD>
					<asp:Button id="Submit1" runat="server" Text="提  交"></asp:Button></TD>
			</TR>
		</TABLE>
	</asp:Panel>
<!--信息编辑 End-->	


<!--修改密码 Start-->		
	<asp:Panel id="pnlPwd" runat="server">
		<TABLE id="Table1" cellSpacing="1" cellPadding="3" width="98%" align="center">
		<TR>
			<TD align="right">旧 密 码：</TD>
			<TD>
				<asp:TextBox id="txtPwd" TextMode="Password" runat="server"></asp:TextBox> <font color="red">*</font></TD>
		</TR>
		<TR>
			<TD align="right">新 密 码：</TD>
			<TD>
				<asp:TextBox id="txtPwd1" TextMode="Password" runat="server"></asp:TextBox> <font color="red">*</font></TD>
		</TR>
		<TR>
			<TD align="right">确认密码：</TD>
			<TD>
				<asp:TextBox id="txtPwd2" TextMode="Password" runat="server"></asp:TextBox> <font color="red">*</font></TD>
		</TR>
		<TR>
			<TD align="right"></TD>
			<TD>
				<asp:Button id="Submit2" runat="server" Text="提  交"></asp:Button></TD>
		</TR>
		</table>	
	</asp:Panel>
<!--修改密码 End-->	

<!--信息列表 Start-->	
<asp:Panel id="pnlList" runat="server">
		<ASP:DataGrid id="DataGrid1" runat="server" Width="100%" OnItemCreated="DataGrid1_ItemCreated"
			CellPadding="0" CellSpacing="0" ItemStyle-CssClass="tdbg"
			DataKeyField="ID" AutoGenerateColumns="false" ShowFooter="false"
			ShowHeader="True" Align="center" AllowPaging="True">
			<PagerStyle Visible="False"/>
			<HeaderStyle HorizontalAlign="center" CssClass="summary-title" Height="25" />
			<ItemStyle Height="22" />
			<EditItemStyle CssClass="tdbg-dark" />
			<Columns>
				<asp:TemplateColumn ItemStyle-Width="10%" ItemStyle-HorizontalAlign="center">
					<ItemTemplate>
						<a href="?mms=<%=Request["mms"]%>&action=edit&id=<%# DataBinder.Eval(Container.DataItem, "ID")%>">修改</a>
					</ItemTemplate>
				</asp:TemplateColumn>
				<asp:BoundColumn HeaderText="序号" DataField="ID" ReadOnly="true">
					<ItemStyle Width="8%" HorizontalAlign="Center"/>
				</asp:BoundColumn>
				<asp:BoundColumn HeaderText="帐 号" DataField="Account" ReadOnly="true">
					<ItemStyle Width="15%" HorizontalAlign="Center"/>
				</asp:BoundColumn>
				<asp:BoundColumn HeaderText="部 门" DataField="OrganName" ReadOnly="true">
					<ItemStyle Width="20%" HorizontalAlign="Center"/>
				</asp:BoundColumn>
				<asp:TemplateColumn ItemStyle-Width="20%" ItemStyle-HorizontalAlign="center" HeaderText="超级管理员">
					<ItemTemplate>
						<%# (DataBinder.Eval(Container.DataItem, "IsManager").ToString() == "1") ? "是" : "否"%>
					</ItemTemplate>
				</asp:TemplateColumn>
				<asp:TemplateColumn ItemStyle-Width="15%" ItemStyle-HorizontalAlign="center" HeaderText="状况">
					<ItemTemplate>
						<%# (DataBinder.Eval(Container.DataItem, "UserState").ToString() == "0") ? "正常" : (DataBinder.Eval(Container.DataItem, "UserState").ToString() == "1") ? "停用" : "已删除"%>
					</ItemTemplate>
				</asp:TemplateColumn>
				<asp:TemplateColumn ItemStyle-Width="10%" ItemStyle-HorizontalAlign="center" HeaderText="<input type='checkbox' onclick='checkFormAll(this.checked)'>">
					<ItemTemplate>
						<input type="checkbox" name="chk" value='<%# DataBinder.Eval(Container.DataItem, "ID")%>' />
					</ItemTemplate>
				</asp:TemplateColumn>
			</Columns>
		</ASP:DataGrid>
		<table width="100%"><tr><td height="25" align="center"><%= this.PageNavigation%></td></tr></table>
	<table align="center" width="100%" height="30">
	<tr><td align="right" width="60px">帐号：</td><td width="40%"><asp:TextBox id="txtName" Width="80px" Runat="server"/> <asp:DropDownList id="ddlOrganList" Runat="server"/> <asp:button id="btnSearch" Text="查 询" Runat="server"></asp:button> </td><td align="right"><input type="button" value="添 加" onclick="location.href='?mms=<%=Request["mms"]%>&action=add'"> &nbsp;&nbsp; <asp:Button ID="btnDelete" Runat="server" OnClick="Delete_OnClick" Text="删 除" /></td></tr></table>				
</asp:Panel>
<!--信息列表 End-->

</td>
<td class="mframe-m-right"></td>
</tr>
</table>

<TABLE cellSpacing="0" cellPadding="0" width="98%" align="center">
	<TR>
		<TD class="mframe-b-left"></TD>
		<TD class="mframe-b-mid">&nbsp;</TD>
		<TD class="mframe-b-right"></TD>
	</TR>
</TABLE>
