<%@ Page language="c#" Codebehind="fieldinfo.aspx.cs" AutoEventWireup="True" Inherits="health.aspx.sys.fieldinfo" %>
<%@ Register TagPrefix="uc1" TagName="Pager" Src="../../modules/Pager.ascx" %>

<HTML>
	<HEAD>
		<title>database</title>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<link href="../../css/style.css" rel="stylesheet" type="text/css" />
		<script language="JavaScript" src="../../js/Calendar.js" type="text/javascript"></script>
		<script language="JavaScript" src="../../js/common.js" type="text/javascript"></script>
		
	</HEAD>
	<body leftMargin="0" topMargin="0" MS_POSITIONING="GridLayout">
		<form id="Form1" runat="server">
		<br>
			<TABLE id="Table4" cellSpacing="0" cellPadding="0" width="95%" align="center" border="0">
				<TR>
					<TD align="center" colSpan="2">
						<TABLE class="sys_grid" id="Table6" cellSpacing="1" cellPadding="1" width="100%" border="1">
							<TR>
								<TD class="sys_head_cell" align="left" colSpan="3">
                                    &nbsp;<IMG src="../../Image/search.gif" align="absMiddle"><asp:label id="lblShowMsg" runat="server" ForeColor="Red"></asp:label>基础信息</TD>
							</TR>
							<TR>
								<TD class="sys_grid_cell_label" align="left" height="25">&nbsp;<asp:dropdownlist id="ddl_tj" runat="server">
										<asp:ListItem Value="type">检查种类</asp:ListItem>
										<asp:ListItem Value="item">字段名</asp:ListItem>
										<asp:ListItem Value="item_name">检查项目名称</asp:ListItem>
									</asp:dropdownlist><asp:textbox id="tb_value" runat="server" CssClass="sys_editbox"></asp:textbox><asp:button id="Button1" runat="server" CssClass="sys_button" Text="查 询" onclick="bntQuery_Click"></asp:button>
                                    <asp:Button ID="btn_save" runat="server" CssClass="sys_button" OnClick="btn_save_Click"
                                        Text="批量保存" /></TD>
							</TR>
						</TABLE>
						<asp:GridView ID="gdv" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
                        CssClass="sys_grid" OnRowDataBound="gdv_RowDataBound"   Width="100%" >
                        <PagerSettings Visible="False" />
                        <Columns>
                            <asp:BoundField DataField="id" HeaderText="序号"  ReadOnly="True"/>
                            <asp:BoundField DataField="TYPE" HeaderText="检查种类"  ReadOnly="True"/>
                            <asp:TemplateField HeaderText="项目名称">
                                  <ControlStyle Width="100%" />
                                  <ItemTemplate>
                                      <asp:HiddenField ID="hdid" runat="server" Value='<%# DataBinder.Eval(Container.DataItem,"id") %>'  />
                                      <asp:TextBox ID="tb_item_name" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"item_name")%>'></asp:TextBox>
                                  </ItemTemplate>
                            </asp:TemplateField> 
                            <asp:TemplateField HeaderText="顺序号">
                                  <ControlStyle Width="60px" />
                                  <ItemTemplate>
                                      <asp:TextBox ID="tb_sort_id" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"sort_id")%>'></asp:TextBox>
                                  </ItemTemplate>
                            </asp:TemplateField>                            
                        </Columns>
                        <HeaderStyle CssClass="sys_grid_head_cell" />
                        <RowStyle Height="25px" HorizontalAlign="Center" />
                    </asp:GridView>
                    <uc1:pager id="Pager1" runat="server"></uc1:pager><INPUT id="hd" type="hidden" name="hd" runat="server"><INPUT id="hd1" type="hidden" name="hd1" runat="server">
							</TD>
				</TR>
			</TABLE>
            
		</form>
		<SCRIPT language="javascript">
	       <%=msg%>;

	       var s='<%=url%>';
            
            if (s!='')
	        {
	          window.showModalDialog('<%=url%>','','dialogWidth:450px;dialogHeight:250px;help:no;status:no;dialogHide:yes;scrollbars:no;center:yes');
              s='';
              window.location="fieldinfo.aspx?id="+document.getElementById('hd').value+"&tj="+document.getElementById('ddl_tj').value+"&value="+document.getElementById('tb_value').value+"&typeId="+document.getElementById('hd1').value;
             }
   	        function OnRowClickRefresh(s1,s2)
            {
               window.showModalDialog('../showModal.aspx?url='+s1+'?ID='+s2,'','dialogWidth:450px;dialogHeight:250px;help:no;status:no;dialogHide:yes;scrollbars:no;center:yes');
	           window.location="fieldinfo.aspx?id="+document.getElementById('hd').value+"&tj="+document.getElementById('ddl_tj').value+"&value="+document.getElementById('tb_value').value+"&typeId="+document.getElementById('hd1').value;
            }
   	      

		</SCRIPT>		
	</body>
</HTML>
