温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:固定资产管理系统源码
当前文件路径:DepreciationManage/AssetsManage/MyFittingsForm.aspx

1<%--文件名:MyFittingsForm.aspx--%> 2
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="MyFittingsForm.aspx.cs" Inherits="SystemManage_AssetsManage_MyFittingsForm" Title="当前位置:资产管理->增加固定资产(附属设备及配件)" %> 3
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> 4
<table style="width: 556px; height: 161px"> 5
<tr> 6
<td align="left" style="font-size: 0.8em; width: 2232px; font-family: 宋体; height: 16px; 7
background-color: mediumturquoise"> 8
资产名称:<asp:TextBox ID="TextBox1" runat="server" BackColor="#E0E0E0" ReadOnly="True" 9
Width="155px"></asp:TextBox> 10
资产编号:<asp:TextBox ID="TextBox2" runat="server" Width="86px" BackColor="#E0E0E0" ReadOnly="True"></asp:TextBox> 11
<asp:Button ID="Button1" runat="server" Text="新增" Width="70px" OnClick="Button1_Click" /> 12
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="修改" Width="70px" /> 13
</td> 14
</tr> 15
<tr> 16
<td align="left" style="font-size: 0.8em; width: 2232px; font-family: 宋体; height: 27px; 17
background-color: gainsboro"> 18
自编号:<asp:TextBox ID="TextBox3" runat="server" BackColor="Silver" ReadOnly="True" 19
Width="33px"></asp:TextBox> 20
设备名称:<asp:TextBox ID="TextBox4" runat="server" Width="209px">X</asp:TextBox> 21
规格型号:<asp:TextBox ID="TextBox5" runat="server" Width="81px">X</asp:TextBox><br /> 22
生产厂家:<asp:TextBox ID="TextBox6" runat="server" Width="149px">X</asp:TextBox> 23
出厂日期:<asp:TextBox ID="TextBox7" runat="server" Width="80px">2007-1-1</asp:TextBox> 24
单位:<asp:TextBox ID="TextBox8" runat="server" Width="27px">台</asp:TextBox> 25
数量:<asp:TextBox ID="TextBox9" runat="server" Width="27px">0</asp:TextBox><br /> 26
金额:<asp:TextBox ID="TextBox10" runat="server" Width="49px">0</asp:TextBox> 27
补充说明:<asp:TextBox ID="TextBox11" runat="server" Width="373px">暂无</asp:TextBox></td> 28
</tr> 29
<tr> 30
<td style="width: 2232px; height: 100px; background-color: gainsboro"> 31
<asp:Panel ID="Panel1" runat="server" Height="200px" ScrollBars="Auto" Width="553px"> 32
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyAssetsDBConnectionString %>" 33
DeleteCommand="DELETE FROM [附属设备] WHERE [自编号] = @自编号" InsertCommand="INSERT INTO [附属设备] ([资产编号], [设备名称], [规格型号], [生产厂家], [出厂日期], [单位], [数量], [金额], [补充说明]) VALUES (@资产编号, @设备名称, @规格型号, @生产厂家, @出厂日期, @单位, @数量, @金额, @补充说明)" 34
SelectCommand="SELECT * FROM [附属设备] WHERE ([资产编号] = @资产编号)" UpdateCommand="UPDATE [附属设备] SET [资产编号] = @资产编号, [设备名称] = @设备名称, [规格型号] = @规格型号, [生产厂家] = @生产厂家, [出厂日期] = @出厂日期, [单位] = @单位, [数量] = @数量, [金额] = @金额, [补充说明] = @补充说明 WHERE [自编号] = @自编号"> 35
<DeleteParameters> 36
<asp:Parameter Name="自编号" Type="Int32" /> 37
</DeleteParameters> 38
<UpdateParameters> 39
<asp:ControlParameter ControlID="TextBox2" Name="资产编号" PropertyName="Text" Type="String" /> 40
<asp:ControlParameter ControlID="TextBox4" Name="设备名称" PropertyName="Text" Type="String" /> 41
<asp:ControlParameter ControlID="TextBox5" Name="规格型号" PropertyName="Text" Type="String" /> 42
<asp:ControlParameter ControlID="TextBox6" Name="生产厂家" PropertyName="Text" Type="String" /> 43
<asp:ControlParameter ControlID="TextBox7" Name="出厂日期" PropertyName="Text" Type="DateTime" /> 44
<asp:ControlParameter ControlID="TextBox8" Name="单位" PropertyName="Text" Type="String" /> 45
<asp:ControlParameter ControlID="TextBox9" Name="数量" PropertyName="Text" Type="Int32" /> 46
<asp:ControlParameter ControlID="TextBox10" Name="金额" PropertyName="Text" Type="Double" /> 47
<asp:ControlParameter ControlID="TextBox11" Name="补充说明" PropertyName="Text" Type="String" /> 48
<asp:ControlParameter ControlID="TextBox3" Name="自编号" PropertyName="Text" Type="Int32" /> 49
</UpdateParameters> 50
<SelectParameters> 51
<asp:ControlParameter ControlID="TextBox2" Name="资产编号" PropertyName="Text" Type="String" /> 52
</SelectParameters> 53
<InsertParameters> 54
<asp:ControlParameter ControlID="TextBox2" Name="资产编号" PropertyName="Text" Type="String" /> 55
<asp:ControlParameter ControlID="TextBox4" Name="设备名称" PropertyName="Text" Type="String" /> 56
<asp:ControlParameter ControlID="TextBox5" Name="规格型号" PropertyName="Text" Type="String" /> 57
<asp:ControlParameter ControlID="TextBox6" Name="生产厂家" PropertyName="Text" Type="String" /> 58
<asp:ControlParameter ControlID="TextBox7" Name="出厂日期" PropertyName="Text" Type="DateTime" /> 59
<asp:ControlParameter ControlID="TextBox8" Name="单位" PropertyName="Text" Type="String" /> 60
<asp:ControlParameter ControlID="TextBox9" Name="数量" PropertyName="Text" Type="Int32" /> 61
<asp:ControlParameter ControlID="TextBox10" Name="金额" PropertyName="Text" Type="Double" /> 62
<asp:ControlParameter ControlID="TextBox11" Name="补充说明" PropertyName="Text" Type="String" /> 63
</InsertParameters> 64
</asp:SqlDataSource> 65
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White" 66
BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="自编号" 67
DataSourceID="SqlDataSource1" Font-Names="宋体" Font-Size="Small" GridLines="Vertical" 68
OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" 69
Width="1000px"> 70
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" /> 71
<Columns> 72
<asp:CommandField ButtonType="Button" HeaderText="选择" ShowSelectButton="True" /> 73
<asp:TemplateField HeaderText="删除" ShowHeader="False"> 74
<ItemTemplate> 75
<asp:Button ID="Button1" runat="server" CausesValidation="False" CommandName="Delete" 76
Text="删除" /> 77
</ItemTemplate> 78
</asp:TemplateField> 79
<asp:BoundField DataField="自编号" HeaderText="自编号" InsertVisible="False" ReadOnly="True" 80
SortExpression="自编号" /> 81
<asp:BoundField DataField="资产编号" HeaderText="资产编号" SortExpression="资产编号" /> 82
<asp:BoundField DataField="设备名称" HeaderText="设备名称" SortExpression="设备名称" /> 83
<asp:BoundField DataField="规格型号" HeaderText="规格型号" SortExpression="规格型号" /> 84
<asp:BoundField DataField="生产厂家" HeaderText="生产厂家" SortExpression="生产厂家" /> 85
<asp:BoundField DataField="出厂日期" HeaderText="出厂日期" SortExpression="出厂日期" /> 86
<asp:BoundField DataField="单位" HeaderText="单位" SortExpression="单位" /> 87
<asp:BoundField DataField="数量" HeaderText="数量" SortExpression="数量" /> 88
<asp:BoundField DataField="金额" HeaderText="金额" SortExpression="金额" /> 89
<asp:BoundField DataField="补充说明" HeaderText="补充说明" SortExpression="补充说明" /> 90
</Columns> 91
<RowStyle BackColor="#EEEEEE" ForeColor="Black" /> 92
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" /> 93
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /> 94
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" /> 95
<AlternatingRowStyle BackColor="#DCDCDC" /> 96
</asp:GridView> 97
</asp:Panel> 98
</td> 99
</tr> 100
</table> 101
</asp:Content> 102
103




