<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProductOrderList.aspx.cs"
    Inherits="WstWeb.Admin.Product.ProductOrderList" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="../css/style.css" />
    <script src="../Js/jquery-1.6.min.js" type="text/javascript"></script>
    <script src="../Js/easyui/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="../Js/easyui/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <script src="../Js/PublicComm.js" type="text/javascript"></script>
    <script src="../Js/WinFuns.js" type="text/javascript"></script>
    <script src="../Js/pageloader.js" type="text/javascript"></script>
    <script type="text/javascript">
        //刷新
        var RefreshPage = function (v_istop) {
            if (v_istop) $("#hdnIsTop").val("1");
            else $("#hdnIsTop").val("0");
            __doPostBack("lbtnRefresh", "");
        }
        var CloseChildPage = function (v_istop) {
            new WinFuns().CloseNewWindow("wincomm");
            setTimeout(function () { RefreshPage(v_istop); }, 200);
        }
        var EditInfo = function (v_id) {
            if (v_id == "-1") {
                //top.IndexNewWindow("../Articles/Articleadd.aspx?from=main&id=" + v_id, "添加", top.document.documentElement.clientWidth, top.document.documentElement.clientHeight-20);
            }
            else {
                top.IndexNewWindow("Product/ProductOrderAdd.aspx?from=main&id=" + v_id, "查看", 500, 400);

            }
        }

        var DelInfo = function (v_id) {
            if (v_id == "-1") {
                if (!_alertCheckBoxCollection(document.getElementsByName('items'), '请选择需要删除的内容！')) {
                    var res = confirm("确定要删除所选记录吗？");
                    if (res == true) {
                        top.IndexNewWindow("Product/ProductOrderDel.aspx?from=main&action=Del&id=" + _getCheckBoxCollectionValue(document.getElementsByName('items')), "删除产品请购信息", 150, top.document.documentElement.clientHeight - 500);
                        //_goto(url + '&Id=' + _getCheckBoxCollectionValue(document.getElementsByName('items')));
                    }
                }
            } else {
                top.IndexNewWindow("Product/ProductOrderDel.aspx?from=main&action=Del&id=" + v_id, "删除产品请购信息", 150, top.document.documentElement.clientHeight - 500);
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="ctright">
        <div class="map">
            <h3>
                <strong class="left">产品请购管理</strong><strong class="right search_icon"><a href="JavaScript:void(0)"
                    onclick="EditInfo(-1)"></a></strong></h3>
        </div>
        <div class="clear">
        </div>
        <div class="form" style="margin-top: 10px;">
         <div class="map">
                <h3>
                    <strong class="left"><a href="JavaScript:void(0)" onclick="DelInfo(-1)">批量删除</a></strong>
                </h3>
            </div>
            <div class="clear">
            </div>
            <table class="gridView" cellspacing="0" cellpadding="0" rules="all" border="1" style="border-collapse: collapse;">
                <tr>
                    <th scope="col">
                        <input type="checkbox" name="CheckAll" id="CheckAll" title="全选" />
                    </th>
                    <th scope="col">
                        所属产品
                    </th>
                    <th scope="col">
                        联系人
                    </th>
                    <th scope="col">
                        联系方式
                    </th>
                    <th scope="col">
                        申请时间
                    </th>
                    <th scope="col">
                        修改
                    </th>
                    <th scope="col">
                        删除
                    </th>
                </tr>
                <asp:Repeater ID="RepList" runat="server">
                    <ItemTemplate>
                        <tr>
                            <td>
                                <input type="checkbox" name="items" id="checkbox2" value='<%# Eval("Id") %>' />
                            </td>
                            <td align="left">
                                    <%# Eval("ProductName")%>
                            </td>
                            <td>
                                <%# Eval("Title")%>
                            </td>
                            
                            <td>
                                <%#Eval("ContactType")%>
                            </td>
                            <td>
                                <%# Convert.ToDateTime(Eval("CreateTime").ToString()).ToString("yyyy-MM-dd")%>
                            </td>
                            <td>
                                <a href="javascript:void(0)" class="bluelk" onclick="EditInfo(<%# Eval("Id") %>);">[修改]</a>
                            </td>
                            <td>
                                <a href="javascript:void(0)" class="bluelk" onclick="var res = confirm('确定要删除该记录吗？'); if(res == true){DelInfo(<%# Eval("Id") %>);}">
                                    [删除]</a>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </table>
            <div class="page-fenye">
                <webdiyer:AspNetPager ID="AspNetPager1" HorizontalAlign="Center" Font-Bold="true"
                    runat="server" Width="100%" CenterCurrentPageButton="True" OnPageChanging="AspNetPager1_PageChanging"
                    ShowPageIndexBox="Always" FirstPageText="首页" PrevPageText="上一页" NextPageText="下一页"
                    LastPageText="尾页" PageIndexBoxType="TextBox" CurrentPageButtonTextFormatString="{0:[0]}"
                    AlwaysShow="True" ShowNavigationToolTip="True" PageSize="20" CustomInfoHTML="记录总数：%RecordCount%"
                    CustomInfoSectionWidth="200px" ShowCustomInfoSection="Left" CustomInfoStyle="text-valign:middle;margin-right:0px;"
                    CustomInfoClass="bluelk">
                </webdiyer:AspNetPager>
            </div>
        </div>
    </div>
    <input type="hidden" id="hdnIsTop" runat="server" value="0" />
    <asp:LinkButton ID="lbtnRefresh" runat="server" OnClick="lbtnRefresh_Click"></asp:LinkButton>
    </form>
</body>
</html>
