<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/User/Main.Master"
    EnableViewState="true" CodeBehind="SnList.aspx.cs" Inherits="OAWeb.User.SnList" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Src="/UserControls/UserLeft.ascx" TagName="TaskNav" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlace" runat="server">
 <style>
        .data_field ul li
        {
            float: left;
            margin-right: 3px;
        }
    </style>
    <div class="w main">
        <div class="right">
            <table class="data_title" cellspacing="3">
                <tr>
                    <td class="data_caption">
                        产品和服务
                       
                    </td>
                </tr>
                <tr>
                    <td class="data_field">
                        <asp:Panel ID="pnlLink" runat="server">
                            <asp:HyperLink ID="hypAll" runat="server" NavigateUrl="/crm/product/SNList.aspx?s=1&l=0">所有</asp:HyperLink>
                            <asp:HyperLink ID="hypAvailDate" runat="server" NavigateUrl="/crm/product/SNList.aspx?s=1&l=1">将到期</asp:HyperLink>
                            <asp:HyperLink ID="hypAvailDate2" runat="server" NavigateUrl="/crm/product/SNList.aspx?s=1&l=2">已到期</asp:HyperLink>
                            <br />
                        </asp:Panel>
                        <ul>
                            <li  style="  display:none;">序列号:<asp:TextBox ID="txtProductSN" runat="server" CssClass="text_box width120"></asp:TextBox>
                            </li>
                            <li style="width: 260px; display:none;">品名:<asp:TextBox ID="txtSKUName" runat="server" CssClass="text_box width120"
                                ReadOnly="true"></asp:TextBox>&nbsp;
                                <input type="button" value="选择" onclick="OpenRadioDialog('/Dialog/SNProductSelectDialog.aspx','选择商品',CallbackRadioFun);" />
                                <input type="button" value="置空" onclick=" Reset();" /><asp:HiddenField ID="hdfSKUId"
                                    runat="server" />
                            </li>
                            <li style="width: 260px; display:none;">客户:<asp:TextBox ID="txtCustomerName" runat="server" CssClass="text_box width120"
                                ReadOnly="true"></asp:TextBox>&nbsp;
                                <input type="button" value="选择" onclick="OpenRadioDialog('/Dialog/CustomerDialog.aspx','选择客户',CallbackCustomerFun);" />
                                <input type="button" value="置空" onclick=" ResetCustomer();" />
                                <asp:HiddenField ID="hdfCustomerID" runat="server" />
                            </li>
                            <li>状态:<asp:DropDownList ID="ddlUseState" runat="server">
                                <asp:ListItem Value="0">所有</asp:ListItem>
                                <asp:ListItem Value="1">正常</asp:ListItem>
                                <asp:ListItem Value="2">停用</asp:ListItem>
                                <asp:ListItem Value="-1">废置</asp:ListItem>
                            </asp:DropDownList>
                            </li>
                            <li style="width: 300px;">日期:<asp:TextBox ID="txtDateStart" runat="server" CssClass="text_box width120"
                                onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"></asp:TextBox>-<asp:TextBox
                                    ID="txtDateEnd" runat="server" CssClass="text_box width120" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"></asp:TextBox>
                            </li>
                            <li>&nbsp;
                                <asp:Button ID="btnSearch" runat="server" Text="查  询" class="btn_77px" /></li>
                        </ul>
                    </td>
                </tr>
            </table>
            <asp:Panel ID="pnlOp" runat="server">
                <div class="page_op" style=" display:none;">
                    <asp:Button ID="btnNew" runat="server" Text="新增序列号" CssClass="btn_77px" OnClientClick="return OpenDialog('SNEdit.aspx','新增序列号');" />
                    <asp:Button ID="btnDelete" runat="server" Text="删除序列号" CssClass="btn_77px" />
                </div>
            </asp:Panel>
            <div class="list">
                <asp:GridView ID="gvData" runat="server" AutoGenerateColumns="False" DataKeyNames="SNId"
                    GridLines="None" CellPadding="0" CssClass="table_list" EnableModelValidation="True"
                    OnRowDataBound="gvData_RowDataBound">
                    <RowStyle HorizontalAlign="Left" />
                    <Columns>
                        <asp:TemplateField HeaderText="编号" Visible="false">
                            <HeaderTemplate>
                                <input name="chkHeader" onclick="javascript:SelectAll(this);" type="checkbox" value="chkHeader" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <input id="chkItem" type="checkbox" value="<%#Eval("SNId") %>" />
                            </ItemTemplate>
                            <HeaderStyle HorizontalAlign="Center" ForeColor="White"></HeaderStyle>
                            <ItemStyle HorizontalAlign="Center" Width="10px"></ItemStyle>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="序列号">
                        <ItemStyle HorizontalAlign="Left" Width="250px" />
                            <ItemTemplate>
                                <asp:LinkButton ID="lbtnProductSN" runat="server"><%# Eval("ProductSN") %></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:HyperLinkField DataNavigateUrlFields="CustomerId" DataNavigateUrlFormatString="/crm/customer/CustomerView.aspx?CustomerID={0}"
                            DataTextField="CustomerName" HeaderText="客户名称" Target="_blank" Visible="false" />

                        <asp:BoundField DataField="AuditDate" HeaderText="交付日期" DataFormatString="{0:yyyy-MM-dd HH:mm}">
                        </asp:BoundField>
                        <asp:BoundField DataField="AvailDate" HeaderText="到期时间" DataFormatString="{0:yyyy-MM-dd HH:mm}">
                        </asp:BoundField>
                        <asp:BoundField DataField="AuditStateText" HeaderText="交付状态"></asp:BoundField>
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <a href="javascript:void(0)" onclick="return OpenDialog('SNView.aspx?Id=<%# Eval("SNId") %>','');">详细</a>
                                <asp:HyperLink ID="hypPay" runat="server" >订购</asp:HyperLink>
                                <asp:LinkButton ID="lbtnEdit" runat="server" Visible="false">编辑</asp:LinkButton>
                                <asp:LinkButton ID="lbtnDelete" runat="server" Visible="false">删除</asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <div class="pager-bar">
                    <webdiyer:AspNetPager ID="pager" runat="server" CssClass="anpager" currentpagebuttonclass="cpb"
                        PageSize="20" NextPageText="下一页" LastPageText="页 尾" FirstPageText="第一页" PrevPageText="上一页"
                        ShowBoxThreshold="10" SubmitButtonText="跳 转" UrlPaging="True">
                    </webdiyer:AspNetPager>
                </div>
            </div>
        </div>
        <div class="left">
            <uc1:TaskNav ID="TaskNav1" runat="server" />
        </div>
    </div>
</asp:Content>
