温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:固定资产管理系统源码
当前文件:
DepreciationManage/AssetsManage/MyAssetsForm.aspx[19K,2009-6-12 11:38:44],打开代码结构图
DepreciationManage/AssetsManage/MyAssetsForm.aspx[19K,2009-6-12 11:38:44],打开代码结构图1<%--文件名:MyAssetsForm.aspx--%> 2
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="MyAssetsForm.aspx.cs" Inherits="SystemManage_AssetsManage_MyAssetsForm" 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: darkturquoise"> 8
请输入查询固定资产名称:<asp:TextBox ID="TextBox1" runat="server" Width="158px">%%</asp:TextBox> 9
<asp:Button ID="Button1" runat="server" Text="查询" Width="70px" /> 10
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="新增" Width="70px" /> 11
<asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="修改" Width="70px" /></td> 12
</tr> 13
<tr> 14
<td align="left" style="font-size: 0.8em; width: 2232px; font-family: 宋体; height: 27px; 15
background-color: gainsboro"> 16
自编号:<asp:TextBox ID="TextBox2" runat="server" BackColor="Silver" ReadOnly="True" 17
Width="33px"></asp:TextBox> 18
资产编号:<asp:TextBox ID="TextBox3" runat="server" Width="75px">GD</asp:TextBox> 19
资产名称:<asp:TextBox ID="TextBox4" runat="server" Width="221px">X</asp:TextBox><br /> 20
规格型号:<asp:TextBox ID="TextBox5" runat="server" Width="75px">X</asp:TextBox> 21
制造厂家:<asp:TextBox ID="TextBox6" runat="server" Width="163px">X</asp:TextBox> 22
出厂日期:<asp:TextBox ID="TextBox7" runat="server" Width="78px">2000-1-1</asp:TextBox><br /> 23
入账日期:<asp:TextBox ID="TextBox8" runat="server" Width="75px">2000-1-2</asp:TextBox> 24
存放地点:<asp:TextBox ID="TextBox9" runat="server" Width="164px">本公司</asp:TextBox> 25
使用部门:<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1" 26
DataTextField="部门名称" DataValueField="部门名称" Width="82px"> 27
</asp:DropDownList><br /> 28
使用状态:<asp:DropDownList ID="DropDownList2" runat="server" Width="82px"> 29
<asp:ListItem>使用中</asp:ListItem> 30
<asp:ListItem>未使用</asp:ListItem> 31
<asp:ListItem>不需用</asp:ListItem> 32
<asp:ListItem>经营性租出</asp:ListItem> 33
<asp:ListItem>其他</asp:ListItem> 34
</asp:DropDownList> 35
增加方式:<asp:DropDownList ID="DropDownList3" runat="server" Width="74px"> 36
<asp:ListItem>购入</asp:ListItem> 37
<asp:ListItem>接受投资</asp:ListItem> 38
<asp:ListItem>接受捐赠</asp:ListItem> 39
<asp:ListItem>融资租入</asp:ListItem> 40
<asp:ListItem>自建</asp:ListItem> 41
<asp:ListItem>盘盈</asp:ListItem> 42
</asp:DropDownList> 43
所属类别:<asp:DropDownList ID="DropDownList4" runat="server" Width="82px"> 44
<asp:ListItem>生产设备</asp:ListItem> 45
<asp:ListItem>运输设备</asp:ListItem> 46
<asp:ListItem>管理用具</asp:ListItem> 47
<asp:ListItem>房屋及建筑物</asp:ListItem> 48
</asp:DropDownList> 49
单位:<asp:TextBox ID="TextBox10" runat="server" Width="43px">台</asp:TextBox><br /> 50
数量:<asp:TextBox ID="TextBox11" runat="server" Width="21px">1</asp:TextBox> 51
单价:<asp:TextBox ID="TextBox12" runat="server" Width="44px">0</asp:TextBox> 52
金额:<asp:TextBox ID="TextBox13" runat="server" Width="53px">0</asp:TextBox> 53
资产原值:<asp:TextBox ID="TextBox14" runat="server" Width="66px">0</asp:TextBox> 54
累计折旧:<asp:TextBox ID="TextBox15" runat="server" Width="53px">0</asp:TextBox><br /> 55
折旧方法:<asp:DropDownList ID="DropDownList5" runat="server" Width="97px"> 56
<asp:ListItem>平均年限法</asp:ListItem> 57
<asp:ListItem>工作量法</asp:ListItem> 58
<asp:ListItem>双倍余额递减法</asp:ListItem> 59
<asp:ListItem>年数总和法</asp:ListItem> 60
<asp:ListItem>不计提折旧</asp:ListItem> 61
<asp:ListItem>其他折旧法</asp:ListItem> 62
</asp:DropDownList> 63
折旧月数:<asp:TextBox ID="TextBox16" runat="server" Width="26px">0</asp:TextBox> 64
已提月数:<asp:TextBox ID="TextBox17" runat="server" Width="37px">0</asp:TextBox> 65
月度折旧额:<asp:TextBox ID="TextBox18" runat="server" Width="70px">0</asp:TextBox><br /> 66
预计净残值:<asp:TextBox ID="TextBox19" runat="server" Width="56px">0</asp:TextBox> 67
补充说明:<asp:TextBox ID="TextBox20" runat="server" Width="209px">暂无</asp:TextBox> 68
<asp:Button ID="Button4" runat="server" OnClick="Button4_Click" Text="附属设备及配件" Width="110px" /><br /> 69
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyAssetsDBConnectionString %>" 70
SelectCommand="SELECT DISTINCT * FROM [公司部门]"></asp:SqlDataSource> 71
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MyAssetsDBConnectionString %>" 72
DeleteCommand="DELETE FROM [可用固定资产视图] WHERE [资产编号] = @资产编号" 73
InsertCommand="INSERT INTO [可用固定资产视图] ([资产编号], [资产名称], [规格型号], [制造厂家], [出厂日期], [入账日期], [存放地点], [使用部门], [使用状态], [增加方式], [所属类别], [单位], [数量], [单价], [金额], [资产原值], [累计折旧], [折旧方法], [折旧月数], [已提月数], [月度折旧额], [预计净残值], [补充说明]) VALUES (@资产编号, @资产名称, @规格型号, @制造厂家, @出厂日期, @入账日期, @存放地点, @使用部门, @使用状态, @增加方式, @所属类别, @单位, @数量, @单价, @金额, @资产原值, @累计折旧, @折旧方法, @折旧月数, @已提月数, @月度折旧额, @预计净残值, @补充说明)" 74
SelectCommand="SELECT * FROM [可用固定资产视图] WHERE ([资产名称] LIKE '%' + @资产名称 + '%')" 75
UpdateCommand="UPDATE [可用固定资产视图] SET [资产名称] = @资产名称, [规格型号] = @规格型号, [制造厂家] = @制造厂家, [出厂日期] = @出厂日期, [入账日期] = @入账日期, [存放地点] = @存放地点,[使用部门] = @使用部门, [使用状态] = @使用状态, [增加方式] = @增加方式, [所属类别] = @所属类别, [单位] = @单位, [数量] = @数量, [单价] = @单价, [金额] = @金额, [资产原值] = @资产原值, [累计折旧] = @累计折旧, [折旧方法] = @折旧方法, [折旧月数] = @折旧月数, [已提月数] = @已提月数, [月度折旧额] = @月度折旧额, [预计净残值] = @预计净残值, [补充说明] = @补充说明 WHERE [资产编号] = @资产编号"> 76
<UpdateParameters> 77
<asp:ControlParameter ControlID="TextBox4" Name="资产名称" PropertyName="Text" Type="String" /> 78
<asp:ControlParameter ControlID="TextBox5" Name="规格型号" PropertyName="Text" Type="String" /> 79
<asp:ControlParameter ControlID="TextBox6" Name="制造厂家" PropertyName="Text" Type="String" /> 80
<asp:ControlParameter ControlID="TextBox7" Name="出厂日期" PropertyName="Text" Type="DateTime" /> 81
<asp:ControlParameter ControlID="TextBox8" Name="入账日期" PropertyName="Text" Type="DateTime" /> 82
<asp:ControlParameter ControlID="TextBox9" Name="存放地点" PropertyName="Text" Type="String" /> 83
<asp:ControlParameter ControlID="DropDownList1" Name="使用部门" PropertyName="SelectedValue" 84
Type="String" /> 85
<asp:ControlParameter ControlID="DropDownList2" Name="使用状态" PropertyName="SelectedValue" 86
Type="String" /> 87
<asp:ControlParameter ControlID="DropDownList3" Name="增加方式" PropertyName="SelectedValue" 88
Type="String" /> 89
<asp:ControlParameter ControlID="DropDownList4" Name="所属类别" PropertyName="SelectedValue" 90
Type="String" /> 91
<asp:ControlParameter ControlID="TextBox10" Name="单位" PropertyName="Text" Type="String" /> 92
<asp:ControlParameter ControlID="TextBox11" Name="数量" PropertyName="Text" Type="Int32" /> 93
<asp:ControlParameter ControlID="TextBox12" Name="单价" PropertyName="Text" Type="Double" /> 94
<asp:ControlParameter ControlID="TextBox13" Name="金额" PropertyName="Text" Type="Double" /> 95
<asp:ControlParameter ControlID="TextBox14" Name="资产原值" PropertyName="Text" Type="Double" /> 96
<asp:ControlParameter ControlID="TextBox15" Name="累计折旧" PropertyName="Text" Type="Double" /> 97
<asp:ControlParameter ControlID="DropDownList5" Name="折旧方法" PropertyName="SelectedValue" 98
Type="String" /> 99
<asp:ControlParameter ControlID="TextBox16" Name="折旧月数" PropertyName="Text" Type="Int32" /> 100
<asp:ControlParameter ControlID="TextBox17" Name="已提月数" PropertyName="Text" Type="Int32" /> 101
<asp:ControlParameter ControlID="TextBox18" Name="月度折旧额" PropertyName="Text" Type="Double" /> 102
<asp:ControlParameter ControlID="TextBox19" Name="预计净残值" PropertyName="Text" Type="Double" /> 103
<asp:ControlParameter ControlID="TextBox20" Name="补充说明" PropertyName="Text" Type="String" /> 104
<asp:ControlParameter ControlID="TextBox3" Name="资产编号" PropertyName="Text" Type="String" /> 105
</UpdateParameters> 106
<DeleteParameters> 107
<asp:Parameter Name="资产编号" Type="String" /> 108
</DeleteParameters> 109
<SelectParameters> 110
<asp:ControlParameter ControlID="TextBox1" Name="资产名称" PropertyName="Text" Type="String" /> 111
</SelectParameters> 112
<InsertParameters> 113
<asp:ControlParameter ControlID="TextBox3" Name="资产编号" PropertyName="Text" Type="String" /> 114
<asp:ControlParameter ControlID="TextBox4" Name="资产名称" PropertyName="Text" Type="String" /> 115
<asp:ControlParameter ControlID="TextBox5" Name="规格型号" PropertyName="Text" Type="String" /> 116
<asp:ControlParameter ControlID="TextBox6" Name="制造厂家" PropertyName="Text" Type="String" /> 117
<asp:ControlParameter ControlID="TextBox7" Name="出厂日期" PropertyName="Text" Type="DateTime" /> 118
<asp:ControlParameter ControlID="TextBox8" Name="入账日期" PropertyName="Text" Type="DateTime" /> 119
<asp:ControlParameter ControlID="TextBox9" Name="存放地点" PropertyName="Text" Type="String" /> 120
<asp:ControlParameter ControlID="DropDownList1" Name="使用部门" PropertyName="SelectedValue" 121
Type="String" /> 122
<asp:ControlParameter ControlID="DropDownList2" Name="使用状态" PropertyName="SelectedValue" 123
Type="String" /> 124
<asp:ControlParameter ControlID="DropDownList3" Name="增加方式" PropertyName="SelectedValue" 125
Type="String" /> 126
<asp:ControlParameter ControlID="DropDownList4" Name="所属类别" PropertyName="SelectedValue" 127
Type="String" /> 128
<asp:ControlParameter ControlID="TextBox10" Name="单位" PropertyName="Text" Type="String" /> 129
<asp:ControlParameter ControlID="TextBox11" Name="数量" PropertyName="Text" Type="Int32" /> 130
<asp:ControlParameter ControlID="TextBox12" Name="单价" PropertyName="Text" Type="Double" /> 131
<asp:ControlParameter ControlID="TextBox13" Name="金额" PropertyName="Text" Type="Double" /> 132
<asp:ControlParameter ControlID="TextBox14" Name="资产原值" PropertyName="Text" Type="Double" /> 133
<asp:ControlParameter ControlID="TextBox15" Name="累计折旧" PropertyName="Text" Type="Double" /> 134
<asp:ControlParameter ControlID="DropDownList5" Name="折旧方法" PropertyName="SelectedValue" 135
Type="String" /> 136
<asp:ControlParameter ControlID="TextBox16" Name="折旧月数" PropertyName="Text" Type="Int32" /> 137
<asp:ControlParameter ControlID="TextBox17" Name="已提月数" PropertyName="Text" Type="Int32" /> 138
<asp:ControlParameter ControlID="TextBox18" Name="月度折旧额" PropertyName="Text" Type="Double" /> 139
<asp:ControlParameter ControlID="TextBox19" Name="预计净残值" PropertyName="Text" Type="Double" /> 140
<asp:ControlParameter ControlID="TextBox20" Name="补充说明" PropertyName="Text" Type="String" /> 141
</InsertParameters> 142
</asp:SqlDataSource> 143
</td> 144
</tr> 145
<tr> 146
<td style="width: 2232px; height: 100px; background-color: gainsboro"> 147
<asp:Panel ID="Panel1" runat="server" Height="200px" ScrollBars="Auto" Width="553px"> 148
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White" 149
BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="资产编号" 150
DataSourceID="SqlDataSource2" Font-Names="宋体" Font-Size="Small" GridLines="Vertical" 151
OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" 152
Width="2000px" AllowSorting="True" Height="250px"> 153
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" /> 154
<Columns> 155
<asp:CommandField ButtonType="Button" HeaderText="选择" ShowSelectButton="True" /> 156
<asp:TemplateField HeaderText="删除" ShowHeader="False"> 157
<ItemTemplate> 158
<asp:Button ID="Button1" runat="server" CausesValidation="False" CommandName="Delete" 159
Text="删除" /> 160
</ItemTemplate> 161
</asp:TemplateField> 162
<asp:BoundField DataField="自编号" HeaderText="自编号" InsertVisible="False" ReadOnly="True" 163
SortExpression="自编号" /> 164
<asp:BoundField DataField="资产编号" HeaderText="资产编号" ReadOnly="True" SortExpression="资产编号" /> 165
<asp:BoundField DataField="资产名称" HeaderText="资产名称" SortExpression="资产名称" /> 166
<asp:BoundField DataField="规格型号" HeaderText="规格型号" SortExpression="规格型号" /> 167
<asp:BoundField DataField="制造厂家" HeaderText="制造厂家" SortExpression="制造厂家" /> 168
<asp:BoundField DataField="出厂日期" HeaderText="出厂日期" SortExpression="出厂日期" /> 169
<asp:BoundField DataField="入账日期" HeaderText="入账日期" SortExpression="入账日期" /> 170
<asp:BoundField DataField="存放地点" HeaderText="存放地点" SortExpression="存放地点" /> 171
<asp:BoundField DataField="使用部门" HeaderText="使用部门" SortExpression="使用部门" /> 172
<asp:BoundField DataField="使用状态" HeaderText="使用状态" SortExpression="使用状态" /> 173
<asp:BoundField DataField="增加方式" HeaderText="增加方式" SortExpression="增加方式" /> 174
<asp:BoundField DataField="所属类别" HeaderText="所属类别" SortExpression="所属类别" /> 175
<asp:BoundField DataField="单位" HeaderText="单位" SortExpression="单位" /> 176
<asp:BoundField DataField="数量" HeaderText="数量" SortExpression="数量" /> 177
<asp:BoundField DataField="单价" HeaderText="单价" SortExpression="单价" /> 178
<asp:BoundField DataField="金额" HeaderText="金额" SortExpression="金额" /> 179
<asp:BoundField DataField="资产原值" HeaderText="资产原值" SortExpression="资产原值" /> 180
<asp:BoundField DataField="累计折旧" HeaderText="累计折旧" SortExpression="累计折旧" /> 181
<asp:BoundField DataField="折旧方法" HeaderText="折旧方法" SortExpression="折旧方法" /> 182
<asp:BoundField DataField="折旧月数" HeaderText="折旧月数" SortExpression="折旧月数" /> 183
<asp:BoundField DataField="已提月数" HeaderText="已提月数" SortExpression="已提月数" /> 184
<asp:BoundField DataField="月度折旧额" HeaderText="月度折旧额" SortExpression="月度折旧额" /> 185
<asp:BoundField DataField="预计净残值" HeaderText="预计净残值" SortExpression="预计净残值" /> 186
<asp:BoundField DataField="补充说明" HeaderText="补充说明" SortExpression="补充说明" /> 187
</Columns> 188
<RowStyle BackColor="#EEEEEE" ForeColor="Black" /> 189
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" /> 190
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /> 191
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" /> 192
<AlternatingRowStyle BackColor="Gainsboro" /> 193
</asp:GridView> 194
</asp:Panel> 195
</td> 196
</tr> 197
</table> 198
</asp:Content> 199
200





