📄 leaseform.aspx
字号:
<%--文件名:LeaseForm.aspx--%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="LeaseForm.aspx.cs" Inherits="AssetsManage_LeaseForm" 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="72px">%%</asp:TextBox>
<asp:Button
ID="Button1" runat="server" Text="查询" Width="60px" />
<asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="新增" Width="60px" />
<asp:Button ID="Button3" runat="server" OnClick="Button3_Click" Text="修改" Width="60px" /></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" AutoPostBack="True" DataSourceID="SqlDataSource1"
DataTextField="部门名称" DataValueField="部门名称" Width="69px">
</asp:DropDownList>
资产名称:<asp:DropDownList ID="DropDownList3" runat="server" DataSourceID="SqlDataSource2"
DataTextField="资产名称" DataValueField="资产编号" Width="181px">
</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="251px">X</asp:TextBox><br />
租借日期:<asp:TextBox ID="TextBox8" runat="server" Width="65px">2007-5-1</asp:TextBox>
拟还日期:<asp:TextBox ID="TextBox6" runat="server" Width="72px">2007-5-31</asp:TextBox>
预期收益:<asp:TextBox ID="TextBox7" runat="server" Width="56px">0</asp:TextBox>
经办人:<asp:TextBox ID="TextBox9" runat="server" Width="48px">罗剑林</asp:TextBox><br />
补充说明:<asp:TextBox ID="TextBox10" runat="server" Width="374px">暂无</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="String" />
<asp:ControlParameter ControlID="TextBox8" Name="租借日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="TextBox6" Name="拟还日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="TextBox7" 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="String" />
<asp:ControlParameter ControlID="TextBox8" Name="租借日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="TextBox6" Name="拟还日期" PropertyName="Text" Type="DateTime" />
<asp:ControlParameter ControlID="TextBox7" 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="1000px" 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="补充说明" />
</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 + -