<%@ Page Language="C#" MasterPageFile="~/Master/officeMaster.master" AutoEventWireup="true"
    CodeFile="goods.aspx.cs" Inherits="goods_goods" Title="物品管理" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <style type="text/css">
        .style2
        {
            font-size: x-large;
        }
        .style3
        {
            font-size: x-large;
        }
        .style4
        {
            font-family: 宋体;
        }
        .style5
        {
            font-size: 14pt;
        }
    </style>
    <script language="javascript" type="text/javascript">
        // <!CDATA[

        function Button4_onclick() {

            document.getElementById("<%=Textname.ClientID%>").value = "";
        }


        // ]]>
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <%--<div style="background-image: url('../b2c/images/win_top.png'); font-weight: bold;
        height: 31px; line-height: 30px;" class="style3">
        <center>
            <span class="style2">物品管理</span></center>
    </div>--%>
    <table class="usertableborder" cellspacing="1" cellpadding="3" width="100%" align="center"
        border="0">
        <tr>
            <th>
                物品管理
            </th>
        </tr>
        <tr>
            <td>
                <asp:Label ID="Label2" runat="server" Text="  物品名称："></asp:Label>
                <asp:TextBox ID="Textname" runat="server" Width="161px"></asp:TextBox>
                &nbsp;<asp:Button ID="find" runat="server" Text="查  找" Width="69px" OnClick="Button1_Click1"
                    BackColor="#CCCCCC" />
                &nbsp;
                <input id="Button4" type="button" style="width: 69px; background-color: #CCCCCC;"
                    value="清  除" onclick="return Button4_onclick()" />
                &nbsp;
                <asp:Button ID="Button3" runat="server" Text="增 加" Width="69px" OnClick="Button3_Click"
                    BackColor="#CCCCCC" />
            </td>
        </tr>
    </table>
    <%-- <div style="height: 25px">
        <asp:Label ID="Label2" runat="server" Text="  物品名称：" Style="font-size: 13pt"></asp:Label>
        <asp:TextBox ID="Textname" runat="server" Height="22px" Style="font-family: 宋体; font-size: 13pt"
            Width="161px"></asp:TextBox>
        &nbsp;<asp:Button ID="find" runat="server" Height="22px" Text="查  找" Width="69px"
            Style="font-family: 宋体; font-size: 13pt" OnClick="Button1_Click1" />
        &nbsp;
        <input id="Button4" type="button" style="font-family: 宋体; font-size: 13pt; height: 22px;
            width: 69px;" value="清  除" onclick="return Button4_onclick()" />
        &nbsp;
        <asp:Button ID="Button3" runat="server" Height="22px" Text="添  加" Width="69px" Style="font-family: 宋体;
            font-size: 13pt" OnClick="Button3_Click" />
    </div>--%>
    <div>
        <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
            <HeaderTemplate>
                <table border="1" width="100%" style="content">
                    <tr style="background-color: #999999">
                        <th>
                            物品编码
                        </th>
                        <th>
                            物品名称
                        </th>
                        <th>
                            物品价格
                        </th>
                        <th>
                            创建时间
                        </th>
                        <th>
                            停用标志
                        </th>
                        <th>
                            详细及修改
                        </th>
                        <th>
                            停用
                        </th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr align="center" onmousemove="this.style.backgroundColor='#0099CC'" onmouseout="this.style.backgroundColor='white'">
                    <td style="width: 100">
                        <%#DataBinder.Eval(Container.DataItem, "Gid")%>
                    </td>
                    <td style="width: 300">
                        <%#DataBinder.Eval(Container.DataItem, "GoodsName")%>
                    </td>
                    <td style="width: 200">
                        <%#DataBinder.Eval(Container.DataItem, "Goodprice")%>
                    </td>
                    <td style="width: 120">
                        <%#Eval("CreateTime", "{0:yyyy-mm-dd}")%>
                    </td>
                    <td style="width: 100">
                        <%#Eval("State").ToString() == "0" ? "是" : "否"%>
                    </td>
                    <td style="width: 100">
                        <asp:LinkButton ID="LinkButton3" runat="server" CommandName="updateUser" CommandArgument='<%# Eval("Gid") %>'>详细</asp:LinkButton>
                    </td>
                    <td style="width: 100">
                        <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="return confirm( '您确认要执行吗？ ') "
                            CommandName="Delete" CommandArgument='<%# Eval("Gid") %>'> <%#Eval("State").ToString() == "0" ? "恢复" : "停用"%> </asp:LinkButton>
                        <asp:HiddenField ID="HiddenField1" runat="server" Value='<%#DataBinder.Eval(Container.DataItem, "State")%>' />
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
    </div>
    <center>
        <asp:Label ID="Label3" runat="server" Text="当前"></asp:Label>
        <asp:Label ID="lblCurrentPage" runat="server" Text="1"></asp:Label>
        <asp:Label ID="Label5" runat="server" Text="/"></asp:Label>
        <asp:Label ID="lblPageCount" runat="server" Text="X"></asp:Label>
        <asp:Label ID="Label4" runat="server" Text="页"></asp:Label>
        <span class="style4">
            <asp:Button ID="Button2" runat="server" Text="上 页" Width="56px" OnClick="Button1_Click"
                BackColor="#CCCCCC" />
        </span>&nbsp; <span class="style4">
            <asp:Button ID="Button5" runat="server" Text="下 页" Width="56px" OnClick="Button2_Click"
                BackColor="#CCCCCC" />
        </span><span class="style5"></span>
    </center>
</asp:Content>
