<%@ Page Language="C#" Inherits="SiteServer.BackgroundPages.BackgroundMachine" %>
<%@ Register TagPrefix="bairong" Namespace="BaiRong.Controls" Assembly="BaiRong.Controls" %>
<%@ Register TagPrefix="user" Namespace="UserCenter.Controls" Assembly="UserCenter.Pages" %>
<%@ Register TagPrefix="site" Namespace="SiteServer.Controls" Assembly="SiteServer.Controls" %>

<html>
<head>
<!--#include file="../inc/html_head.inc"-->
<user:custom type="style" runat="server"></user:custom>

<bairong:Code type="Prototype" runat="server" />
<bairong:Code type="Scriptaculous" runat="server" />

<meta http-equiv="content-type" content="text/html;charset=gb2312">
</head>
<body>
<user:custom type="showpopwin" runat="server" />

<form id="myForm" runat="server">
<bairong:Message runat="server"></bairong:Message>

<DIV class="column">
<div class="columntitle"><asp:Literal ID="Literal_ServiceName" runat="server"></asp:Literal>服务器管理</div>

		<ASP:DataGrid id="MyDataGrid" runat="server"
			Width="100%"
			Align="center"
			ShowHeader="true"
			ShowFooter="false"
			CellPadding="2"
			BorderWidth="0"
AutoGenerateColumns="false"
			DataKeyField="MachineName"
			OnItemDataBound="MyDataGrid_ItemBound"
			HeaderStyle-CssClass="summary-title"
			ItemStyle-CssClass="tdbg"
			CellSpacing="2" >
		<HeaderStyle HorizontalAlign="center" Height="25" />
		<ItemStyle Height="25"/>

		<Columns>
			<asp:TemplateColumn HeaderText="所属站点">
				<ItemTemplate>
					<%# GetSiteHtml((int)DataBinder.Eval(Container.DataItem,"PublishmentSystemID"))%>
				</ItemTemplate>
				<ItemStyle Width="160" HorizontalAlign="left" />
			</asp:TemplateColumn>
			<asp:BoundColumn
				HeaderText="服务器名称"
				DataField="MachineName" >
				<ItemStyle HorizontalAlign="left" />
			</asp:BoundColumn>
			<asp:TemplateColumn HeaderText="连接方式">
				<ItemTemplate>
					<%# GetConnectionType((string)DataBinder.Eval(Container.DataItem,"ConnectionType"))%>
				</ItemTemplate>
				<ItemStyle Width="120" HorizontalAlign="center" />
			</asp:TemplateColumn>
			<asp:TemplateColumn HeaderText="是否启用">
				<ItemTemplate>
					<%# GetIsEnabledHtml((string)DataBinder.Eval(Container.DataItem,"MachineName"), (int)DataBinder.Eval(Container.DataItem,"PublishmentSystemID"), (string)DataBinder.Eval(Container.DataItem,"IsEnabled"))%>
				</ItemTemplate>
				<ItemStyle Width="60" HorizontalAlign="center" />
			</asp:TemplateColumn>
			<asp:TemplateColumn>
				<ItemTemplate>
					<%# GetEditHtml((string)DataBinder.Eval(Container.DataItem,"MachineName"), (int)DataBinder.Eval(Container.DataItem,"PublishmentSystemID"))%>
				</ItemTemplate>
				<ItemStyle Width="50" HorizontalAlign="center" />
			</asp:TemplateColumn>
			<asp:TemplateColumn>
				<ItemTemplate>
					<%# GetTestHtml((string)DataBinder.Eval(Container.DataItem,"MachineName"), (int)DataBinder.Eval(Container.DataItem,"PublishmentSystemID"), (string)DataBinder.Eval(Container.DataItem,"IsEnabled"))%>
				</ItemTemplate>
				<ItemStyle Width="50" HorizontalAlign="center" />
			</asp:TemplateColumn>
			<asp:TemplateColumn>
				<ItemTemplate>
					<%# GetEnabledHtml((string)DataBinder.Eval(Container.DataItem,"MachineName"), (int)DataBinder.Eval(Container.DataItem,"PublishmentSystemID"), (string)DataBinder.Eval(Container.DataItem,"IsEnabled"))%>
				</ItemTemplate>
				<ItemStyle Width="40" HorizontalAlign="center" />
			</asp:TemplateColumn>
			<asp:TemplateColumn>
				<ItemTemplate>
					<%# GetDeleteHtml((string)DataBinder.Eval(Container.DataItem,"MachineName"), (int)DataBinder.Eval(Container.DataItem,"PublishmentSystemID"))%>
				</ItemTemplate>
				<ItemStyle Width="40" HorizontalAlign="center" />
			</asp:TemplateColumn>
		</Columns>
	</ASP:DataGrid>

	
</DIV>

<table width="95%" align="center">
  <tr>
    <td align="right"><table cellpadding="0" cellspacing="0" width="100%">
      <tr>
        <td>
			<asp:Button class="button" id="AddMachine" Text="添加服务器" runat="server" />
		</td>
      </tr>
    </table></td>
  </tr>
</table>
</form>

</body>
</html>