<%@ Page language="c#" Codebehind="baseinfo.aspx.cs" AutoEventWireup="True" Inherits="health.aspx.sys.baseinfo1" %>
<%@ 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" type="text/css" rel="stylesheet">
		<script language="JavaScript" src="../../js/common.js" type="text/javascript"></script>
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form id="Form2" method="post" runat="server">
			<br>
			<FONT face="宋体">
				<TABLE id="Table1" cellSpacing="0" cellPadding="0" width="95%" align="center" border="0">
					<TR>
						<TD class="sys_grid_cell_label" align="left" height="20">
							<TABLE class="sys_grid" id="Table4" cellSpacing="0" cellPadding="0" width="100%" border="0">
								<TR>
									<TD class="sys_head_cell" align="left" colSpan="2"><IMG src="../../Image/search.gif" align="absMiddle">
										<asp:label id="lblShowMsg" runat="server" ForeColor="Red"></asp:label>&nbsp;基础信息</TD>
								</TR>
							</TABLE>
						</TD>
					</TR>
					<TR>
						<TD align="center">
							<TABLE class="sys_grid" id="Table3" cellSpacing="0" cellPadding="0" width="100%" border="0">
								<TR>
									<TD class="sys_grid_cell_label" align="left" colSpan="3" height="25"><FONT face="宋体">&nbsp;</FONT><asp:dropdownlist id="ddl_tj" runat="server">
											<asp:ListItem Value="info_type">信息类型</asp:ListItem>
											<asp:ListItem Value="info_name">信息名称</asp:ListItem>
											<asp:ListItem Value="info_desc">信息描述</asp:ListItem>
										</asp:dropdownlist><asp:textbox id="tb_value" runat="server"></asp:textbox>&nbsp;<asp:button id="btnSearch" runat="server" Text="查 询" CssClass="sys_button" onclick="btnSearch_Click"></asp:button>
                                        <asp:Button ID="btn_export" runat="server" CssClass="sys_button" OnClick="btnSearch_Click"
                                            OnClientClick="ToExcel('grdSQ')" Text="导 出" />&nbsp;<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" OnSorting="gdv_Sorting"   Width="100%">
                        <HeaderStyle CssClass="sys_head_cell" />
                        <Columns>
                            <asp:BoundField DataField="id" HeaderText="序号" SortExpression="id"/>
                            <asp:TemplateField HeaderText="信息类型">
                                   <ControlStyle Width="100%" />
                                  <ItemTemplate>
                                      <asp:HiddenField ID="hdid" runat="server" Value='<%# DataBinder.Eval(Container.DataItem,"id") %>'  />
                                      <asp:TextBox ID="tb_info_type" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"info_type")%>'></asp:TextBox>
                                  </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="信息名称">
                                   <ControlStyle Width="100%" />
                                  <ItemTemplate>
                                      <asp:TextBox ID="tb_info_name" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"info_name")%>'></asp:TextBox>
                                  </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="信息描述">
                                   <ControlStyle Width="100%" />
                                  <ItemTemplate>
                                      <asp:TextBox ID="tb_info_desc" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"info_desc")%>'></asp:TextBox>
                                  </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="信息代码">
                                   <ControlStyle Width="100%" />
                                  <ItemTemplate>
                                      <asp:TextBox ID="tb_info_code" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"info_code")%>'></asp:TextBox>
                                  </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="顺序">
                                   <ControlStyle Width="100%" />
                                  <ItemTemplate>
                                      <asp:TextBox ID="tb_sort_id" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"sort_id")%>'></asp:TextBox>
                                  </ItemTemplate>
                            </asp:TemplateField>                               
                			<asp:TemplateField HeaderText="是否启用" >
                                <ItemTemplate>
                                    <asp:CheckBox id="ck_if_valid" runat="server" Checked='<%# getvalue(DataBinder.Eval(Container.DataItem,"if_valid")) %>' />
                                </ItemTemplate>
                                <ControlStyle Width="60px" />
                            </asp:TemplateField>
                        </Columns>
                        <PagerSettings Visible="False" />
                        <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>
			</FONT>
		</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');
              s='';
              window.location="baseinfo.aspx?id="+document.getElementById('hd').value+"&tj="+document.getElementById('ddl_tj').value+"&value="+document.getElementById('tb_value').value+"&typeId="+document.getElementById('hd1').value;
             }
   	      
           function Ondbclk(s1,s2,width,height)
           {
              window.showModalDialog('../showModal.aspx?url='+s1+'?ID='+s2,'','dialogWidth:'+width+';dialogHeight:'+height+';help:no;status:no;dialogHide:yes;scrollbars:no');
	          window.location="baseinfo.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>
