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

📄 change.aspx

📁 纯代码实现了从Oracle数据库中调用并添加、修改、删除设备信息表记录的功能。
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="change.aspx.cs" Inherits="_Default" %>

<!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>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ListBox ID="ListBox1" runat="server" AutoPostBack="True" Height="163px" OnSelectedIndexChanged="ListBox1_SelectedIndexChanged"
            Width="130px" DataSourceID="SqlDataSource1" DataTextField="装置编号" DataValueField="装置编号"></asp:ListBox>
        <asp:GridView ID="GridView1" runat="server" BackColor="White" BorderColor="#3366CC"
            BorderStyle="None" BorderWidth="1px" CellPadding="4" Height="1px" Width="584px">
            <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
            <RowStyle BackColor="White" ForeColor="#003399" />
            <SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
            <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
            <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=ZWQ;User ID=HB;Password=123456;Unicode=True"
            ProviderName="System.Data.OracleClient" SelectCommand='SELECT * FROM "设备信息表"'></asp:SqlDataSource>
        <br />
        <table border="1">
            <tr>
                <td style="width: 1458px; height: 28px;">
        装置编号</td>
                <td style="width: 275px; height: 28px;">
                    <asp:TextBox ID="TextBox1" runat="server" ReadOnly="True"></asp:TextBox>★</td>
                <td style="width: 516px; height: 28px;">
        出厂编号</td>
                <td style="width: 409px; height: 28px;">
                    <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td style="width: 1458px">
        装置名称</td>
                <td style="width: 275px">
                    <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>★</td>
                <td style="width: 516px">
        装置型号</td>
                <td style="width: 409px">
                    <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>★</td>
            </tr>
            <tr>
                <td style="width: 1458px; height: 28px;">
        出厂日期</td>
                <td style="width: 275px; height: 28px;">
                    <asp:TextBox ID="TextBox5" runat="server"></asp:TextBox></td>
                <td style="width: 516px; height: 28px;">
        购置日期</td>
                <td style="width: 409px; height: 28px;">
                    <asp:TextBox ID="TextBox6" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td style="width: 1458px">
        购入单价</td>
                <td style="width: 275px">
                    <asp:TextBox ID="TextBox7" runat="server"></asp:TextBox></td>
                <td style="width: 516px">
        装置状态</td>
                <td style="width: 409px">
                    <asp:DropDownList ID="DropDownList1" runat="server" Width="153px">
                        <asp:ListItem>启用</asp:ListItem>
                        <asp:ListItem>停用</asp:ListItem>
                    </asp:DropDownList>★</td>
            </tr>
            <tr>
                <td style="width: 1458px">
        装置制造商</td>
                <td style="width: 275px">
                    <asp:TextBox ID="TextBox9" runat="server"></asp:TextBox></td>
                <td style="width: 516px">
        装置类别</td>
                <td style="width: 409px">
                    <asp:TextBox ID="TextBox10" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td style="width: 1458px">
        装置精度</td>
                <td style="width: 275px">
                    <asp:TextBox ID="TextBox11" runat="server"></asp:TextBox></td>
                <td style="width: 516px">
        装置量程</td>
                <td style="width: 409px">
                    <asp:TextBox ID="TextBox12" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td style="width: 1458px; height: 23px">
                    备注:</td>
                <td colspan="3" style="height: 23px">
                    <asp:TextBox ID="TextBox13" runat="server" Width="410px"></asp:TextBox></td>
            </tr>
            <tr>
                <td colspan="4">
                    注:带★者为必填项目。<br />
                    <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="修改" />

                    <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="清空" />&nbsp;
                    <asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="返回" /></td>
            </tr>
        </table>
        &nbsp;<asp:Label ID="Label1" runat="server" Width="145px"></asp:Label></div>
    </form>
</body>
</html>

⌨️ 快捷键说明

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