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

📄 stock_add.aspx

📁 该商品销售管理系统是一个基于WEB的适应于小型企业的管理系统!可以实现商品基本信息的查询。添加
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Stock_add.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="CustomControlFreak"Namespace="CustomControlFreak"TagPrefix="cc1" %>

<!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>无标题页</title>
<script language="javascript" type="text/javascript">
// <!CDATA[
 function getPrice()
        {
            with(document)
            {
                var number = document.getElementById("TextBox2");
                var price = document.getElementById("TextBox3");
                var payment = document.getElementById("TextBox4");
                var num = number.value * price.value;
                payment.value = num;
                
            }
            getPrice1();
        }
        function getPrice1()
        {
            with(document)
            {
                var payment = document.getElementById("TextBox4");
                var factpayment = document.getElementById("TextBox5");
                var nopayment = document.getElementById("TextBox6");
                var num = payment.value - factpayment.value;
                if (num<0)
                {
                    alert("实付金额应小于等于应付金额!");
                    factpayment.value="";

                }
                else
                {
                    nopayment.value = num;
                }
            }
        }


function clearForm()
{
    var list = document.form1.getElementsByTagName("input");
    for (var i = 0; i < list.length; ++i){
        if (list[i].type=="text" && list[i].id != "TextBox1"){
            list[i].value="";
        }
    }
    var dlist = document.getElementById("DropDownList1");
    dlist.value = dlist.options.item(0).value;
}

