<%@ page language="C#" autoeventwireup="true" masterpagefile="AdminIndexMaster.master" inherits="HL_Admin_Admin_ModifyCard, WebApp_deploy" title="编辑充值卡" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<script type="text/javascript">
function ShowCardType(ObjValue)
{
   var index=parseInt(ObjValue);  
   var AutoObj=document.getElementById("AutoBat");
   var Single1=document.getElementById("Single1");
   var Single2=document.getElementById("Single2");
   if(index==2)
   {
      AutoObj.style.display="";
      Single1.style.display="none";
      Single2.style.display="none";
   }
   else
   {
       AutoObj.style.display="none";
       Single1.style.display="";
       Single2.style.display="";
   }
}
</script> 
       
<table  class="nick" id="EditTable" runat="server" >
  <tr>
	<td class="tit" colspan="2">修改充值卡</td>
  </tr>
  <tr>
	  <td class="ltd">充值卡类型：</td>
	  <td class="rtd">
		  <asp:DropDownList ID="Edit_CardType" runat="server" >
			 <asp:ListItem Text="本站充值" Value="1" Selected="True" />
			 <asp:ListItem Text="其它充值卡" Value="2" />
		  </asp:DropDownList>   
	   </td>
  </tr>                             
   <tr>
	  <td class="ltd">充值卡卡号：</td>
	  <td class="rtd"> 
		 <asp:TextBox ID="Edit_CardNum" runat="server"  Width="200" ReadOnly="true" BackColor="#CCCCCC"/>
		
	  </td>
  </tr>
   <tr>
	  <td class="ltd">充值卡密码：</td>
	  <td class="rtd">
		 <asp:TextBox ID="Edit_CardPassword"  runat="server" CssClass="unwatermarked"/>
		 <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
			   ControlToValidate="Edit_CardPassword" ErrorMessage="充值卡密码不能为空"/>
	  </td>
   </tr>
   <tr>
	  <td class="ltd">充值卡面值：</td>
	  <td class="rtd">
		 <asp:TextBox ID="Edit_CardValue"  runat="server" Width="80px" />
		  <div style="float:left; position:absolute;">
		  <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="Edit_CardValue"
			  ErrorMessage="充值卡的面值必须为大于０的整数" MaximumValue="999999999" MinimumValue="1" Type="Integer"/>
		  </div><div style="float:left; position:absolute;"><asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
			   ControlToValidate="Edit_CardValue" ErrorMessage="充值卡面值不能为空"/></div>  
	  </td>
  </tr> 
  <tr>
	  <td class="ltd">充值卡单位：</td>
	  <td class="rtd">
		  <asp:DropDownList ID="Edit_CardValidUnit" runat="server">
			 <asp:ListItem Text="元" Value="元" Selected="True" />
			 <asp:ListItem Text="点" Value="点" />
		  </asp:DropDownList>                                      
	  </td>
  </tr>
   <tr>
	  <td class="ltd">充值卡截止日期：</td>
	  <td class="rtd">
		  <asp:TextBox ID="Edit_CardEndDate" runat="server" />
		  <asp:RequiredFieldValidator id="RequiredFieldValidator5" runat="server"  ControlToValidate="Edit_CardEndDate" ErrorMessage="截止日期不能为空" Display="Dynamic"/>    
	  </td>
  </tr>
   <tr>
	  <td class="ltd">购买人得到通行币：</td>
	  <td class="rtd">
		  <asp:TextBox ID="Edit_CardCoin" runat="server" />
		  <asp:RequiredFieldValidator id="RequiredFieldValidator2" runat="server"  ControlToValidate="Edit_CardCoin" ErrorMessage="购买人得到通行币不能为空" Display="Dynamic"/>
		  <asp:RangeValidator id="RangeValidator2" runat="server" Type="Integer" MinimumValue="0" MaximumValue="999999" ControlToValidate="Edit_CardCoin" ErrorMessage="购买人得到通行币不能小于0" Display="Dynamic"/>
	  </td>
  </tr>
 
  <tr>
	  <td class="ltd">代理商：</td>
	  <td class="rtd">
		  <asp:TextBox ID="Edit_CardAgent" runat="server" Width="250px" />
	  </td>
  </tr>
  <tr>
	  <td colspan="2" class="btm"> 
	  <asp:Button ID="LinkButton1" runat="server" CausesValidation="True" OnCommand="UpDateCard" Text="修 改" /> 
	  <input type="button" onclick="location.href='Admin_Card.aspx'" value="返 回" />
	   </td>
  </tr>                              
</table>


