⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 toolform.aspx

📁 ASP.NET 2.0 C# +MYSQL 家电维修管理系统 功能还算齐全
💻 ASPX
字号:
<%--文件名:ToolForm.aspx--%>
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ToolForm.aspx.cs" Inherits="PartManage_ToolForm" Title="当前位置:配件管理->工具借用管理" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table style="width: 558px; height: 1px">
        <tr>
            <td align="left" style="font-size: 0.8em; width: 550px; font-family: 宋体; height: 17px;
                background-color: deepskyblue">
                &nbsp;请输入需要查询的工具名称或借用人员编号:<asp:TextBox ID="TextBox12" runat="server" BackColor="White"
                    Width="141px">%%</asp:TextBox>
                <asp:Button ID="Button3" runat="server" Text="查询" Width="60px" />
                <asp:Button ID="Button2" runat="server" Text="打印" Width="60px" OnClick="Button2_Click" /></td>
        </tr>
        <tr>
            <td align="left" style="font-size: 0.8em; width: 550px; font-family: 宋体; height: 17px;
                background-color: lightseagreen">
                &nbsp;自动编号:<asp:TextBox ID="TextBox1" runat="server" BackColor="Silver" ReadOnly="True"
                    Width="27px"></asp:TextBox>
                工具名称:<asp:TextBox ID="TextBox2" runat="server" Width="80px"></asp:TextBox>
                规格型号:<asp:TextBox ID="TextBox3" runat="server" Width="71px"></asp:TextBox>
                购买日期:<asp:TextBox ID="TextBox4" runat="server" Width="58px">2007-1-1</asp:TextBox><br />
                &nbsp;购买金额(元):<asp:TextBox ID="TextBox5" runat="server" Width="36px">0</asp:TextBox>
                借用部门:<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource1"
                    DataTextField="部门名称" DataValueField="部门名称" Width="97px" AutoPostBack="True">
                </asp:DropDownList>
                借用人员:<asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="SqlDataSource2"
                    DataTextField="员工姓名" DataValueField="员工编号" Width="64px">
                </asp:DropDownList>
                借用数量:<asp:TextBox ID="TextBox8" runat="server" Width="24px">1</asp:TextBox><br />
                &nbsp;借用日期:<asp:TextBox ID="TextBox9" runat="server" Width="58px">2007-7-1</asp:TextBox>
                归还日期:<asp:TextBox ID="TextBox10" runat="server" Width="60px">2100-1-1</asp:TextBox>
                补充说明:<asp:TextBox ID="TextBox11" runat="server" Width="62px">暂无</asp:TextBox>&nbsp;<asp:Button
                    ID="Button1" runat="server" OnClick="Button1_Click" Text="新增" Width="60px" />&nbsp;<asp:Button
                        ID="Button4" runat="server" OnClick="Button4_Click" Text="修改" Width="60px" /></td>
        </tr>
        <tr>
            <td style="overflow: auto; width: 550px; height: 103px; background-color: gainsboro">
                <asp:Panel ID="Panel1" runat="server" Height="200px" ScrollBars="Auto" Width="555px">
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyServiceDBConnectionString %>"
                        SelectCommand="SELECT DISTINCT * FROM [部门信息]"></asp:SqlDataSource>
                    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:MyServiceDBConnectionString %>"
                        SelectCommand="SELECT * FROM [员工信息] WHERE ([部门名称] = @部门名称)">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="DropDownList1" Name="部门名称" PropertyName="SelectedValue"
                                Type="String" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White"
                        BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1"
                        DataKeyNames="自动编号" DataSourceID="SqlDataSource3" Font-Names="宋体" Font-Size="Small"
                        GridLines="None" Width="1200px" OnRowCreated="GridView1_RowCreated" OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
                        <FooterStyle BackColor="#C6C3C6" 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="#DEDFDE" ForeColor="Black" />
                        <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
                        <HeaderStyle BackColor="Navy" Font-Bold="True" ForeColor="#E7E7FF" HorizontalAlign="Center" />
                    </asp:GridView>
                    <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:MyServiceDBConnectionString %>"
                        DeleteCommand="DELETE FROM [工具借用] WHERE [自动编号] = @自动编号" InsertCommand="INSERT INTO [工具借用] ([工具名称], [规格型号], [购买日期], [购买金额], [借用部门], [借用人员], [借用数量], [借用日期], [归还日期], [补充说明]) VALUES (@工具名称, @规格型号, @购买日期, @购买金额, @借用部门, @借用人员, @借用数量, @借用日期, @归还日期, @补充说明)"
                        SelectCommand="SELECT * FROM [工具借用] WHERE (([工具名称] LIKE '%' + @工具名称 + '%') OR ([借用人员] 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="String" />
                            <asp:ControlParameter ControlID="TextBox4" Name="购买日期" PropertyName="Text" Type="DateTime" />
                            <asp:ControlParameter ControlID="TextBox5" Name="购买金额" PropertyName="Text" Type="Double" />
                            <asp:ControlParameter ControlID="DropDownList1" Name="借用部门" PropertyName="SelectedValue"
                                Type="String" />
                            <asp:ControlParameter ControlID="DropDownList2" Name="借用人员" PropertyName="SelectedValue"
                                Type="String" />
                            <asp:ControlParameter ControlID="TextBox8" Name="借用数量" PropertyName="Text" Type="Int32" />
                            <asp:ControlParameter ControlID="TextBox9" Name="借用日期" PropertyName="Text" Type="DateTime" />
                            <asp:ControlParameter ControlID="TextBox10" Name="归还日期" PropertyName="Text" Type="DateTime" />
                            <asp:ControlParameter ControlID="TextBox11" Name="补充说明" PropertyName="Text" Type="String" />
                            <asp:ControlParameter ControlID="TextBox1" Name="自动编号" PropertyName="Text" Type="Int32" />
                        </UpdateParameters>
                        <SelectParameters>
                            <asp:ControlParameter ControlID="TextBox12" Name="工具名称" PropertyName="Text" Type="String" />
                            <asp:ControlParameter ControlID="TextBox12" Name="借用人员" PropertyName="Text" Type="String" />
                        </SelectParameters>
                        <InsertParameters>
                            <asp:ControlParameter ControlID="TextBox2" Name="工具名称" PropertyName="Text" Type="String" />
                            <asp:ControlParameter ControlID="TextBox3" Name="规格型号" PropertyName="Text" Type="String" />
                            <asp:ControlParameter ControlID="TextBox4" Name="购买日期" PropertyName="Text" Type="DateTime" />
                            <asp:ControlParameter ControlID="TextBox5" Name="购买金额" PropertyName="Text" Type="Double" />
                            <asp:ControlParameter ControlID="DropDownList1" Name="借用部门" PropertyName="SelectedValue"
                                Type="String" />
                            <asp:ControlParameter ControlID="DropDownList2" Name="借用人员" PropertyName="SelectedValue"
                                Type="String" />
                            <asp:ControlParameter ControlID="TextBox8" Name="借用数量" PropertyName="Text" Type="Int32" />
                            <asp:ControlParameter ControlID="TextBox9" Name="借用日期" PropertyName="Text" Type="DateTime" />
                            <asp:ControlParameter ControlID="TextBox10" Name="归还日期" PropertyName="Text" Type="DateTime" />
                            <asp:ControlParameter ControlID="TextBox11" Name="补充说明" PropertyName="Text" Type="String" />
                        </InsertParameters>
                    </asp:SqlDataSource>
                </asp:Panel>
            </td>
        </tr>
    </table>
</asp:Content>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -