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

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

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ShopNum1" %>

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

<!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" /> 
<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">
      <%--  <asp:ScriptManager ID="ScriptManager1" runat="server">
   </asp:ScriptManager>--%>
<%--<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>--%>
     <div class="navigator">【 缺货商品 】</div>
     <div class="query">
    <table style="width:100%">
            <tr>
                <td align="right">
                    <asp:Label ID="LabelSProductGuid" runat="server" Text="缺货商品名称："></asp:Label>
                </td>
                <td >
                    <asp:TextBox ID="TextBoxSProductGuid" runat="server" CssClass="input1"></asp:TextBox>
                </td>
                <td align="right" width="15%">
                    <asp:Label ID="LabelSName" runat="server" Text="订购人："></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="TextBoxName" runat="server" CssClass="input1"></asp:TextBox>
                    </td>
                <td align="right">
                    <asp:Label ID="LabelSIsReply" runat="server" Text="处理状态："></asp:Label>
                </td>
                <td>
                        <asp:DropDownList ID="DropDownListSIsReply" runat="server"  CssClass="select1">
                            <asp:ListItem Value="0">未处理</asp:ListItem>
                            <asp:ListItem Value="1">已处理</asp:ListItem>
                            <asp:ListItem Selected="True" Value="-1">-全部-</asp:ListItem>
                        </asp:DropDownList>
                </td>
                <td style="width: 42px; height: 25px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelSSendTime" runat="server" Text="登记时间："></asp:Label>
                </td>
                <td colspan="5" >
                    <asp:TextBox ID="TextBoxSSendTime1" runat="server" CssClass="input1"></asp:TextBox>
                        <img id="imgCalendarSSendTime1" alt="" src="../images/Calendar.png" 
                                    style="width: 16px; height: 18px;" /><ShopNum1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" 
                                        EnableScriptGlobalization="True" EnableScriptLocalization="True">
                            </ShopNum1:ToolkitScriptManager>
                            <ShopNum1:CalendarExtender 
                                      ID="CalendarExtender1" runat="server" TargetControlID="TextBoxSSendTime1" 
                                      PopupButtonID="imgCalendarSSendTime1" CssClass="ajax__calendar">
                            </ShopNum1:CalendarExtender>
                             <asp:RegularExpressionValidator ID="RegularExpressionValidatorStartTime" 
                            runat="server" ControlToValidate="TextBoxSSendTime1" 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>
                    -<asp:TextBox ID="TextBoxSSendTime2" runat="server" CssClass="input1"></asp:TextBox>
                          <img id="imgCalendarSSendTime2" alt="" src="../images/Calendar.png" 
                                    style="width: 16px; height: 18px;" />
                            <ShopNum1:CalendarExtender 
                                      ID="CalendarExtender2" runat="server" TargetControlID="TextBoxSSendTime2" 
                                      PopupButtonID="imgCalendarSSendTime2" CssClass="ajax__calendar">
                            </ShopNum1:CalendarExtender>
                             <asp:RegularExpressionValidator ID="RegularExpressionValidator1" 
                            runat="server" ControlToValidate="TextBoxSSendTime2" 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>
                <td >
                    </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="LabelSReplyTime" runat="server" Text="处理时间："></asp:Label>
                </td>
                <td colspan="5">
                    <asp:TextBox ID="TextBoxSReplyTime1" runat="server" CssClass="input1"></asp:TextBox>
                        <img id="imgCalendarSReplyTime1" alt="" src="../images/Calendar.png" 
                                    style="width: 16px; height: 18px;" />
                            <ShopNum1:CalendarExtender 
                                      ID="CalendarExtender3" runat="server" TargetControlID="TextBoxSReplyTime1" 
                                      PopupButtonID="imgCalendarSReplyTime1" CssClass="ajax__calendar">
                            </ShopNum1:CalendarExtender>
                             <asp:RegularExpressionValidator ID="RegularExpressionValidator2" 
                            runat="server" ControlToValidate="TextBoxSReplyTime1" 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>
                    -<asp:TextBox ID="TextBoxSReplyTime2" runat="server" CssClass="input1"></asp:TextBox>
                        <img id="imgCalendarSReplyTime2" alt="" src="../images/Calendar.png" 
                                    style="width: 16px; height: 18px;" />
                            <ShopNum1:CalendarExtender 
                                      ID="CalendarExtender4" runat="server" TargetControlID="TextBoxSReplyTime2" 
                                      PopupButtonID="imgCalendarSReplyTime2" CssClass="ajax__calendar">
                            </ShopNum1:CalendarExtender>
                             <asp:RegularExpressionValidator ID="RegularExpressionValidator3" 
                            runat="server" ControlToValidate="TextBoxSReplyTime2" 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>
                <td style="width: 42px; height: 25px">
                    <asp:Button ID="ButtonSearch" runat="server" 
                       Text="查询" onclick="ButtonSearch_Click"  CssClass="bt2" />
                </td>
            </tr>
            </table></div>