// ]]>
</script>
</head>
<body style="text-align: center">
    <form id="form1" runat="server">
    <div style="text-align: center">
        <span style="font-size: 10pt; color: #990000; font-family: 宋体">进货管理→添加进货信息</span><br />
        <table border="0" style="width: 85%; height: 200px; font-size: smaller; border-collapse: separate; border-right: #003399 1px solid; border-top: #003399 1px solid; border-left: #003399 1px solid; border-bottom: #003399 1px solid;">
            <tr>
                <td align="center" style="width: 100px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid; height: 40px;">
                    <asp:Label ID="CommodityName" runat="server" Text="商品名称:"></asp:Label></td>
                <td align="left" style="width: 199px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
                    <asp:DropDownList ID="DropDownList1" runat="server" Width="87px" DataSourceID="SqlDataSource1" DataTextField="CommodityName" DataValueField="id" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" AutoPostBack="true" OnDataBound="DropDownList1_DataBound" >
                        <asp:ListItem Selected="True">soft</asp:ListItem>
                        <asp:ListItem Selected="True">office</asp:ListItem>
                        <asp:ListItem Selected="True">foods</asp:ListItem>
                        <asp:ListItem Selected="True">water</asp:ListItem>
                        <asp:ListItem Selected="True">apple</asp:ListItem>
                        <asp:ListItem Selected="True">tomato</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="DropDownList1"
                        ErrorMessage="*"></asp:RequiredFieldValidator></td>
                <td align="center" style="width: 100px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
                    <asp:Label ID="CompanyID" runat="server" Text="供应商:"></asp:Label></td>
                <td align="left" style="width: 200px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
                  <%--  &nbsp;<asp:HiddenField ID="HiddenField1" runat="server" OnValueChanged="HiddenField1_ValueChanged" />--%>
                    <asp:TextBox ID="TextBox1" runat="server" Width="115px" ReadOnly="True" OnTextChanged="TextBox1_TextChanged2"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="center" style="width: 100px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid; height: 40px;">
                    <asp:Label ID="Number" runat="server" Text="数 量:"></asp:Label></td>
                <td align="left" style="width: 199px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
                    <asp:TextBox ID="TextBox2" runat="server" Width="60px" style="left: 1px; position: relative; top: 6px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2"
                        ErrorMessage="*"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox2"
                        ErrorMessage="请输入非负整数" ValidationExpression="^\d+$" style="left: 2px; position: relative; top: 1px"></asp:RegularExpressionValidator></td>
                <td align="center" style="width: 100px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
                    <asp:Label ID="Price" runat="server" Text="单 价:"></asp:Label></td>
                <td align="left" style="width: 200px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
                    <asp:TextBox ID="TextBox3" runat="server" Width="47px" ValidationGroup="^\\d+$" style="left: 0px; position: relative; top: 1px"></asp:TextBox>
                    元<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox3"
                        ErrorMessage="*"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="TextBox3"
                        ErrorMessage="请输入非负整数" ValidationExpression="^\d+$" style="left: 2px; position: relative; top: 1px"></asp:RegularExpressionValidator></td>
            </tr>
            <tr>
                <td align="center" style="width: 100px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid; height: 40px;">
                    <asp:Label ID="SettlementType" runat="server" Text="结算方式:"></asp:Label></td>
                <td align="left" style="width: 199px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
                    <asp:DropDownList ID="DropDownList2" runat="server" Width="80px">
                        <asp:ListItem>现金</asp:ListItem>
                        <asp:ListItem>支票</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp; &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
                        ControlToValidate="DropDownList2" ErrorMessage="*"></asp:RequiredFieldValidator></td>
                <td align="center" style="width: 100px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
                    <asp:Label ID="Payment" runat="server" Text="应付金额:"></asp:Label></td>
                <td align="left" style="width: 200px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
                    <asp:TextBox ID="TextBox4" runat="server" Width="102px" AutoPostBack="True" ReadOnly="True"></asp:TextBox>
                    元</td>
            </tr>
            <tr>
                <td align="center" style="width: 100px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid; height: 40px;">
                    <asp:Label ID="FactPayment" runat="server" Text="实付金额:"></asp:Label></td>
                <td align="left" style="width: 199px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
                    <asp:TextBox ID="TextBox5" runat="server" Width="60px" OnTextChanged="TextBox5_TextChanged" style="left: 0px; position: relative; top: 0px"></asp:TextBox>
                    元<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="TextBox5"
                        ErrorMessage="*"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="TextBox5"
                        ErrorMessage="请输入非负整数" ValidationExpression="^\d+$" Width="91px" style="left: 0px; position: relative; top: 0px"></asp:RegularExpressionValidator></td>
                <td align="center" style="width: 100px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
                    <asp:Label ID="NoPayment" runat="server" Text="未付金额:"></asp:Label></td>
                <td align="left" style="width: 200px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
                    <asp:TextBox ID="TextBox6" runat="server" Width="102px" AutoPostBack="True" ReadOnly="True"></asp:TextBox>
                    元</td>
            </tr>
            <tr>
                <td align="center" style="width: 100px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid; height: 40px;">
                    <asp:Label ID="StockDate" runat="server" Text="进货日期:"></asp:Label></td>
                <td align="left" style="width: 199px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
                  <cc1:DaintyDate ID="data" runat="server" CalendarType="JustTextBox" style="position: relative; top: 4px; left: 0px;" Width="153px" EnableTextBox="False"/>
                    &nbsp; &nbsp;
                  </td>
                <td align="center" style="width: 100px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
                    <asp:Label ID="Operate" runat="server" Text="操作员:"></asp:Label></td>
                <td align="left" rowspan="2" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left-width: 1px; border-left-color: #0033cc; width: 200px; border-bottom: #0033cc 0px solid; border-collapse: collapse;">
                    <asp:Label ID="Label2" runat="server" Text="Label" Width="70px" style="left: 0px; position: relative; top: -5px"></asp:Label><br />
                    <br />
                    </td>
            </tr>
            <tr>
                <td align="center" style="width: 100px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid; height: 40px;">
                    <asp:Label ID="ManageMan" runat="server" Text="经手人:"></asp:Label></td>
                <td align="left" style="width: 199px; border-right: #0033cc 1px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 1px solid;">
                    <asp:TextBox ID="TextBox8" runat="server" Width="60px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="TextBox8"
                        ErrorMessage="*"></asp:RequiredFieldValidator></td>
                <td align="center" style="width: 100px; border-right: #0033cc 0px solid; border-top: #0033cc 1px solid; border-left: #0033cc 1px solid; border-bottom: #0033cc 0px solid;">
                    <asp:Label ID="username" runat="server" Text="用户名:"></asp:Label></td>
            </tr>
            <tr>
                <td align="left" colspan="4" style="border-right: #0033cc 1px solid; border-top: #0033cc 1px solid;
                    border-left-width: 1px; border-left-color: #0033cc; border-bottom: #0033cc 1px solid;
                    height: 32px; text-align: center">
                    <asp:Button ID="AddBotton" runat="server" Text="添 加" Width="70px" OnClick="AddBotton_Click" /><input id="ResetBotton" style="width: 70px" type="reset" value="重 置" onclick="clearForm()" /></td>
                  <%-- return ResetBotton_onclick()--%>
            </tr>
        </table>
    
    </div>
   <script type="text/javascript">
        var textDate = document.getElementById("txtdata");
        
        textDate.style.width = "75px";
    </script>    
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:db_sellConnectionString %>"
                        SelectCommand="SELECT [CommodityName], [id] FROM [tb_Commodity]" OnSelecting="SqlDataSource1_Selecting" ></asp:SqlDataSource>
    </form>
</body>
</html>

⌨️ 快捷键说明

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