<%@ page language="C#" masterpagefile="~/HL_Admin/AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_AddLabel, HoWaveVGO" title="Untitled Page" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table class="adminheading">                       
   <tr>
      <th class="edit">标签管理</th> 
      <td align="right"><div style="width:50px"><a href="Admin_Lable.aspx">返回</a></div></td>
      <td class="rtdw"></td>
   </tr>                        
</table>
<table class="nick" cellpadding="1" cellspacing="1" border="0">
       <tr>
           <td class="tit" colspan="2"><b>添加/修改标签</b></td>
       </tr>　
       <tr>
           <td class="ltd">标签名称</td>
            <td  class="rtd" style="width: 79%" ><asp:TextBox ID="LabelName"　 runat="server" Width="200px" /><asp:Label id="LabelNameErr" runat="server"></asp:Label></td>
       </tr>
        <tr>
           <td class="ltd">标签分类</td>
            <td  class="rtd">
                <asp:TextBox ID="LabelClass"　 runat="server" Width="200px" />
                <asp:DropDownList ID="LabelClassSelect" runat="server"  AppendDataBoundItems="true">
                   <asp:ListItem Text="全部分类" Value="全部分类" />
                </asp:DropDownList><asp:Label id="LabelClassErr" runat="server"></asp:Label>
            </td>
       </tr>
        <tr>
           <td class="ltd">数据设置</td>
            <td  class="rtd" >
                <asp:DropDownList ID="LabelDataSourceSet" runat="server">
                   <asp:ListItem Value="static" Text="无" />
                   <asp:ListItem Value="sql_sysquery" Text="系统数据库查询" />
                   <asp:ListItem Value="sql_sysstorequery" Text="系统数据库存储过程" />
                   <asp:ListItem Value="sql_outquery" Text="外部数据库查询" />
                   <asp:ListItem Value="mdb" Text="Access数据源" />
                   <asp:ListItem Value="xml" Text="XML数据源" />
                   <asp:ListItem Value="mysql" Text="mySQL数据源" />
                </asp:DropDownList>
                <div id="LabelTemplateShow" style="display:none;">                    
                    <div id="div_datasourceshow">
                       数据源连接字符串：<asp:TextBox ID="LabelDataSourceConn" runat="server" Width="200px" />
                    </div>
                </div>
                
            </td>
       </tr>
        <tr>
           <td class="ltd">标签模板处理方式：</td>
            <td class="rtd" ><asp:RadioButtonList ID="LabelTemplateType" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                            <asp:ListItem Text="HTML静态模板标签" Value="simple" />
                            <asp:ListItem Text="纯编程模板标签" Value="programe" />
                            <asp:ListItem Text="带数据源可编程模板标签" Value="data_programe" />
                            <asp:ListItem Text="XML数据" Value="xml" />
                            <asp:ListItem Text="单一数据" Value="text" />
                        </asp:RadioButtonList></td>
       </tr>
        <tr>
           <td class="ltd">缓存时间单位５秒：</td>
            <td class="rtd" ><asp:TextBox ID="LabelCacheTime" runat="server" Text="0" Width="200px" />
                       <select name="LabelCacheTimeSelect"  onchange="javascript:document.getElementById('ctl00_ContentPlaceHolder1_LabelCacheTime').value=this.value">
		                    <option selected="selected" value="0">不缓存</option>
		                    <option value="12">1分钟</option>
		                    <option value="720">1小时</option>
		                    <option value="17280">1天</option>		            
	                    </select></td>
       </tr>
        <tr>
           <td class="ltd">标签说明</td>
            <td class="rtd" ><asp:TextBox ID="LabelIntro" TextMode="MultiLine" runat="server" Rows="5" Width="400"/></td>
       </tr>
</table>
<div class="div_btm">
               <asp:Button ID="NextStep" runat="server" Text="下一步" OnClick="NextSetp_Click" />&nbsp;
               <asp:Button ID="SaveButton" runat="server" Text="保 存" OnClick="SaveButton_Click"  Visible="false"/>
               <input id="BtnCancel" type="button"  value="取　消" onclick="window.location.href='Admin_Lable.aspx'"
                    style="cursor: pointer; cursor: hand; width: 88px;" />&nbsp;&nbsp;&nbsp;&nbsp;
               <asp:DropDownList ID="GoToStep" Visible="false" runat="server"/>
                   
</div>               

<script type="text/javascript">
function display_labelTemplate(objValue,ctlTextID)
{   
   var showObj=document.getElementById("LabelTemplateShow");
   if(objValue=="static")
   {
     showObj.style.display="none";
   }
   else
   {   
       var datasourceshowObj=document.getElementById("div_datasourceshow");
       var datasourceText=document.getElementById(ctlTextID);
       showObj.style.display="block";
       switch(objValue)
       {
          case "sql_sysquery":
              datasourceshowObj.style.display="none";
              break;
          case "sql_outquery":
               datasourceshowObj.style.display="block";
               datasourceText.value="Server=;Database=;uid=;pwd=";
               break;
          case "sql_sysstorequery":
               datasourceshowObj.style.display="block";
               datasourceText.value="存储过程名称";
               break;
          case "mdb":
               datasourceshowObj.style.display="block";
               datasourceText.value="temp/test.mdb";
               break;          
          case "xml":
               datasourceshowObj.style.display="block";
               datasourceText.value="temp/test.xml";
               break;            
          
       }
   }

}
</script>
</asp:Content>