<table  style="width:100%">
                    <tr>
                        <td align="left">
            <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" GridViewSortDirection="Ascending" 
                                PagingStyle="None" style="margin-left: 2px;" TableName="" 
                                Font-Size="Small" DataSourceID="ObjectDataSourceData">          
<HeaderStyle HorizontalAlign="Center" BackColor="#6699CC" Font-Bold="True" ForeColor="#FFFFFF"></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>
                    <ItemStyle HorizontalAlign="Center" Width="30px" />
                </asp:TemplateField>
                    <asp:BoundField DataField="Guid" HeaderText="Guid" Visible="False" />
                    <asp:BoundField DataField="ProductName" HeaderText="缺货商品名称" 
                        SortExpression="ProductName" >
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Number" HeaderText="缺货商品数量" 
                        SortExpression="Number">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Name" HeaderText="订购人" 
                        SortExpression="Name">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="SendTime" HeaderText="登记时间" 
                        SortExpression="SendTime" >
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ReplyUser" HeaderText="处理人" 
                        SortExpression="ReplyUser">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ReplyTime" HeaderText="处理时间" 
                        SortExpression="ReplyTime">
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="处理状态" SortExpression="IsReply">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# ChangeIsReply(DataBinder.Eval(Container, "DataItem(IsReply)","{0}")) %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                </Columns>
            </cc1:Num1GridView>
                        </td>
                    </tr>
                       <tr>
                        <td align="left">
                        <div class="vote">
                            <asp:Button ID="ButtonDelete" runat="server" onclick="ButtonDelete_Click" 
                                onclientclick="return DeleteButton()" Text="删除" CausesValidation="False"  CssClass="bt2"/>                       
                            <asp:Button ID="ButtonReply" runat="server" CausesValidation="False" 
                                onclientclick="return EditButton()" Text="查看|处理" 
                                onclick="ButtonReply_Click" CssClass="bt3"/>
                           <ShopNum1:MessageShow ID="MessageShow" runat="server" Visible="False" />
                           </div></td>                    
                    </tr>
</table>
        <%--                   <input ID="checkboxItem"   onclick="GetItmeValue(this)" type="checkbox" />--%><br />
    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
        
    <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" 
        SelectMethod="Search" TypeName="ShopNum1.BusinessLogic.ShopNum1_OutOfStock_Action" 
        >
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBoxSProductGuid" Name="productName" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxName" 
                Name="name" PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="DropDownListSIsReply" Name="isReply" 
                PropertyName="SelectedValue" Type="Int32" DefaultValue="-1" />
            <asp:ControlParameter ControlID="TextBoxSSendTime1" Name="sendTime1" 
                PropertyName="Text" Type="String" DefaultValue="" />
            <asp:ControlParameter ControlID="TextBoxSSendTime2" Name="sendTime2" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxSReplyTime1" Name="replyTime1" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxSReplyTime2" Name="replyTime2" 
                PropertyName="Text" Type="String" />
            <asp:Parameter Name="isDeleted" Type="Int32" DefaultValue="0" />
        </SelectParameters>
    </asp:ObjectDataSource>
    </form>
</body>
</html>
