<%@ page language="C#" autoeventwireup="true" inherits="Admin_VirtualCard_List, ShopNum1Deploy" %>

<%@ Register assembly="ShopNum1.Control" namespace="ShopNum1.Control" tagprefix="cc1" %>

<%@ Register src="UserControl/MessageShow.ascx" tagname="MessageShow" tagprefix="uc1" %>

<!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 id="Head1" runat="server">
    <title>Untitled Page</title>
        <link type="text/css" rel="Stylesheet" href="css/index.css" /> 
         <link href="../css/Num1GridView.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" language="javascript" src="../js/CommonJS.js"></script>
</head>
<body style="padding:0; background-image: url(images/Bg_right.gif); background-repeat:repeat;">
    <form id="form1" runat="server">
    
    <input id="Hidden1" type="hidden" />
    <input id="Hidden2" type="hidden" />
    <input id="Hidden3" type="hidden" />
    <input id="Hidden5" type="hidden" />
    
    <div class="navigator">【 虚拟商品列表 】</div>
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
       <%--  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>--%>
              
    
            <table style="width:100%">
                <tr>
                    <td width="20%" align="right">
                        <asp:Label ID="LabelSCardNumber" runat="server" Text="卡号："></asp:Label>
                    </td>
                    <td >
                        <asp:TextBox ID="TextBoxSCardNumber" runat="server"></asp:TextBox>
                    </td>
                    <td align="right" >
                        <asp:Label ID="LabelSOderNumber" runat="server" Text="订单号："></asp:Label>
                    </td>
                    <td >
                        <asp:TextBox ID="TextBoxSOderNumber" runat="server"></asp:TextBox>
                    </td>
                    <td >
                        <asp:Button ID="ButtonSearch" runat="server" CausesValidation="False" 
                            Text="查询" onclick="ButtonSearch_Click" CssClass="bt2"/>
                    </td>
                </tr>
            </table>
        
       <br />
       
            <cc1:Num1GridView ID="Num1GridViewShow" runat="server" 
                AutoGenerateColumns="False" 
                AllowPaging="True" AllowSorting="True" AscendingImageUrl="~/images/SortAsc.gif" 
                DescendingImageUrl="~/images/SortDesc.gif" Width="100%" 
                AddSequenceColumn="False" AllowMultiColumnSorting="False" BorderColor="#CCDDEF" 
                BorderStyle="Solid" BorderWidth="1px" CellPadding="4" Del="False" 
                DeletePromptText="确实要删除指定的记录吗？" Edit="False" FixHeader="False" 
                Font-Size="Small" GridViewSortDirection="Ascending" PagingStyle="None" 
                style="margin-left: 2px;" TableName="" DataSourceID="ObjectDataSourceData">          
<HeaderStyle HorizontalAlign="Center" BackColor="#6699CC" Font-Bold="True" ForeColor="White"></HeaderStyle>

<PagerStyle HorizontalAlign="left" BackColor="#EEEEEE" ForeColor="#6699CC"></PagerStyle>
                <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                       <input id="checkboxAll" onclick="javascript:SelectAllCheckboxes(this);" 
                            type="checkbox"  />
                    </HeaderTemplate>
                    <ItemTemplate>
