<%@ page language="C#" autoeventwireup="true" inherits="HL_Admin_Admin_ModifyCard, HoWaveIMSV5.0" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>修改充值卡</title>
     <base target=_self></base>
     <script type="text/javascript" src="Js/getdate.js"></script>
      <link href="Css/StyleSheet.css" type="text/css" rel="stylesheet" />
      
</head>
<body>
    <form id="form1" runat="server">
    <div>
       <asp:FormView ID="FormView1" runat="server" DataSourceID="ObjectDataSource1" DefaultMode="Edit" OnItemUpdated="FormView1_ItemUpdated" DataKeyNames="CardID">
           <EditItemTemplate>
               <table class="adminlist" width="500px">
                  <tr>
                      <td style=" width:100px; text-align:left">充值卡类型：</td>
                      <td align="left">
                          <asp:DropDownList ID="CardType" runat="server" SelectedValue='<%# Bind("CardType") %>'>
                             <asp:ListItem Text="本站充值" Value="1" Selected="True" />
                             <asp:ListItem Text="其它充值卡" Value="2" />
                          </asp:DropDownList>   
                       </td>
                  </tr>                             
                   <tr>
                      <td style="text-align:left">充值卡卡号：</td>
                      <td align="left"> 
                         <asp:TextBox ID="CardNum" runat="server"  Text='<%# Eval("CardNum") %>'  ReadOnly="true" BackColor="#CCCCCC"/>
                        
                      </td>
                  </tr>
                   <tr>
                      <td style="text-align:left">充值卡密码</td>
                      <td align="left">
                         <asp:TextBox ID="CardPassword" Text='<%# Bind("CardPassword") %>' runat="server" CssClass="unwatermarked"/>
                         <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
                               ControlToValidate="CardPassword" ErrorMessage="充值卡密码不能为空"/>
                      </td>
                   </tr>
                   <tr>
                      <td style="text-align:left">充值卡面值</td>
                      <td align="left">
                         <asp:TextBox ID="CardValue" Text='<%# Bind("CardMoney") %>' runat="server" />
                          <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
                               ControlToValidate="CardValue" ErrorMessage="充值卡面值不能为空"/>   
                      </td>
                  </tr> 
                  <tr>
                      <td style="text-align:left">充值卡单位</td>
                      <td align="left">
                          <asp:DropDownList ID="DropDownList1" runat="server" SelectedValue='<%# Bind("CardValidUnit") %>'>
                             <asp:ListItem Text="元" Value="元" Selected="True" />
                             <asp:ListItem Text="点" Value="点" />
                          </asp:DropDownList>                                      
                      </td>
                  </tr>
                   <tr>
                      <td style="text-align:left">购买人得到通行币</td>
                      <td align="left">
                          <asp:TextBox ID="CardCoin" runat="server" Text='<%# Bind("CardValidNum") %>'/>
                          <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
                               ControlToValidate="CardCoin" ErrorMessage="充值卡通行币不能为空"/>  
                      </td>
                  </tr>
                  <tr>
                      <td style="text-align:left">充值卡截止日期</td>
                      <td align="left">
                          <asp:TextBox ID="CardEndDate" runat="server" Text='<%# Bind("CardEndDate") %>'/>
                      </td>
                  </tr>
                  <tr>
                      <td style="text-align:left">代理商</td>
                      <td align="left">
                          <asp:TextBox ID="CardAgent" runat="server" Text='<%# Bind("CardAgentName") %>'/>
                      </td>
                  </tr>
                  <tr>
                      <td>&nbsp;</td>
                      <td style="text-align:left">
                      <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update"
                          Text="更新" /> 
                      <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
                          Text="取消" />
                       </td>
                  </tr>                              
               </table>
              </EditItemTemplate>
       </asp:FormView> 
       <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"  SelectMethod="GetCardByCardID" TypeName="CardBLL" UpdateMethod="UpdateCard" OnInit="ObjectDataSource1_Init" >           
             <UpdateParameters>
                 <asp:Parameter Name="CardNum" Type="String" />
                 <asp:Parameter Name="CardPassword" Type="String" />
                 <asp:Parameter Name="CardType" Type="Int32" />
                 <asp:Parameter Name="CardAgentName" Type="String" />
                 <asp:Parameter Name="CardValidNum" Type="String" />
                 <asp:Parameter Name="CardMoney" Type="Decimal" />
                 <asp:Parameter Name="CardValidUnit" Type="String" />
                 <asp:Parameter Name="CardEndDate" Type="DateTime" />
                 <asp:Parameter Name="CardCreateTime" Type="DateTime" />
                 <asp:Parameter Name="CardUseTime" Type="DateTime" />
                 <asp:Parameter Name="CardSellFrom" Type="String" />
                 <asp:Parameter Name="CardID" Type="Int32" />
             </UpdateParameters>            
           <SelectParameters>
               <asp:QueryStringParameter Name="CardID" QueryStringField="CardID" Type="Int32" />
           </SelectParameters>
         </asp:ObjectDataSource> 
    </div>
    </form>
</body>
</html>