<table class="nick" width="100%" id="AddTable" runat="server">
 <tr>
	<td class="tit" colspan="2">添加充值卡</td>
 </tr>
 <tr>
	<td class="ltd">充值卡类型：</td>
	<td class="rtd"  style="width:70%">
		<asp:DropDownList id="Add_CardType" runat="server" >
		  <asp:ListItem Text="本站充值" Value="1" Selected="true" />
		  <asp:ListItem Text="其它充值卡" Value="2" />
		</asp:DropDownList>
	</td>
 </tr>
 <tr>
	<td class="ltd">生成充值卡类型：</td>
	<td class="rtd">
		<asp:DropDownList id="Add_CreateCardType" runat="server"  >
			 <asp:ListItem Text="单张" Value="1" Selected="true" />
			 <asp:ListItem Text="批量" Value="2" />
		  </asp:DropDownList>
	</td>
 </tr>
 <tr id="AutoBat" style="display:none;">
	<td class="ltd">生成充值卡数量：</td>
	<td class="rtd">
	   <asp:TextBox id="Add_CardQuantity" runat="server" Width="50px" MaxLength="4" Text="1" />
		<asp:RangeValidator id="rv3" runat="server" Type="Integer" MinimumValue="1" MaximumValue="999999" ControlToValidate="Add_CardQuantity" ErrorMessage="生成充值卡数量必须为大于０的整数" Display="Dynamic"/>
		<asp:RequiredFieldValidator id="rfv1" runat="server"  ControlToValidate="Add_CardQuantity" ErrorMessage="生成充值卡数量不能为空" Display="Dynamic"/></td>
 </tr>
 <tr id="Single1">
	 <td class="ltd">充值卡卡号：</td>
	 <td class="rtd"><asp:TextBox id="Add_CardNum" runat="server"  Width="200" />
		<asp:RequiredFieldValidator id="rfv2" runat="server"  ControlToValidate="Add_CardNum" ErrorMessage="充值卡卡号不能为空" Display="Dynamic"/> 
	 </td>
 </tr>
 <tr id="Single2">
	  <td class="ltd">充值卡密码：</td>
	  <td class="rtd"><asp:TextBox id="Add_CardPassword" runat="server" />
		<asp:RequiredFieldValidator id="rfv3" runat="server" ControlToValidate="Add_CardPassword" ErrorMessage="充值卡密码不能为空" Display="Dynamic"/> 
	  </td>
 </tr>
 <tr>
	 <td class="ltd">充值卡面值：</td>
	 <td class="rtd"><asp:TextBox id="Add_CardValue" runat="server" Width="80px"/> 
		<asp:RequiredFieldValidator id="rfv4" runat="server" ControlToValidate="Add_CardValue" ErrorMessage="充值卡面值不能为空" Display="Dynamic"/> 
		<asp:RangeValidator id="rv1" runat="server" Type="Integer" MinimumValue="1" MaximumValue="999999" ControlToValidate="Add_CardValue" ErrorMessage="充值卡的面值必须为大于０的整数" Display="Dynamic"/>
	 </td>
 </tr>
 <tr>
	 <td class="ltd">充值卡单位：</td>
	 <td class="rtd">
		  <asp:DropDownList id="Add_CardValidUnit" runat="server"  >
			 <asp:ListItem Text="元" Value="元" Selected="true" />
			 <asp:ListItem Text="点" Value="点" />
		  </asp:DropDownList> 
	 </td>
 </tr>
 <tr>
	<td class="ltd">充值卡截止日期：</td>
	<td class="rtd">
		<asp:TextBox id="Add_CardEndDate" runat="server" />
		<asp:RequiredFieldValidator id="RequiredFieldValidator6" runat="server"  ControlToValidate="Add_CardEndDate" ErrorMessage="截止日期不能为空" Display="Dynamic"/> 
	</td>
 </tr>
 
 <tr>
	  <td class="ltd">购买人得到通行币：</td>
	  <td class="rtd">
		   <asp:TextBox id="Add_CardCoin" runat="server" Text="0" />
		   <asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server"  ControlToValidate="Add_CardCoin" ErrorMessage="购买人得到通行币不能为空" Display="Dynamic"/>
			<asp:RangeValidator id="rvss" runat="server" Type="Integer" MinimumValue="0" MaximumValue="999999" ControlToValidate="Add_CardCoin" ErrorMessage="购买人得到通行币不能小于0" Display="Dynamic"/>
	  </td>
</tr>

<tr>
   <td class="ltd">代理商：</td>
   <td class="rtd">
	   <asp:TextBox id="Add_CardAgent" runat="server" Width="250px" />
   </td>
</tr>
<tr>
  <td colspan="2" class="btm">
	 <asp:Button id="InsertButton"  runat="server" OnCommand="AddCard" CausesValidation="true" Text="添 加" CommandName="Insert"/>
	 <input type="button" onclick="location.href='Admin_Card.aspx'" value="返 回" />
  </td>
</tr>
</table>           

<table class="nick" id="showTable" runat="server">
  <tr>
	<td class="tit" colspan="2">查看充值卡</td>
  </tr>
  <tr>
	  <td class="ltd">充值卡类型：</td>
	  <td class="rtd">
		  <asp:Label ID="CardType" runat="server" />
	   </td>
  </tr>                             
   <tr>
	  <td class="ltd">充值卡卡号：</td>
	  <td class="rtd"> 
		 <asp:Label ID="CardNum" runat="server"  />
		
	  </td>
  </tr>
   <tr>
	  <td class="ltd">充值卡密码：</td>
	  <td class="rtd">
		 <asp:Label ID="CardPassword"  runat="server" CssClass="unwatermarked"/>
	  </td>
   </tr>
   <tr>
	  <td class="ltd">充值卡面值：</td>
	  <td class="rtd">
		 <asp:Label ID="CardValue" runat="server" />
		 <asp:Label ID="CardValidUnit" runat="server" />
	  </td>
  </tr> 
   <tr>
	  <td class="ltd">充值卡截止日期：</td>
	  <td class="rtd">
		  <asp:Label ID="CardEndDate" runat="server" /></td>
  </tr>
   <tr>
	  <td class="ltd">购买人得到通行币：</td>
	  <td class="rtd">
		  <asp:Label ID="CardCoin" runat="server" />
		  
	  </td>
  </tr>
  <tr>
	  <td class="ltd">代理商：</td>
	  <td class="rtd">
		  <asp:Label ID="CardAgent" runat="server"  />
	  </td>
  </tr>
  <tr>
	  <td colspan="2" class="btm">
	  <input type="button" onclick="location.href='Admin_Card.aspx'" value="返 回" />
	  </td>
  </tr>                              
</table>

</asp:Content>
