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

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




