<%@ page language="C#" autoeventwireup="true" inherits="user_buy, aoshuosoft" %>

<!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 runat="server">
    <title>采购订单</title>
    <link rel="stylesheet" href="user.css" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Panel ID="addedit" runat="server" Visible="false" Width="100%">
            <table class="usertable" border="0" cellpadding="3" cellspacing="1" >
                <tr>
                    <td class="bt" colspan="2" style="text-align: center; height: 35px;">
                        <asp:Literal ID="actionbt" runat="server"></asp:Literal></td>
                </tr>
                <tr>
                    <td>
                        产品名称：</td>
                    <td>
                        <asp:TextBox ID="name" runat="server" Width="178px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>
                        订购数量：</td>
                    <td>
                        <asp:TextBox ID="number" runat="server" Width="178px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>
                        收货地址：</td>
                    <td>
                        <asp:TextBox ID="incomeaddress" runat="server" Width="178px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>
                        收货人姓名：</td>
                    <td>
                        <asp:TextBox ID="incomename" runat="server" Width="178px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>
                        收货人电话：</td>
                    <td>
                        <asp:TextBox ID="incomephone" runat="server" Width="178px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>
                        其他要求：</td>
                    <td>
                        <asp:TextBox ID="explain" runat="server" Height="106px" TextMode="MultiLine"
                            Width="488px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:Button ID="add" runat="server"  Text="提 交" OnClick="add_Click" />
                        <asp:Button ID="edit" runat="server"  Text="修 改" OnClick="edit_Click" /></td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="all" runat="server" Height="50px" Width="100%" Visible="false">
            <asp:GridView OnPageIndexChanging="GridView1_PageIndexChanging" ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" Width="100%" CellPadding="4" ForeColor="#333333" GridLines="None" PageSize="20">
                <Columns>
                    <asp:TemplateField HeaderText="产品名称"><ItemTemplate><a href='buy.aspx?action=edit&id=<%#Eval("id") %>'><%#Eval("name") %></a></ItemTemplate></asp:TemplateField>
                    <asp:BoundField HeaderText="订购数量" DataField="number" />
                    <asp:BoundField HeaderText="订购状态" DataField="state" >
                        <ItemStyle ForeColor="Red" />
                        <FooterStyle ForeColor="Red" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="编辑"><ItemTemplate><a href='buy.aspx?action=edit&id=<%#Eval("id") %>'>编辑</a></ItemTemplate></asp:TemplateField>
                    <asp:TemplateField HeaderText="删除"><ItemTemplate><a href='buy.aspx?action=del&id=<%#Eval("id") %>' onclick="return confirm('删除将不可恢复,您真的要删除吗？')">删除</a></ItemTemplate></asp:TemplateField>
                </Columns>
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <RowStyle BackColor="#EFF3FB" />
                <EditRowStyle BackColor="#2461BF" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView>
            <asp:Literal ID="tj" runat="server"></asp:Literal></asp:Panel>
    
    </div>
    </form>
</body>
</html>
