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

1<%--文件名:SubtractForm.aspx--%> 2
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="SubtractForm.aspx.cs" Inherits="AssetsManage_SubtractForm" 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
请输入需要查询的已被减少的资产名称: 9
<asp:TextBox ID="TextBox1" runat="server" Width="93px">%%</asp:TextBox> 10
<asp:Button ID="Button1" runat="server" Text="查询" Width="60px" /> 11
<asp:Button ID="Button2" runat="server" Text="新增" Width="60px" OnClick="Button2_Click" /> 12
<asp:Button ID="Button3" runat="server" Text="修改" Width="60px" OnClick="Button3_Click" /></td> 13
</tr> 14
<tr> 15
<td align="left" style="font-size: 0.8em; width: 2232px; font-family: 宋体; height: 27px; 16
background-color: gainsboro"> 17
所属类别:<asp:DropDownList ID="DropDownList1" runat="server" Width="82px"> 18
<asp:ListItem>生产设备</asp:ListItem> 19
<asp:ListItem>运输设备</asp:ListItem> 20
<asp:ListItem>管理用具</asp:ListItem> 21
<asp:ListItem>房屋及建筑物</asp:ListItem> 22
</asp:DropDownList> 23
使用部门:<asp:DropDownList ID="DropDownList2" runat="server" Width="69px" AutoPostBack="True" DataSourceID="SqlDataSource1" DataTextField="部门名称" DataValueField="部门名称"> 24
</asp:DropDownList> 25
资产名称:<asp:DropDownList ID="DropDownList3" runat="server" Width="181px" DataSourceID="SqlDataSource2" DataTextField="资产名称" DataValueField="资产编号"> 26
</asp:DropDownList><br /> 27
计量单位:<asp:TextBox ID="TextBox2" runat="server" Width="20px">台</asp:TextBox> 28
减少数量:<asp:TextBox ID="TextBox3" runat="server" Width="42px">0</asp:TextBox> 29
减少日期:<asp:TextBox ID="TextBox4" runat="server" Width="100px">2007-5-1</asp:TextBox> 30
减少方式:<asp:DropDownList ID="DropDownList4" runat="server" Width="80px"> 31
<asp:ListItem>出售</asp:ListItem> 32
<asp:ListItem>报废</asp:ListItem> 33
<asp:ListItem>盘亏</asp:ListItem> 34
<asp:ListItem>其他减少</asp:ListItem> 35
</asp:DropDownList><br /> 36
减少原因:<asp:TextBox ID="TextBox6" runat="server" Width="209px">暂无</asp:TextBox> 37
清理收入:<asp:TextBox ID="TextBox7" runat="server" Width="47px">0</asp:TextBox> 38
清理费用:<asp:TextBox ID="TextBox8" runat="server" Width="58px">0</asp:TextBox><br /> 39
经办人:<asp:TextBox ID="TextBox9" runat="server" Width="48px">罗剑林</asp:TextBox>补充说明:<asp:TextBox 40
ID="TextBox10" runat="server" Width="270px">暂无</asp:TextBox> 41
自编号:<asp:TextBox ID="TextBox5" runat="server" BackColor="#E0E0E0" ReadOnly="True" 42
Width="29px">0</asp:TextBox></td> 43
</tr> 44
<tr> 45
<td style="width: 2232px; height: 100px; background-color: gainsboro"> 46
<asp:Panel ID="Panel1" runat="server" Height="200px" ScrollBars="Auto" Width="553px"> 47
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyAssetsDBConnectionString %>" 48
SelectCommand="SELECT DISTINCT * FROM [公司部门]"></asp:SqlDataSource> 49
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MyAssetsDBConnectionString %>" 50
SelectCommand="SELECT * FROM [可用固定资产视图] WHERE (([所属类别] = @所属类别) AND ([使用部门] = @使用部门))"> 51
<SelectParameters> 52
<asp:ControlParameter ControlID="DropDownList1" Name="所属类别" PropertyName="SelectedValue" 53
Type="String" /> 54
<asp:ControlParameter ControlID="DropDownList2" Name="使用部门" PropertyName="SelectedValue" 55
Type="String" /> 56
</SelectParameters> 57
</asp:SqlDataSource> 58
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:MyAssetsDBConnectionString %>" 59
DeleteCommand="DELETE FROM [减少资产] WHERE [自编号] = @自编号" InsertCommand="INSERT INTO [减少资产] ([资产编号], [资产名称], [计量单位], [减少数量], [减少日期], [减少方式], [减少原因], [清理收入], [清理费用], [经办人], [补充说明]) VALUES (@资产编号, @资产名称, @计量单位, @减少数量, @减少日期, @减少方式, @减少原因, @清理收入, @清理费用, @经办人, @补充说明)" 60
SelectCommand="SELECT * FROM [减少资产] WHERE ([资产名称] LIKE '%' + @资产名称 + '%')" 61
UpdateCommand="UPDATE [减少资产] SET [计量单位] = @计量单位, [减少数量] = @减少数量, [减少日期] = @减少日期, [减少方式] = @减少方式, [减少原因] = @减少原因, [清理收入] = @清理收入, [清理费用] = @清理费用, [经办人] = @经办人, [补充说明] = @补充说明 WHERE [自编号] = @自编号"> 62
<DeleteParameters> 63
<asp:Parameter Name="自编号" Type="Int32" /> 64
</DeleteParameters> 65
<UpdateParameters> 66
<asp:ControlParameter ControlID="TextBox2" Name="计量单位" PropertyName="Text" Type="String" /> 67
<asp:ControlParameter ControlID="TextBox3" Name="减少数量" PropertyName="Text" Type="Int32" /> 68
<asp:ControlParameter ControlID="TextBox4" Name="减少日期" PropertyName="Text" Type="DateTime" /> 69
<asp:ControlParameter ControlID="DropDownList4" Name="减少方式" PropertyName="SelectedValue" 70
Type="String" /> 71
<asp:ControlParameter ControlID="TextBox6" Name="减少原因" PropertyName="Text" Type="String" /> 72
<asp:ControlParameter ControlID="TextBox7" Name="清理收入" PropertyName="Text" Type="Double" /> 73
<asp:ControlParameter ControlID="TextBox8" Name="清理费用" PropertyName="Text" Type="Double" /> 74
<asp:ControlParameter ControlID="TextBox9" Name="经办人" PropertyName="Text" Type="String" /> 75
<asp:ControlParameter ControlID="TextBox10" Name="补充说明" PropertyName="Text" Type="String" /> 76
<asp:ControlParameter ControlID="TextBox5" Name="自编号" PropertyName="Text" Type="Int32" /> 77
</UpdateParameters> 78
<SelectParameters> 79
<asp:ControlParameter ControlID="TextBox1" Name="资产名称" PropertyName="Text" Type="String" /> 80
</SelectParameters> 81
<InsertParameters> 82
<asp:ControlParameter ControlID="DropDownList3" Name="资产编号" PropertyName="SelectedValue" 83
Type="String" /> 84
<asp:ControlParameter ControlID="DropDownList3" Name="资产名称" PropertyName="SelectedItem.Text" 85
Type="String" /> 86
<asp:ControlParameter ControlID="TextBox2" Name="计量单位" PropertyName="Text" Type="String" /> 87
<asp:ControlParameter ControlID="TextBox3" Name="减少数量" PropertyName="Text" Type="Int32" /> 88
<asp:ControlParameter ControlID="TextBox4" Name="减少日期" PropertyName="Text" Type="DateTime" /> 89
<asp:ControlParameter ControlID="DropDownList4" Name="减少方式" PropertyName="SelectedValue" 90
Type="String" /> 91
<asp:ControlParameter ControlID="TextBox6" Name="减少原因" PropertyName="Text" Type="String" /> 92
<asp:ControlParameter ControlID="TextBox7" Name="清理收入" PropertyName="Text" Type="Double" /> 93
<asp:ControlParameter ControlID="TextBox8" Name="清理费用" PropertyName="Text" Type="Double" /> 94
<asp:ControlParameter ControlID="TextBox9" Name="经办人" PropertyName="Text" Type="String" /> 95
<asp:ControlParameter ControlID="TextBox10" Name="补充说明" PropertyName="Text" Type="String" /> 96
</InsertParameters> 97
</asp:SqlDataSource> 98
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White" 99
BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="自编号" 100
DataSourceID="SqlDataSource3" Font-Names="宋体" Font-Size="Small" GridLines="Vertical" 101
Width="1200px" OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"> 102
<FooterStyle BackColor="#CCCCCC" ForeColor="Black" /> 103
<Columns> 104
<asp:CommandField ButtonType="Button" HeaderText="选择" ShowSelectButton="True" /> 105
<asp:TemplateField HeaderText="删除" ShowHeader="False"> 106
<ItemTemplate> 107
<asp:Button ID="Button1" runat="server" CausesValidation="False" CommandName="Delete" 108
Text="删除" /> 109
</ItemTemplate> 110
</asp:TemplateField> 111
<asp:BoundField DataField="自编号" HeaderText="自编号" InsertVisible="False" ReadOnly="True" 112
SortExpression="自编号" /> 113
<asp:BoundField DataField="资产编号" HeaderText="资产编号" SortExpression="资产编号" /> 114
<asp:BoundField DataField="资产名称" HeaderText="资产名称" SortExpression="资产名称" /> 115
<asp:BoundField DataField="计量单位" HeaderText="计量单位" SortExpression="计量单位" /> 116
<asp:BoundField DataField="减少数量" HeaderText="减少数量" SortExpression="减少数量" /> 117
<asp:BoundField DataField="减少日期" HeaderText="减少日期" SortExpression="减少日期" /> 118
<asp:BoundField DataField="减少方式" HeaderText="减少方式" SortExpression="减少方式" /> 119
<asp:BoundField DataField="减少原因" HeaderText="减少原因" SortExpression="减少原因" /> 120
<asp:BoundField DataField="清理收入" HeaderText="清理收入" SortExpression="清理收入" /> 121
<asp:BoundField DataField="清理费用" HeaderText="清理费用" SortExpression="清理费用" /> 122
<asp:BoundField DataField="经办人" HeaderText="经办人" SortExpression="经办人" /> 123
<asp:BoundField DataField="补充说明" HeaderText="补充说明" SortExpression="补充说明" /> 124
</Columns> 125
<RowStyle BackColor="#EEEEEE" ForeColor="Black" /> 126
<SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" /> 127
<PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /> 128
<HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" /> 129
<AlternatingRowStyle BackColor="#DCDCDC" /> 130
</asp:GridView> 131
</asp:Panel> 132
</td> 133
</tr> 134
</table> 135
</asp:Content> 136
137




