<%@ Control Language="c#" AutoEventWireup="false" Codebehind="SystemLog.ascx.cs" Inherits="WebUI.MMS.SystemLog" 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();		
}

function SelectDate(DivID)
{
     var fullPath="calendar/PopDate.Htm";
     var strDate;	//Chinese date formate
     var intDate;	//Integer date formate
     var objEffectDate=eval("myform2." + DivID);
     intDate=showModalDialog(fullPath,window,"dialogWidth=360px;dialogHeight=310px;center=yes;border=this;help=no");
     if (intDate!=null)
     {
         objEffectDate.value=intDate.substr(0,4)+"-"+intDate.substr(5,2)+"-"+intDate.substr(8,2);
         if (objEffectDate.value!="undefined")
         {
             strDate=intDate.substr(0,4)+"-"+intDate.substr(5,2)+"-"+intDate.substr(8,2);
             objEffectDate.value=strDate;
         }
         else
         {
             objEffectDate.value="";
         }
     }
     event.returnValue =false;
}
//-->
</script>
<FONT face="宋体"><input id="PageIndex" type="hidden" value="0" name="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">
		<TBODY>
			<tr>
				<td class="mframe-m-left" width="1">
				</td>
				<td class="mframe-m-mid">
					<asp:Panel id="pnlAdd" runat="server">
						<TABLE id="Table1" cellSpacing="1" cellPadding="3" width="98%" align="center">
							<TR>
								<TD align="right"><FONT face="宋体">短信分类ID</FONT>：</TD>
								<TD>
									<asp:TextBox id="txtID" runat="server"></asp:TextBox></TD>
							</TR>
							<TR>
								<TD align="right"><FONT face="宋体">分类描述</FONT>：</TD>
								<TD>
									<asp:TextBox id="txtDesc" runat="server" Height="100" Width="300" TextMode="MultiLine"></asp:TextBox></TD>
							</TR>
							<TR>
								<TD style="HEIGHT: 12px" align="right"><FONT face="宋体">状态</FONT>：</TD>
								<TD style="HEIGHT: 12px">
									<asp:DropDownList id="ddlState" runat="server">
										<asp:ListItem Value="0">正常</asp:ListItem>
										<asp:ListItem Value="1">停用</asp:ListItem>
										<asp:ListItem Value="2">已删除</asp:ListItem>
									</asp:DropDownList></TD>
							</TR>
							<TR>
								<TD align="right"></TD>
								<TD>
									<asp:Button id="Submit" runat="server" Text="提  交"></asp:Button></TD>
							</TR>
						</TABLE>
					</asp:Panel>
</FONT>
<asp:Panel id="pnlList" runat="server">
	<asp:Label id="label" style="TEXT-ALIGN: center" runat="server" width="100%" Visible="False"></asp:Label>
	<ASP:DataGrid id="DataGrid1" runat="server" Width="100%" Align="center" ShowHeader="True" ShowFooter="false"
		AutoGenerateColumns="false" AllowPaging="True" DataKeyField="ID" ItemStyle-CssClass="tdbg"
		CellSpacing="0" CellPadding="0" OnItemDataBound="DataGrid1_ItemDataBound" OnItemCreated="DataGrid1_ItemCreated">
		<PagerStyle Visible="False" />
		<HeaderStyle HorizontalAlign="center" CssClass="summary-title" Height="25" />
		<ItemStyle Height="22" />
		<EditItemStyle CssClass="tdbg-dark" />
		<Columns>
			<asp:BoundColumn HeaderText="序号" DataField="ID" ReadOnly="true">
				<ItemStyle HorizontalAlign="Center" Width="10%" />
			</asp:BoundColumn>
			<asp:BoundColumn HeaderText="描述" DataField="Content" ReadOnly="true">
				<ItemStyle Width="30%" />
			</asp:BoundColumn>
			<asp:BoundColumn HeaderText="操作员" DataField="UserName" ReadOnly="true">
				<ItemStyle HorizontalAlign="Center" Width="20%" />
			</asp:BoundColumn>
			<asp:BoundColumn HeaderText="部门" DataField="OrganName" ReadOnly="true">
				<ItemStyle HorizontalAlign="Center" Width="20%" />
			</asp:BoundColumn>
			<asp:BoundColumn HeaderText="创建日期" DataField="ActDatetime" ReadOnly="true">
				<ItemStyle HorizontalAlign="Center" Width="20%" />
			</asp:BoundColumn>
			<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 align="center" height="25"><%= this.PageNavigation%></TD>
		</TR>
	</TABLE>
	<TABLE height="30" width="100%" align="center">
		<TR>
			<TD align="right" width="50">关键字：</TD>
			<TD width="80">
				<asp:TextBox id="txtKeyword" Width="80px" Runat="server"></asp:TextBox></TD>
			<TD align="right" width="40">日期：</TD>
			<TD width="120">
				<asp:TextBox onkeypress="SelectDate('_ctl0_txtDate')" id="txtDate" onclick="SelectDate('_ctl0_txtDate')"
					Width="100px" Runat="server"></asp:TextBox></TD>
			<TD>
				<asp:Button id="btnSearch" Text="查 询" Runat="server"></asp:Button></TD>
			<TD align="right">
				<asp:Button id="btnDelete" onclick="Delete_OnClick" Text="删除所选" Visible="True" Runat="server"></asp:Button>&nbsp;&nbsp;
				<asp:Button id="btnDeleteAll" onclick="DeleteAll_OnClick" Text="全部删除" Visible="True" Runat="server"></asp:Button></TD>
		</TR>
	</TABLE>
</asp:Panel></TD>
<td class="mframe-m-right" width="1">
</td>
</TR></TBODY></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>
</FONT>
