<%@ Page Language="C#" AutoEventWireup="true" Inherits="WebApp.Wpdcc.ServerList" CodeBehind="ServerList.aspx.cs" %>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>服务器维护</title>
    <meta name="description" content="overview &amp; stats" />
    <!--#include file = "../assets/head.htm" -->
	
</head>
<body class="no-skin">
		<div class="main-content-inner">
			<!-- #section:basics/content.breadcrumbs -->
			<div class="breadcrumbs" id="breadcrumbs">
				<script type="text/javascript">
					try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
				</script>

				<ul class="breadcrumb">
					<li>
						<i class="ace-icon fa fa-home home-icon"></i>
						主页
					</li>
					<li>站群基本信息</li>
					<li class="active">WEB服务</li>
				</ul><!-- /.breadcrumb -->

				<!-- /section:basics/content.searchbox -->
			</div>
			<!-- /section:basics/content.breadcrumbs -->
			
			<div class="page-content">
			<!-- PAGE CONTENT BEGINS -->


						
            <form id="form1" runat="server">
	        <div class="row">
				<div class="col-xs-12">
                
                <asp:DataGrid ID="dgServer" runat="server" class="table table-striped table-bordered" AutoGenerateColumns="False" DataKeyField="pkID" OnItemCommand="dgServer_ItemCommand" OnItemDataBound="dgServer_ItemDataBound">
                    <Columns>
                        <asp:BoundColumn DataField="pkID" HeaderText="ID"></asp:BoundColumn>
                        <asp:BoundColumn DataField="serverName" HeaderText="服务器标识" ></asp:BoundColumn>
                        <asp:BoundColumn DataField="nickName" HeaderText="服务器简称" HeaderStyle-CssClass="hidden-xs" ItemStyle-CssClass="hidden-xs"></asp:BoundColumn>
                        <asp:TemplateColumn HeaderText="连接状态">
                            <ItemTemplate>
                                <asp:DropDownList ID="ddlServerOnUsing" runat="server" SelectedValue='<%# DataBinder.Eval(Container, "DataItem.OnUsing") %>' Enabled="False">
                                    <asp:ListItem Value="0">已断开</asp:ListItem>
                                    <asp:ListItem Value="1">已连接</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:BoundColumn DataField="remark" HeaderText="说明" HeaderStyle-CssClass="hidden-xs" ItemStyle-CssClass="hidden-xs">
                        </asp:BoundColumn>
                        <asp:TemplateColumn HeaderText="执行" HeaderStyle-CssClass="hidden-480" ItemStyle-CssClass="hidden-480">
                            <ItemTemplate>
                                <div class="action-buttons">
                                <asp:LinkButton ID="ediServer" runat="server" CausesValidation="false" CommandName="edit"><i class="ace-icon fa fa-pencil bigger-130 green" title="编辑"></i></asp:LinkButton>
                                &nbsp;
                                <asp:LinkButton ID="delServer" runat="server" CommandName="delete" CausesValidation="false" CommandArgument='<%# DataBinder.Eval(Container, "DataItem.serverName") %>'><i class="ace-icon fa fa-trash-o bigger-130 red" title="删除"></i></asp:LinkButton>
                                &nbsp;
                                <asp:HyperLink ID="hlService" runat="server" NavigateUrl='<%# "ServiceList.aspx?serverId="+Eval("pkId")+"&serverName=" + Eval("serverName") %>' Target="_self" ><i class="ace-icon glyphicon glyphicon-list pink" title="服务管理"></i></asp:HyperLink>
                                &nbsp;
                                <asp:HyperLink ID="hplViewWebSite" runat="server" NavigateUrl='<%# "WebSiteList.aspx?serverId="+Eval("pkId")+"&name=" + Eval("serverName") %>' Target="_self" ><i class="ace-icon fa fa-search-plus bigger-130" title="查看站点列表" ></i></asp:HyperLink>
                                    </div>
                            </ItemTemplate>
                        </asp:TemplateColumn>
                    </Columns>
                </asp:DataGrid>
                
                <div class="clearfix">
				    <div class="col-md-12">
                        <asp:Label ID="lblServerPage" runat="server"></asp:Label>
                    </div>
                </div>
                
                <div class="row form-horizontal">
                    <div id="trInput" runat="server" class="col-xs-12">
                        
                            <div class="form-group">
					            <label class="col-sm-3 control-label no-padding-right" for="txtServerName">服务器标识</label>

					            <div class="col-sm-9">
						            <asp:TextBox ID="txtServerName" runat="server" CssClass="col-xs-10 col-sm-5" Enabled="False" ReadOnly="True"></asp:TextBox>
					            </div>
				            </div>
        				    
        				    
				            <div class="form-group">
					            <label class="col-sm-3 control-label no-padding-right" for="txtNickname">服务器简称</label>

					            <div class="col-sm-9">
						            <asp:TextBox ID="txtNickname" runat="server" CssClass="col-xs-10 col-sm-5"></asp:TextBox>
					            </div>
				            </div>
        				    
				            <div class="form-group">
					            <label class="col-sm-3 control-label no-padding-right" for="txtRemark">说明</label>

					            <div class="col-sm-9">
						            <asp:TextBox ID="txtRemark" runat="server" CssClass="col-xs-10 col-sm-5"></asp:TextBox>
					            </div>
				            </div>
    					
                        <input id="serverPkId" runat="server" name="serverPkId" type="hidden" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtServerName"
                            Display="None" ErrorMessage="请输入服务器的计算机名称。"></asp:RequiredFieldValidator>
                    </div>

                    <div id="trButton" runat="server" class="clearfix">
                        <div class="col-md-offset-3 col-md-9">
                            <asp:Button ID="btnAddServer" runat="server" CssClass="btn btn-sm btn-primary" Text="添加" OnClick="btnAddServer_Click" />
                            &nbsp;
                            <asp:Button ID="btnCancelServer" runat="server" CssClass="btn btn-sm" Text="取消" CausesValidation="false" OnClick="btnCancelServer_Click" />
                            &nbsp;
                            <asp:Button ID="btnSaveServer" runat="server" CssClass="btn btn-sm btn-primary" Text="保存" Visible="false" CausesValidation="false" />
                        </div>
                    </div>
                </div>
                
			    </div>
                
			    </div>
			    </form>
		        <!-- PAGE CONTENT ENDS -->
            </div>
        </div>
		<!--#include file = "../assets/foot.htm" -->
        
</body>
</html>
