📄 integrationform.aspx
字号:
<%--文件名:IntegrationForm.aspx--%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="IntegrationForm.aspx.cs" Inherits="PartManage_IntegrationForm" Title="当前位置:配件管理->集成块速查手册" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table style="width: 558px; height: 1px">
<tr>
<td align="center" style="font-size: 0.8em; width: 2051304px; font-family: 宋体;
background-color: mediumspringgreen" rowspan="2">
请选择集成块型号<asp:ListBox ID="ListBox1" runat="server" Height="329px" Width="120px" DataSourceID="SqlDataSource1" DataTextField="规格型号" DataValueField="规格型号" AutoPostBack="True"></asp:ListBox></td>
<td align="left" style="font-size: 0.8em; width: 584px; font-family: 宋体; height: 21px;
background-color: palegoldenrod">
自动编号:<asp:TextBox ID="TextBox1" runat="server" BackColor="Silver" ReadOnly="True"
Width="38px"></asp:TextBox>
规格型号:<asp:TextBox ID="TextBox2" runat="server" Width="106px"></asp:TextBox>
脚位号:<asp:TextBox ID="TextBox3" runat="server" Width="58px"></asp:TextBox><br />
具体功能:<asp:TextBox ID="TextBox4" runat="server" Width="221px"></asp:TextBox>
额定电压:<asp:TextBox ID="TextBox5" runat="server" Width="45px"></asp:TextBox><br />
补充说明:<asp:TextBox ID="TextBox6" runat="server" Width="197px">暂无</asp:TextBox> <asp:Button
ID="Button1" runat="server" Text="新增" Width="67px" OnClick="Button1_Click" />
<asp:Button ID="Button2" runat="server" Text="修改" Width="67px" OnClick="Button2_Click" /></td>
</tr>
<tr>
<td style="overflow: auto; width: 58px; height: 76px; background-color: gainsboro">
<asp:Panel ID="Panel1" runat="server" Height="250px" ScrollBars="Auto" Width="428px">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White"
BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1"
DataKeyNames="自动编号" DataSourceID="SqlDataSource2" Font-Names="宋体" Font-Size="Small"
GridLines="None" OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
Width="700px" Height="10px">
<FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
<Columns>
<asp:CommandField ButtonType="Button" HeaderText="选择" ShowSelectButton="True" />
<asp:TemplateField HeaderText="删除" ShowHeader="False">
<ItemTemplate>
<asp:Button ID="Button1" runat="server" CausesValidation="False" CommandName="Delete"
Text="删除" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="自动编号" HeaderText="自动编号" InsertVisible="False" ReadOnly="True"
SortExpression="自动编号" />
<asp:BoundField DataField="规格型号" HeaderText="规格型号" SortExpression="规格型号" />
<asp:BoundField DataField="脚位号" HeaderText="脚位号" SortExpression="脚位号" />
<asp:BoundField DataField="具体功能" HeaderText="具体功能" SortExpression="具体功能" />
<asp:BoundField DataField="额定电压" HeaderText="额定电压" SortExpression="额定电压" />
<asp:BoundField DataField="补充说明" HeaderText="补充说明" SortExpression="补充说明" />
</Columns>
<RowStyle BackColor="#DEDFDE" ForeColor="Black" />
<SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
<HeaderStyle BackColor="Navy" Font-Bold="True" ForeColor="#E7E7FF" HorizontalAlign="Center" />
</asp:GridView>
</asp:Panel>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyServiceDBConnectionString %>"
SelectCommand="SELECT DISTINCT [规格型号] FROM [集成块手册]"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MyServiceDBConnectionString %>"
DeleteCommand="DELETE FROM [集成块手册] WHERE [自动编号] = @自动编号" InsertCommand="INSERT INTO [集成块手册] ([规格型号], [脚位号], [具体功能], [额定电压], [补充说明]) VALUES (@规格型号, @脚位号, @具体功能, @额定电压, @补充说明)"
SelectCommand="SELECT * FROM [集成块手册] WHERE ([规格型号] = @规格型号)" UpdateCommand="UPDATE [集成块手册] SET [规格型号] = @规格型号, [脚位号] = @脚位号, [具体功能] = @具体功能, [额定电压] = @额定电压, [补充说明] = @补充说明 WHERE [自动编号] = @自动编号">
<DeleteParameters>
<asp:Parameter Name="自动编号" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:ControlParameter ControlID="TextBox2" Name="规格型号" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox3" Name="脚位号" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox4" Name="具体功能" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox5" Name="额定电压" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox6" Name="补充说明" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox1" Name="自动编号" PropertyName="Text" Type="Int32" />
</UpdateParameters>
<SelectParameters>
<asp:ControlParameter ControlID="ListBox1" Name="规格型号" PropertyName="SelectedValue"
Type="String" />
</SelectParameters>
<InsertParameters>
<asp:ControlParameter ControlID="TextBox2" Name="规格型号" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox3" Name="脚位号" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox4" Name="具体功能" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox5" Name="额定电压" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox6" Name="补充说明" PropertyName="Text" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
</td>
</tr>
</table>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -