📄 subtractform.aspx
字号:
<%--文件名:SubtractForm.aspx--%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="SubtractForm.aspx.cs" Inherits="AssetsManage_SubtractForm" 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" Width="93px">%%</asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="查询" Width="60px" />
<asp:Button ID="Button2" runat="server" Text="新增" Width="60px" OnClick="Button2_Click" />
<asp:Button ID="Button3" runat="server" Text="修改" Width="60px" OnClick="Button3_Click" /></td>
</tr>
<tr>
<td align="left" style="font-size: 0.8em; width: 2232px; font-family: 宋体; height: 27px;
background-color: gainsboro">
所属类别:<asp:DropDownList ID="DropDownList1" runat="server" Width="82px">
<asp:ListItem>生产设备</asp:ListItem>
<asp:ListItem>运输设备</asp:ListItem>
<asp:ListItem>管理用具</asp:ListItem>
<asp:ListItem>房屋及建筑物</asp:ListItem>
</asp:DropDownList>
使用部门:<asp:DropDownList ID="DropDownList2" runat="server" Width="69px" AutoPostBack="True" DataSourceID="SqlDataSource1" DataTextField="部门名称" DataValueField="部门名称">
</asp:DropDownList>
资产名称:<asp:DropDownList ID="DropDownList3" runat="server" Width="181px" DataSourceID="SqlDataSource2" DataTextField="资产名称" DataValueField="资产编号">
</asp:DropDownList><br />
计量单位:<asp:TextBox ID="TextBox2" runat="server" Width="20px">台</asp:TextBox>
减少数量:<asp:TextBox ID="TextBox3" runat="server" Width="42px">0</asp:TextBox>
减少日期:<asp:TextBox ID="TextBox4" runat="server" Width="100px">2007-5-1</asp:TextBox>
减少方式:<asp:DropDownList ID="DropDownList4" runat="server" Width="80px">
<asp:ListItem>出售</asp:ListItem>
<asp:ListItem>报废</asp:ListItem>
<asp:ListItem>盘亏</asp:ListItem>
<asp:ListItem>其他减少</asp:ListItem>
</asp:DropDownList><br />
减少原因:<asp:TextBox ID="TextBox6" runat="server" Width="209px">暂无</asp:TextBox>
清理收入:<asp:TextBox ID="TextBox7" runat="server" Width="47px">0</asp:TextBox>
清理费用:<asp:TextBox ID="TextBox8" runat="server" Width="58px">0</asp:TextBox><br />
经办人:<asp:TextBox ID="TextBox9" runat="server" Width="48px">罗剑林</asp:TextBox>补充说明:<asp:TextBox
ID="TextBox10" runat="server" Width="270px">暂无</asp:TextBox>
自编号:<asp:TextBox ID="TextBox5" runat="server" BackColor="#E0E0E0" ReadOnly="True"
Width="29px">0</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 %>"
SelectCommand="SELECT DISTINCT * FROM [公司部门]"></asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MyAssetsDBConnectionString %>"
SelectCommand="SELECT * FROM [可用固定资产视图] WHERE (([所属类别] = @所属类别) AND ([使用部门] = @使用部门))">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="所属类别" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="DropDownList2" Name="使用部门" PropertyName="SelectedValue"
Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:MyAssetsDBConnectionString %>"
DeleteCommand="DELETE FROM [减少资产] WHERE [自编号] = @自编号" InsertCommand="INSERT INTO [减少资产] ([资产编号], [资产名称], [计量单位], [减少数量], [减少日期], [减少方式], [减少原因], [清理收入], [清理费用], [经办人], [补充说明]) VALUES (@资产编号, @资产名称, @计量单位, @减少数量, @减少日期, @减少方式, @减少原因, @清理收入, @清理费用, @经办人, @补充说明)"
SelectCommand="SELECT * FROM [减少资产] WHERE ([资产名称] LIKE '%' + @资产名称 + '%')"
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="Int32" />
<asp:ControlParameter ControlID="TextBox4" Name="减少日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="DropDownList4" Name="减少方式" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="TextBox6" Name="减少原因" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox7" Name="清理收入" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox8" Name="清理费用" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox9" Name="经办人" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox10" Name="补充说明" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox5" Name="自编号" PropertyName="Text" Type="Int32" />
</UpdateParameters>
<SelectParameters>
<asp:ControlParameter ControlID="TextBox1" Name="资产名称" PropertyName="Text" Type="String" />
</SelectParameters>
<InsertParameters>
<asp:ControlParameter ControlID="DropDownList3" Name="资产编号" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="DropDownList3" Name="资产名称" PropertyName="SelectedItem.Text"
Type="String" />
<asp:ControlParameter ControlID="TextBox2" Name="计量单位" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox3" Name="减少数量" PropertyName="Text" Type="Int32" />
<asp:ControlParameter ControlID="TextBox4" Name="减少日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="DropDownList4" Name="减少方式" PropertyName="SelectedValue"
Type="String" />
<asp:ControlParameter ControlID="TextBox6" Name="减少原因" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox7" Name="清理收入" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox8" Name="清理费用" PropertyName="Text" Type="Double" />
<asp:ControlParameter ControlID="TextBox9" Name="经办人" PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="TextBox10" 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="SqlDataSource3" Font-Names="宋体" Font-Size="Small" GridLines="Vertical"
Width="1200px" OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
<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="清理费用" />
<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 + -