⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 goodssaveall.aspx.txt

📁 本源码实现了对数据库的最基本的操作
💻 TXT
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GoodsSaveAll.aspx.cs" Inherits="Manage_GoodsSaveAll" %>

<!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>
        <%=typename%>
        --后台管理</title>
    <link href="../App_Themes/Theme1/StyleSheetManage2.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
        <asp:panel id="PalAllGoodsSaveAll" Runat="server">
        <table class="bor_1" id="Table1" cellspacing="0" cellpadding="0" width="800" align="center"
            border="0">
            <tr>
                <td class="bgTitler" align="center" width="800" height="30">
                    <b>所有库存商品列表</b></td>
            </tr>
        </table>
        <br>
        <table id="Table2" bordercolor="#003399" cellspacing="0" cellpadding="0" width="800"
            align="center" border="0">
            <tr>
                <td valign="top" align="center" width="100%">
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:WShopConnectionString %>"
                        SelectCommand="SELECT d.SaveNum, d.SaveAddNum, d.SaveTime, d.SaveAddTime, c.GoodsID, c.GoodsName, a.TypeName, b.BorderName FROM GoodsType AS a INNER JOIN GoodsInfo AS c ON a.TypeID = c.TypeID INNER JOIN GoodsBorder AS b ON c.BorderID = b.BorderID INNER JOIN GoodsSave AS d ON c.GoodsID = d.GoodsID ORDER BY d.SaveNum, a.TypeID DESC, b.BorderID DESC, c.GoodsOrder DESC">
                    </asp:SqlDataSource>
                    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
                        AutoGenerateColumns="False" CellPadding="4" DataKeyNames="GoodsID" DataSourceID="SqlDataSource1"
                        ForeColor="#333333" Width="100%">
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <Columns>
                            <asp:BoundField DataField="TypeName" HeaderText="所属一级分类" SortExpression="TypeName">
                                <ItemStyle Width="12%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="BorderName" HeaderText="所属二级分类" SortExpression="BorderName">
                                <ItemStyle Width="12%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="GoodsName" HeaderText="商品名称" SortExpression="GoodsName">
                                <ItemStyle HorizontalAlign="Left" Width="22%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="SaveNum" HeaderText="当前库存数量" SortExpression="SaveNum">
                                <ItemStyle ForeColor="Red" Width="12%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="SaveTime" DataFormatString="{0:yyyy-MM-dd}" HeaderText="最初入库时间"
                                HtmlEncode="False" SortExpression="SaveTime">
                                <ItemStyle Width="12%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="SaveAddNum" HeaderText="最近增加数量" SortExpression="SaveAddNum">
                                <ItemStyle ForeColor="Blue" Width="12%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="SaveAddTime" DataFormatString="{0:yyyy-MM-dd}" HeaderText="最近增加时间"
                                HtmlEncode="False" SortExpression="SaveAddTime">
                                <ItemStyle Width="12%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="GoodsID" HeaderText="GoodsID" InsertVisible="False" ReadOnly="True"
                                SortExpression="GoodsID" Visible="False" />
                            <asp:HyperLinkField DataNavigateUrlFields="GoodsID" DataNavigateUrlFormatString="GoodsSaveAll.aspx?GoodsID={0}"
                                HeaderText="操作" Text="编辑" />
                        </Columns>
                        <RowStyle BackColor="#EFF3FB" />
                        <EditRowStyle BackColor="#2461BF" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <PagerStyle BackColor="White" Font-Underline="True" ForeColor="Black" HorizontalAlign="Center" />
                        <HeaderStyle BackColor="White" Font-Bold="True" ForeColor="Black" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        </asp:panel>
        <asp:Panel ID="PalOneGoodsSaveAll" runat="server" Visible="False">
            <table class="bor_1" cellspacing="0" cellpadding="0" width="800" align="center" border="0">
                <tr>
                    <td class="bgTitler" align="center" colspan="3" height="30">
                        <img id="image1" height="22" src="../images/icon_008.gif" width="22" align="absMiddle"
                            border="0" name="image1">&nbsp;&nbsp; <b>库存商品数量修改</b>
                    </td>
                </tr>
                <tr>
                    <td width="250" height="30">
                        &nbsp;&nbsp;</td>
                    <td width="110" height="30">
                        &nbsp;&nbsp;商品名称:<font color="red">*</font></td>
                    <td width="450">
                        <asp:TextBox ID="GoodsID" runat="server" Visible="False" ReadOnly="True"></asp:TextBox>
                        <asp:TextBox ID="GoodsName" runat="server" Width="200px" ReadOnly="True" CssClass="box1"
                            MaxLength="50" BackColor="#EEEEEE"></asp:TextBox></td>
                </tr>
                <tr>
                    <td width="250" height="30">
                        &nbsp;&nbsp;</td>
                    <td width="110" height="30">
                        &nbsp;&nbsp;商品库存数量:</td>
                    <td width="450">
                        <asp:TextBox ID="SaveNum" runat="server" Width="200px" CssClass="box1" MaxLength="8"></asp:TextBox></td>
                </tr>
                <tr>
                    <td width="250" height="30">
                        &nbsp;&nbsp;</td>
                    <td width="110" height="30">
                        &nbsp;&nbsp;最近增加数量:</td>
                    <td width="450">
                        <asp:TextBox ID="SaveAddNum" runat="server" Width="200px" ReadOnly="True" CssClass="box1"
                            MaxLength="8" BackColor="#EEEEEE"></asp:TextBox></td>
                </tr>
                <tr>
                    <td width="250" height="30">
                        &nbsp;&nbsp;</td>
                    <td width="110" height="30">
                        &nbsp;&nbsp;商品入库时间:<font color="red">*</font></td>
                    <td width="450">
                        <asp:TextBox ID="SaveTime" runat="server" Width="200px" ReadOnly="True" CssClass="box1"
                            MaxLength="50" BackColor="#EEEEEE"></asp:TextBox></td>
                </tr>
                <tr>
                    <td width="250" height="30">
                        &nbsp;&nbsp;</td>
                    <td width="110" height="30">
                        &nbsp;&nbsp;最近增加时间:<font color="red">*</font></td>
                    <td width="450">
                        <asp:TextBox ID="SaveAddTime" runat="server" Width="200px" ReadOnly="True" CssClass="box1"
                            MaxLength="50" BackColor="#EEEEEE"></asp:TextBox></td>
                </tr>
                <tr>
                    <td align="center" colspan="3" height="40">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Button ID="IsAdd" runat="server" CssClass="button-a" Text="提 交" OnClick="IsAdd_Click">
                        </asp:Button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <input class="button-a" onfocus="if(this.blur)this.blur()" type="reset" value="清 空">
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -