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

📄 department.aspx

📁 asp.net 2.0的教务管理软件源码
💻 ASPX
字号:
<%@ Page Language="C#" MasterPageFile="~/style/MasterPage.master" AutoEventWireup="true"
    CodeFile="Department.aspx.cs" Inherits="Personal_Department" Title="部门班级信息管理 - 杰邦教学管理系统" %>

<%@ Register TagPrefix="JControls"  TagName="TypeList" Src="~/uctl/StandardChoice.ascx" %>
<%@ Register TagPrefix="DualList" Src="~/uctl/SC.ascx" TagName="DualList" %>
<%@ Register TagPrefix="uc1" TagName="myCodeTree" Src="~/uctl/CodeTree.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
 <script language="Javascript" type="text/javascript">
function showInput()
{
    document.getElementById('divInput').style.visibility='visible';
    document.getElementById('divChoice').style.visibility='hidden';
    document.getElementById('tdInput').className = "checkeditem";
    document.getElementById('tdChoice').className = "uncheckeditem";
}
function showChoice()
{
    document.getElementById('divInput').style.visibility='hidden';
    document.getElementById('divChoice').style.visibility='visible';
    document.getElementById('tdInput').className = "uncheckeditem";
    document.getElementById('tdChoice').className = "checkeditem";
}
</script>
    <div style="z-index: 105; left: 1px; width: 200px; position: absolute; top: 1px;
        height: 24px" id="divLeftTitle">
                <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
                <td class="titlebar" style="height: 24px">
                    <asp:Label ID="lblTreeName" runat="server" Text="部门/班级列表"></asp:Label></td>
            </tr></table>
    </div>
   <div id="divTree" style="z-index: 101">
      <uc1:myCodeTree ID="Departments" runat="server" TableName="J_Department" NameColumn="de_Name" IdColumn="de_ID" ParentIdColumn="de_Parent" RootNames="'总公司'"  />
    </div>
    <div id="divTitle" style="z-index: 104; left: 206px; width: 77%; position: absolute;
        top: 1px">
        <table style="width: 100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td style="width: 417px" class="titlebar" >
                    部门管理:<asp:Label ID="Path" runat="server"></asp:Label>
                    <asp:Label ID="lblCounter" runat="server" Text="Label"></asp:Label></td>
                <td align="right" class="titlebar" >
                    <asp:HyperLink ID="hypAddNew" runat="server" NavigateUrl="~/Personal/DepartmentIn.aspx" ><span style="color:White">添加新部门</span></asp:HyperLink></td>
            </tr>
        </table>
    </div>
    <div id="divMain" style="z-index: 102">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" DataKeyNames="ID"
            Width="97%" AllowSorting="True" CssClass="mainView" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" OnRowDeleted="onRowDeleted">
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" SortExpression="ID" >
                    <ItemStyle HorizontalAlign="Right" />
                    <HeaderStyle Width="10%" />
                </asp:BoundField>
                <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="Department.aspx?ClassID={0}"
                    DataTextField="部门名称" HeaderText="部门名称"  SortExpression="部门名称">
                    <HeaderStyle HorizontalAlign="Center" Width="20%" />
                </asp:HyperLinkField>
                <asp:BoundField  DataField="负责人" HeaderText="负责人" SortExpression="负责人" >
                    <HeaderStyle Width="15%" />
                </asp:BoundField>
                <asp:BoundField DataField="电话" HeaderText="电话" SortExpression="电话" >
                    <HeaderStyle Width="15%" />
                </asp:BoundField>
                <asp:BoundField DataField="简介" HeaderText="简介" SortExpression="简介" />
                <asp:CheckBoxField DataField="教学" HeaderText="教学" SortExpression="教学" >
                    <ItemStyle HorizontalAlign="Center" />
                    <HeaderStyle Width="6%" />
                </asp:CheckBoxField>
                <asp:CommandField ShowDeleteButton="True" SelectText="修改" ShowSelectButton="True" DeleteText="&lt;div style=&quot;display:inline&quot; id=&quot;deleteme&quot; onclick=&quot;JavaScript:return confirm('不能删除非空部门,确定删除吗?')&quot;&gt;删除&lt;/div&gt;" >
                    <HeaderStyle Width="15%" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:CommandField>
                <asp:TemplateField HeaderText="选定">
                    <ItemTemplate>
                        <input type="checkbox" id="CheckBox1" name="CheckBox1" value="<%# Eval("ID") %>" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <table style="width: 100%">
            <tr>
                <td style="height: 26px">
                    将选定的部门移动到 <asp:DropDownList ID="ddlDepartments" runat="server" DataSourceID="SqlDataSource2"
                        DataTextField="theName" DataValueField="theID">
                    </asp:DropDownList>
                    <asp:Button ID="btnMove" runat="server" OnClick="btnMove_Click" Text="移动" />
            </tr>
        </table>
    </div>
    <div style="z-index: 103; left: 6px; position: absolute; top: 528px;">
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:keke100ConnectionString %>"
            SelectCommand="SELECT * FROM [v_DepartMent] WHERE ([de_Parent] = @ID)" OnSelected="SqlDataSource1_Selected" DeleteCommand="EXEC p_DeleteDepartment @ID,@EmployeeID">
            <SelectParameters>
                <asp:Parameter DefaultValue="0" Name="ID" Type="Int32" />
            </SelectParameters>
            <DeleteParameters>
                <asp:Parameter Name="ID" Type="Int32" />
                <asp:SessionParameter SessionField="LoginID" Name="EmployeeID" Type="Int32" />
            </DeleteParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:keke100ConnectionString %>"
                        SelectCommand="p_ListMyPowerClass" SelectCommandType="StoredProcedure">
                        <SelectParameters>
                            <asp:SessionParameter Name="EmployeeID" SessionField="LoginID" Type="Int32" />
                        </SelectParameters>
                    </asp:SqlDataSource>
    </div>

</asp:Content>

⌨️ 快捷键说明

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