62,041
社区成员
发帖
与我相关
我的任务
分享
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DepartManage.aspx.cs" Inherits="WebApplication1.position.DepartManage" %>
<!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>
<link href="../css/main.css" rel="stylesheet" type="text/css" />
<script src="../js/pub.js" type="text/javascript"></script>
<style type="text/css">
.style1{ text-align:center;width: 98px;}
#pDiv{position:absolute;z-index:999;}
#mask{ position:absolute; top:0; left:0; width:100%; height:100%; background:#666; filter:ALPHA(opacity=60); z-index:1; }
</style>
<script type="text/javascript">
var theObj;
function changbg(obj, tid) {
if (theObj != null) { theObj.style.background = ""; }
if (theObj = obj) {
obj.style.background = "#ddffdd";
if (document.getElementById(tid).checked == true) {
document.getElementById(tid).checked = false;
}
else {
document.getElementById(tid).checked = true;
}
}
}
function closediv() {
window.location.href = "DepartManage.aspx";
}
function showdetAdd(w, h, path) {
alert("5550");
//var sid=document.getElementById("hidValue").value;
if (document.getElementById("pDiv").style.display == "")
{ document.getElementById("pDiv").style.display = "none"; }
else {
alert("eee");
mask.style.display = "inline";
document.getElementById('pDiv').style.display = "inline";
obj = document.getElementById("detdiv");
obj.innerHTML = "<iframe frameborder='0' scrolling='no' width=" + w + " height=" + h + " id='detlayer' src=" + path + " allowtransparency='true'></iframe>";
var screenw = (window.screen.width - w) / 2;
var screenh = (window.screen.height - h) / 2 - 50;
document.getElementById('pDiv').style.top = screenh;
document.getElementById('pDiv').style.left = screenw;
}
}
function showdet(w, h, path) {
var rad = document.getElementsByTagName("input");
var s = 0;
for (i = 0; i < rad.length; i++) {
if (rad[i].type == "radio") {
if (rad[i].checked && document.getElementsByName("radUnit")) {
s = 1;
document.getElementById("hidValue").value = rad[i].value;
break;
}
}
}
if (s == 0) {
alert("没有选中!aaa");
return false;
} else {
alert("bbb");
var sid = document.getElementById("hidValue").value;
if (document.getElementById("pDiv").style.display == "")
{ document.getElementById("pDiv").style.display = "none"; }
else {
mask.style.display = "inline";
document.getElementById('pDiv').style.display = "inline";
obj = document.getElementById("detdiv");
obj.innerHTML = "<iframe frameborder='0' scrolling='no' width=" + w + " height=" + h + " id='detlayer' src=" + path + "?id=" + sid + " allowtransparency='true'></iframe>";
var screenw = (window.screen.width - w) / 2;
var screenh = (window.screen.height - h) / 2 - 50;
document.getElementById('pDiv').style.top = screenh;
document.getElementById('pDiv').style.left = screenw;
}
}
}
function checkInput1() {
var rad = document.getElementsByTagName("input");
var s = 0;
for (i = 0; i < rad.length; i++) {
if (rad[i].type == "radio") {
if (rad[i].checked && document.getElementsByName("radUnit")) {
s = 1;
document.getElementById("hidValue").value = rad[i].value;
break;
}
}
}
if (s == 0) {
alert("没有选中!");
return false;
}
var suc = window.confirm("确实要删除吗?");
if (!suc) {
return false;
}
}
function askDel() {
var suc = window.confirm("确实要删除吗?");
if (!suc) {
return false;
}
}
</script>
</head>
<body onload="windowloadHandler()">
<form id="form1" runat="server">
<input type="hidden" id="hidValue" name="hidValue" />
<div id='pDiv' style='display:none'>
<table style="filter:background-color:#ffffff" cellspacing="0" cellpadding="0" id='divtable'><tr><td><div id='detdiv'></div></td></tr>
</table></div>
<div id="mask" style='display:none'></div>
<div class="diva" style="width:98%">
<table class="tablenet" width="100%">
<thead class="thead">
<tr><td colspan="4">
部 门 管 理
</td></tr>
</thead>
<tr>
<td width='60' align="center" bgcolor='f0f0ff'><img alt="" border="0" src="../img/i_find.png" class='simg' /> 查找</td>
<td class="style1"> 所在产业:</td>
<td style="width:300px">
<asp:DropDownList ID="ddlUnit" runat="server" DataTextField="unitname"
DataValueField="id" AutoPostBack="True" Width="140"
onselectedindexchanged="ddlUnit_SelectedIndexChanged">
</asp:DropDownList>
</td>
<td> </td></tr>
</table>
<br />
<table class="table" width="100%">
<thead class="thead"><tr align="center">
<td colspan="2" width="12%">部门名称</td>
<td width="8%">所在单位</td>
<td width="20%">部门信息</td>
<td width="8%">负责人</td>
</tr></thead>
<asp:Repeater ID="rpUser" runat="server">
<ItemTemplate>
<tr>
<td align="center" width="4%"><input type="radio" id='<%# Eval("id") %>' value='<%# Eval("id") %>' name="sid" /></td>
<td align="center"><%# Eval("departName")%></td>
<td align="center"><%# Eval("unitId")%></td>
<td align="center"><%# Eval("departIntro")%></td>
<td align="center"><%# Eval("fuzeren")%></td>
</tr>
</ItemTemplate>
</asp:Repeater>
<tr>
<td colspan="5" class="tboot">
<input type="button" value="添 加" class="b_gray" onclick="return showdetAdd(550,450,'Depart.aspx')" />
<input type="button" value="更 新" class="b_gray" onclick="return showdet(500,300,'Depart.aspx')" />
<asp:Button ID="btnDelete" runat="server" Text="删 除" CssClass="b_gray" OnClientClick="return checkInput1()"
onclick="btnDelete_Click" />
</td>
</tr>
</table><br />
</div>
</form>
</body>
</html>