📄 myfittingsform.aspx
字号:
<%--文件名:MyFittingsForm.aspx--%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="MyFittingsForm.aspx.cs" Inherits="SystemManage_AssetsManage_MyFittingsForm" Title="当前位置:资产管理->增加固定资产(附属设备及配件)" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table style="width: 556px; height: 161px">
<tr>
<td align="left" style="font-size: 0.8em; width: 2232px; font-family: 宋体; height: 16px;
background-color: mediumturquoise">
资产名称:<asp:TextBox ID="TextBox1" runat="server" BackColor="#E0E0E0" ReadOnly="True"
Width="155px"></asp:TextBox>
资产编号:<asp:TextBox ID="TextBox2" runat="server" Width="86px" BackColor="#E0E0E0" ReadOnly="True"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="新增" Width="70px" OnClick="Button1_Click" />
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="修改" Width="70px" />
</td>
</tr>
<tr>
<td align="left" style="font-size: 0.8em; width: 2232px; font-family: 宋体; height: 27px;
background-color: gainsboro">
自编号:<asp:TextBox ID="TextBox3" runat="server" BackColor="Silver" ReadOnly="True"
Width="33px"></asp:TextBox>
设备名称:<asp:TextBox ID="TextBox4" runat="server" Width="209px">X</asp:TextBox>
规格型号:<asp:TextBox ID="TextBox5" runat="server" Width="81px">X</asp:TextBox><br />
生产厂家:<asp:TextBox ID="TextBox6" runat="server" Width="149px">X</asp:TextBox>
出厂日期:<asp:TextBox ID="TextBox7" runat="server" Width="80px">2007-1-1</asp:TextBox>
单位:<asp:TextBox ID="TextBox8" runat="server" Width="27px">台</asp:TextBox>
数量:<asp:TextBox ID="TextBox9" runat="server" Width="27px">0</asp:TextBox><br />
金额:<asp:TextBox ID="TextBox10" runat="server" Width="49px">0</asp:TextBox>
补充说明:<asp:TextBox ID="TextBox11" runat="server" Width="373px">暂无</asp:TextBox></td>
</tr>
<tr>
<td style="width: 2232px; height: 100px; background-color: gainsboro">
<asp:Panel ID="Panel1" runat="server" Height="200px" ScrollBars="Auto" Width="553px">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyAssetsDBConnectionString %>"
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="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="TextBox7" Name="出厂日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="TextBox8" Name="单位" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox9" Name="数量" PropertyName="Text" Type="Int32" />
<asp:ControlParameter ControlID="TextBox10" Name="金额" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox11" Name="补充说明" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox3" Name="自编号" PropertyName="Text" Type="Int32" />
</UpdateParameters>
<SelectParameters>
<asp:ControlParameter ControlID="TextBox2" Name="资产编号" PropertyName="Text" Type="String" />
</SelectParameters>
<InsertParameters>
<asp:ControlParameter ControlID="TextBox2" 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="TextBox7" Name="出厂日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="TextBox8" Name="单位" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox9" Name="数量" PropertyName="Text" Type="Int32" />
<asp:ControlParameter ControlID="TextBox10" Name="金额" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox11" Name="补充说明" PropertyName="Text" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White"
BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="自编号"
DataSourceID="SqlDataSource1" Font-Names="宋体" Font-Size="Small" GridLines="Vertical"
OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
Width="1000px">
<FooterStyle BackColor="#CCCCCC" 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="出厂日期" />
<asp:BoundField DataField="单位" HeaderText="单位" SortExpression="单位" />
<asp:BoundField DataField="数量" HeaderText="数量" SortExpression="数量" />
<asp:BoundField DataField="金额" HeaderText="金额" SortExpression="金额" />
<asp:BoundField DataField="补充说明" HeaderText="补充说明" SortExpression="补充说明" />
</Columns>
<RowStyle BackColor="#EEEEEE" ForeColor="Black" />
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
<AlternatingRowStyle BackColor="#DCDCDC" />
</asp:GridView>
</asp:Panel>
</td>
</tr>
</table>
</asp:Content>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -