<%@ page language="C#" autoeventwireup="true" inherits="Admin_Organiz_List, ShopNum1Deploy" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ShopNum1" %>
<%@ 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"/> 
<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 width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="16%" align="right">&nbsp;商品名称：</td>
    <td width="25%"><asp:TextBox ID="TextBoxSProductGuid" runat="server" CssClass="input1"></asp:TextBox></td>
    <td width="5%">状态：</td>
    <td width="25%"><asp:DropDownList ID="DropDownListSIsEnd" runat="server" CssClass="select1">
                        <asp:ListItem Value="-1">-全部-</asp:ListItem>
                        <asp:ListItem Value="0">未开始</asp:ListItem>
                        <asp:ListItem Value="1">进行中</asp:ListItem>
                        <asp:ListItem Value="2">已结束</asp:ListItem>
                        <asp:ListItem Value="3">已取消</asp:ListItem>
    </asp:DropDownList></td>
    <td width="35%">&nbsp;</td>
  </tr>
  <tr>
    <td align="right"> 团购开始时间：</td>
    <td>                                        <asp:TextBox ID="TextBoxSStartTime1" runat="server" CssClass="input1"></asp:TextBox>
                    <img id="imgCalendarStartTime" alt="" src="../images/Calendar.png" 
                                    style="width: 16px; height: 18px;" />
                            <asp:RegularExpressionValidator ID="RegularExpressionValidatorStartTime" 
                            runat="server" ControlToValidate="TextBoxSStartTime1" 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>
                            <ShopNum1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" 
                                        EnableScriptGlobalization="True" EnableScriptLocalization="True">
                            </ShopNum1:ToolkitScriptManager>
                            &nbsp;<ShopNum1:CalendarExtender 
                                      ID="CalendarExtender1" runat="server" TargetControlID="TextBoxSStartTime1" 
                                      PopupButtonID="imgCalendarStartTime" CssClass="ajax__calendar">
                            </ShopNum1:CalendarExtender></td>
                            
    <td>                                        &nbsp;</td>
                            
    <td><asp:TextBox ID="TextBoxSStartTime2" runat="server" CssClass="input1"></asp:TextBox>
                    <img id="imgCalendarStartTime2" alt="" src="../images/Calendar.png" 
                                    style="width: 16px; height: 18px;" />
                        <asp:RegularExpressionValidator ID="RegularExpressionValidatorEndTime" 
                            runat="server" ControlToValidate="TextBoxSStartTime2" 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>
                    <ShopNum1:CalendarExtender 
                                     ID="CalendarExtender2" runat="server" TargetControlID="TextBoxSStartTime2" 
                         PopupButtonID="imgCalendarStartTime2" CssClass="ajax__calendar">
                        </ShopNum1:CalendarExtender></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="right">团购结束时间：</td>
    <td>                 <asp:TextBox ID="TextBoxSEndTime1" runat="server" CssClass="input1"></asp:TextBox>
                    <img id="imgCalendarEndTime" alt="" src="../images/Calendar.png" 
                                    style="width: 16px; height: 18px;" />
                        <asp:RegularExpressionValidator ID="RegularExpressionValidatorSEndTime1" 
                            runat="server" ControlToValidate="TextBoxSEndTime1" 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>
                    <ShopNum1:CalendarExtender 
                                     ID="CalendarExtender3" runat="server" TargetControlID="TextBoxSEndTime1" 
                         PopupButtonID="imgCalendarEndTime" CssClass="ajax__calendar">
                        </ShopNum1:CalendarExtender></td>
    <td>                 &nbsp;</td>
    <td><asp:TextBox ID="TextBoxSEndTime2" runat="server" CssClass="input1"></asp:TextBox>
                    <img id="imgCalendarEndTime2" alt="" src="../images/Calendar.png" 
                                    style="width: 16px; height: 18px;" />
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" 
                            runat="server" ControlToValidate="TextBoxSEndTime2" 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>
                    <ShopNum1:CalendarExtender 
                                     ID="CalendarExtender4" runat="server" TargetControlID="TextBoxSEndTime2" 
                         PopupButtonID="imgCalendarEndTime2" CssClass="ajax__calendar">
                        </ShopNum1:CalendarExtender>
    </td>
                <td style="width: 42px; height: 25px">
    <asp:Button ID="ButtonSearch" runat="server" 
                        onclick="ButtonSearch_Click" Text="查询" CssClass="bt2" /></td>
   
  </tr>
</table>
            </div>
&nbsp;<table  style="width:100%">
                    <tr>
                        <td align="center">
            <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>
                </asp:TemplateField>
                    <asp:BoundField DataField="Guid" HeaderText="Guid" Visible="False" />
                    <asp:BoundField DataField="ProductName" HeaderText="商品名称" 
                        SortExpression="ProductName" />
                    <asp:TemplateField HeaderText="状态" SortExpression="IsEnd">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text= '<%# ChangeIsEnd(DataBinder.Eval(Container, "DataItem(IsEnd)","{0}")) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="StartTime" HeaderText="团购开始时间" 
                        SortExpression="StartTime"></asp:BoundField>
                    <asp:BoundField DataField="EndTime" HeaderText="团购结束时间" 
                        SortExpression="EndTime"></asp:BoundField>
                    <asp:BoundField HeaderText="保证金" DataField="Deposit" SortExpression="Deposit"></asp:BoundField>
                    <asp:BoundField HeaderText="限购数量" DataField="RestrictCount" 
                        SortExpression="RestrictCount"></asp:BoundField>
                    <asp:BoundField HeaderText="订购数量" DataField="SpeakForCount" 
                        SortExpression="SpeakForCount"></asp:BoundField>
                    <asp:BoundField HeaderText="订单数量" DataField="OrderCount" 
                        SortExpression="OrderCount"></asp:BoundField>
                    <asp:BoundField HeaderText="当前价格" DataField="CurrentPrice" 
                        SortExpression="CurrentPrice" />
                </Columns>
            </cc1:Num1GridView>
                        </td>
                    </tr>
                       <tr>
                        <td align="left">
                        <div class="vote">
                        <asp:Button ID="ButtonAdd" runat="server" onclick="ButtonAdd_Click" 
                                onclientclick="GetCheckedBoxValues()" Text="添加" CausesValidation="False" CssClass="bt2"/>
                            &nbsp;<asp:Button ID="ButtonEdit" runat="server" onclick="ButtonEdit_Click" 
                                Text="编辑" CausesValidation="False" onclientclick="return EditButton()" CssClass="bt2"/>
                            &nbsp;<asp:Button ID="ButtonDelete" runat="server" onclick="ButtonDelete_Click" 
                                onclientclick="return DeleteButton()" Text="删除" CausesValidation="False" CssClass="bt2"/>                       
                &nbsp;<asp:Button ID="ButtonEdit0" runat="server" 
                                onclientclick="return EditButton()" Text="查看订单" CausesValidation="False" CssClass="bt3"/>
                &nbsp;&nbsp;<uc1: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_OrganizBuyInfo_Action" 
        >
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBoxSProductGuid" Name="productName" PropertyName="Text" 
                Type="String" />
            <asp:ControlParameter ControlID="TextBoxSStartTime1" 
                Name="startTime1" PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxSStartTime2" Name="startTime2" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxSEndTime1" Name="endTime1" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxSEndTime2" Name="endTime2" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="DropDownListSIsEnd" Name="isEnd" 
                PropertyName="SelectedValue" Type="Int32" />
            <asp:Parameter Name="isDeleted" Type="Int32" DefaultValue="0" />
        </SelectParameters>
    </asp:ObjectDataSource>
    </form>
</body>
</html>