<%--                   <input ID="checkboxItem"   onclick="GetItmeValue(this)" type="checkbox" />--%>
                        <input id="checkboxItem"   value='<%# Eval("Guid") %>'  type="checkbox" />
               </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" Width="30px" />
                </asp:TemplateField>
                    <asp:BoundField DataField="Guid" HeaderText="Guid" Visible="False" />
                    <asp:BoundField DataField="CardNumber" HeaderText="卡号" 
                        SortExpression="CardNumber" >
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Pwd" HeaderText="卡密码" 
                        SortExpression="Pwd" >
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="EndDate" HeaderText="截止使用日期" 
                        SortExpression="EndDate" >
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="是否售出" SortExpression="IsSaled">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# ChangeIsSaled(DataBinder.Eval(Container, "DataItem(IsSaled)","{0}")) %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="SaledDate" HeaderText="销售日期" 
                        SortExpression="SaledDate">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="OderNumber" HeaderText="销售订单" 
                        SortExpression="OderNumber">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                </Columns>
            </cc1:Num1GridView>
            <div class="vote">
            <asp:Button ID="ButtonAdd" runat="server" CausesValidation="False" Text="添加" 
                onclick="ButtonAdd_Click"  CssClass="bt2"/>
            <asp:Button ID="ButtonDelete" runat="server" CausesValidation="False" 
                Text="删除" onclientclick="return DeleteButton()" 
                onclick="ButtonDelete_Click"  CssClass="bt2"/>
            </div>
            <br />
  <div style="border:solid 1px #CCDDEF;">
        <table cellpadding="0" cellspacing="0" border="0" style="width:100%">
            <tr>
                <td colspan="2" style="width:100%;background-color:#6699CC;">
                    <div style="color:White;margin:3px;line-height:30px;">
                        <asp:Label ID="LabelPageTitle" runat="server" Font-Bold="True" Text="添加卡号"></asp:Label>&nbsp;
                     </div>
                 </td>
            </tr>
            <tr>
                <td align="right"  width="20%">
                        &nbsp;</td>
                <td align="left"
                        &nbsp;</td>
            </tr>
            <tr>
                <td align="right" >
                        <asp:Label ID="LabelProductGuid" runat="server" Text="商品名称："></asp:Label>
                    </td>
                <td align="left" >
                        <asp:Label ID="LabelProductGuidValue" runat="server"></asp:Label>
                    </td>
            </tr>
            <tr >
                <td align="right" >
                        <asp:Label ID="LabelAddType" runat="server" Text="添加方式："></asp:Label>
                    </td>
                <td align="left" >
                        <asp:DropDownList ID="DropDownListAddType" runat="server" AutoPostBack="True" 
                            onselectedindexchanged="DropDownListAddType_SelectedIndexChanged" CssClass="select2">
                            <asp:ListItem Value="0">单个添加</asp:ListItem>
                            <asp:ListItem Value="1">批量添加</asp:ListItem>
                            <asp:ListItem Value="2">批量上传</asp:ListItem>
                        </asp:DropDownList>
                <font color="red">
                            <asp:Label ID="Label20" runat="server" Text="*"></asp:Label></font>
                    </td>
            </tr>
            <tr style="display:<%=(CardNumberAndPwdMuliti)?"":"none"%>" >
                <td align="right" >
                        <asp:Label ID="LabelCardNumberAndPwdAdd" runat="server" Text="卡号和密码："></asp:Label>
                    </td>
                <td align="left" >
                        <asp:TextBox ID="TextBox1CardNumberAndPwd" runat="server" Height="60px" TextMode="MultiLine" 
                            Width="440px"></asp:TextBox>
                <font color="red">
                            <asp:Label ID="Label21" runat="server" Text="*"></asp:Label>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorOrderID1" 
                            runat="server" ControlToValidate="TextBox1CardNumberAndPwd" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorCardNumberAndPwd" 
                        runat="server" ControlToValidate="TextBox1CardNumberAndPwd" Display="Dynamic" 
                        ErrorMessage="简单介绍最多100个字符" ValidationExpression="^[\s\S]{0,100}$"></asp:RegularExpressionValidator>
                        </font>
                    </td>
            </tr>
            <tr  style="display:<%=(CardNumberAndPwdUpload)?"":"none"%>" >
                <td align="right">
                        <asp:Label ID="LabelCardNumberAndPwdAdd0" runat="server" Text="请选择文件："></asp:Label>
                    </td>
                <td align="left">
                        <asp:FileUpload ID="FileUploadCardAndNumber" runat="server"  CssClass="input2"/>
                    </td>
            </tr><asp:RegularExpressionValidator ID="RegularExpressionValidator1" 
                        runat="server" ControlToValidate="TextBoxCardNumber" Display="Dynamic" 
                        ErrorMessage="简单介绍最多50个字符" ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
            <tr  style="display:<%=(CardNumberAndPwd)?"":"none"%>" >
                <td align="right">
                        <asp:Label ID="LabelCardNumber" runat="server" Text="卡号："></asp:Label>
                    </td>
                <td align="left" >
                        <asp:TextBox ID="TextBoxCardNumber" runat="server"  CssClass="input2"></asp:TextBox>
                <font color="red">
                            <asp:Label ID="Label22" runat="server" Text="*"></asp:Label>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorOrderID2" 
                            runat="server" ControlToValidate="TextBoxCardNumber" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorCardNumber" 
                        runat="server" ControlToValidate="TextBoxCardNumber" Display="Dynamic" 
                        ErrorMessage="简单介绍最多50个字符" ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
                        </font>
                    </td>
            </tr>
            <tr style="display:<%=(CardNumberAndPwd)?"":"none"%>" >
                <td align="right">
                        <asp:Label ID="LabelPwd" runat="server" Text="卡密码："></asp:Label>
                    </td>
                <td align="left">
                        <asp:TextBox ID="TextBoxPwd" runat="server" CssClass="input2"></asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidatorCardNumber0" 
                            runat="server" ControlToValidate="TextBoxPwd" Display="Dynamic" 
                            ErrorMessage="简单介绍最多50个字符" ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
                    </td>
            </tr>
            <tr>
                <td align="right">
    
                        <asp:Label ID="LabelEndDate" runat="server" Text="截至使用日期："></asp:Label>
                    </td>
                <td align="left">
                        <asp:TextBox ID="TextBoxEndDate" runat="server" CssClass="input2"></asp:TextBox>
                <font color="red">
                            <asp:Label ID="Label23" runat="server" Text="*"></asp:Label></font>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorEndDate" 
                            runat="server" ControlToValidate="TextBoxEndDate" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidatorEndDate" 
                        runat="server" ControlToValidate="TextBoxEndDate" Display="Dynamic" 
                        ErrorMessage="输入格式不正确" 
                            ValidationExpression="^\d{4}-(\d{2}|\d{1})-(\d{2}|\d{1})( (\d{2}|\d{1}):(\d{2}|\d{1}):(\d{2}|\d{1}))*"></asp:RegularExpressionValidator>
                        </td>
            </tr>
            <tr>
                <td align="right">
    
                        &nbsp;</td>
                <td align="left" >
                        &nbsp;</td>
            </tr>
            <tr style="background-color:#EEEEEE;">
             <td align="right">
                 &nbsp;</td>
                <td align="left" >
                     <div style="width:100%;">
                        <asp:Button ID="ButtonConfirm" runat="server" Text="确定" 
                            onclick="ButtonConfirm_Click" ToolTip="Submit" CssClass="bt2"/>
                         <input ID="inputReset" runat="server"  type="reset" value="重置"  class="bt2" />
                          <a href="Product_List.aspx"><img src="images/back.png" border="0" align="top" /></a> 
                         <uc1:MessageShow ID="MessageShow" runat="server" Visible="False" />
                     </div>
                </td>  
            </tr>
        </table>
        </div>
       

    
    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
    <asp:HiddenField ID="hiddenGuid" runat="server" Value="0" />
        <asp:HiddenField ID="HiddenFieldCardNumberAndPwd" runat="server" Value="true" />
        <asp:HiddenField ID="HiddenFieldCardNumberAndPwdUpload" runat="server" />
        <asp:HiddenField ID="HiddenFieldCardNumberAndPwdMuliti" runat="server" />
    <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" 
        SelectMethod="Search" TypeName="ShopNum1.BusinessLogic.ShopNum1_VirtualCard_Action" 
        >
        <SelectParameters>
            <asp:ControlParameter ControlID="hiddenGuid" 
                Name="productGuid" PropertyName="Value" Type="String" />
            <asp:ControlParameter ControlID="TextBoxSCardNumber" Name="cardNumber" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxSOderNumber" Name="oderNumber" 
                PropertyName="Text" Type="String" />
            <asp:Parameter Name="IsDeleted" Type="Int32" DefaultValue="0" />
        </SelectParameters>
       
    </asp:ObjectDataSource>
        <input id="Hidden4" type="hidden" />
    &nbsp;</form>
</body>
</html>
