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

📄 showusers.aspx

📁 商机管理系统
💻 ASPX
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="showusers.aspx.cs" Inherits="users_users" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <script lang="javascript">        
        var lastRowSelected;
        var originalColor;
        function GridView_selectRow(row, Name)
        {
            var hdn=document.form1.hdninput;
            hdn.value = Name;
            if (lastRowSelected != row)
            {
            if (lastRowSelected != null)
            {
            lastRowSelected.style.backgroundColor = originalColor;
            lastRowSelected.style.color = 'Black'
            lastRowSelected.style.fontWeight = 'normal';
            }
            originalColor = row.style.backgroundColor
            row.style.backgroundColor = 'BLACK'
            row.style.color = 'White'
            row.style.fontWeight = 'normal'
            lastRowSelected = row;
            }
        }
        
        function additem()
        {
            var hdn=document.getElementById("hdninput");
            var se=document.getElementById("se1");
            var option = document.createElement("option");
            var str='';
            if(hdn.value==null || hdn.value=="" || hdn.value==" ")
            {
                alert("请选择员工!");
                return;
            }
            else
            {
                if(se.length>0)
                {
                //alert(se.length);
                for(var i=0; i<se.length; i++)
                {
                    //str+=' '+se.options[i].value;
                    if(se.options[i].value==hdn.value)
                    {
                        alert("请勿输入同一个名字!");
                        return;
                    }
                }
                }  
                //alert(str);              
                option.value=hdn.value;
                option.text=hdn.value;
                se.options.add(option);
            }
        }
        
        function removeitem()
        {
            var se=document.getElementById("se1");
            if(se.selectedIndex==-1)
                return false;
            var option=se.options[se.selectedIndex];
            se.removeChild(option);
            sec.selectedIndex=-1;
        }
        
        function GridView_mouseHover(row)
        {
        row.style.cursor = 'hand';
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <input id="hdninput" type="hidden" runat="server" name="hdninput" value=" " />
        <table style="width: 100%" border=1px>
            <tr>
                <td rowspan="6" width=60%>
            <asp:GridView ID="GridView1" runat="server" OnRowDataBound="GridView1_RowDataBound">
            </asp:GridView> 
                </td>
                <td rowspan="2" height=50%>
                    &nbsp;</td>
                <td rowspan="6" width=30% align="center">
        <select size="20" name="se1" runat="server" id="se1" style="width:150px;"> 
        
        </select>
                </td>
            </tr>
            <tr>
            </tr>
            <tr>
                <td align="center">
            <input id="add" type="button" value=">>" onclick="additem()" /></td>
            </tr>
            <tr>
                <td align="center">
            <input id="remove" type="button" value="<<" onclick="removeitem()" /></td>
            </tr>
            <tr>
                <td rowspan="2" height=50%>
                    &nbsp;</td>
            </tr>
            <tr>
            </tr>
        </table>
        <table width=100%>
        <tr>
        <td align="center">
            <asp:Button ID="Btn_Confirm" runat="server" Text="确定" OnClick="Btn_Confirm_Click" />
        </tr>
    </table>
    
    
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:sjglxtConnectionString %>"
            SelectCommand="SELECT userid, username, logname, password, roleid, unit, grid, nodeid, u_departid, id, departid, parentid, name FROM user_depart WHERE (u_departid = @did)">
            <SelectParameters>
                <asp:ControlParameter ControlID="Hid_Did" Name="did" PropertyName="Value" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:HiddenField ID="Hid_Did" runat="server" />
    </form>
</body>
</html>

⌨️ 快捷键说明

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