<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Page_RightsGroup_List.aspx.cs" Inherits="BDLSerSystem.SystemSet.Page_RightsGroup_List" %>
<HTML>
	<HEAD>
		<title>User_Reg</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<LINK href="../css/css.css" type="text/css" rel="stylesheet">
		<script src="../JS/Site.js"></script>
<script language="JavaScript">
function winconfirm(){
    question = confirm("您确实要删除所选项目吗?")     
if(!question){   
          event.returnValue=false;   
      }
  }
  function checkOne(box_no) {
      var frm = document.Form1;
      if (box_no.checked == true) {
          frm.Del_IDList.value = frm.Del_IDList.value + "," + box_no.value + ",";
      }
      else {
          frm.Del_IDList.value = frm.Del_IDList.value.replace("," + box_no.value + ",", "");
      }
      if (frm.Del_IDList.value == "") {
          //修改，删除不可用
          document.getElementById("Btn_Edit").className = "Btn_Zu_MidNo";
          document.getElementById("Btn_Del").className = "Btn_Zu_RightNo";
          document.getElementById("Div_Edit").style.display = "";
          document.getElementById("Div_Del").style.display = "";
      }
      else {
          document.getElementById("Btn_Edit").className = "Btn_Zu_Mid";
          document.getElementById("Btn_Del").className = "Btn_Zu_Right";
          document.getElementById("Div_Edit").style.display = "none";
          document.getElementById("Div_Del").style.display = "none";
      }
  }
  function pickrow(row) {
      if (event.srcElement.type == "checkbox") return;
      var x = row.getElementsByTagName("input");
      for (var j = 0; j < x.length; j++) {
          if (x[j].type = "checkbox") {
              x[j].checked = !x[j].checked;
              checkOne(x[j]);
          }
      }
  }
  function checkEdit(sDel_IDList) {
      var r, re;
      var strlength = sDel_IDList.length;
      re = /\,/; // 创建正则表达式模式。
      while (re.test(sDel_IDList)) {
          sDel_IDList = sDel_IDList.replace(re, "");
      }
      //alert("字符串中还有" + (strlength - sDel_IDList.length) + "点");
      var Tag_Counts = strlength - sDel_IDList.length;
      if (Tag_Counts == 2) {
          //可以修改
          openWithIframe('用户权限组设置', 'Page_RightsGroup_Add.aspx?Mech_ID=' + sDel_IDList, 450, 80, 0, 'Page_RightsGroup_List.aspx');
      }
      else {
          alert('一次只能修改一个选定项目!');
          return false;
      }
  }
</script>
	</HEAD>
	<body>
		<form id="Form1" method="post" runat="server">
			<div align="center">
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="43" background="../Images/Menu_Bg.png" class="tbl_1line_b"><div align="right">
    <table width="98%" height="30"  border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width="55px"><div align="center"><input type="button" class="Btn_Zu_Left" value="新增"  onClick="openWithIframe('用户权限组设置','Page_RightsGroup_Add.aspx',450,80,0,'Page_RightsGroup_List.aspx');this.blur();"></div></td>
              <td width="55px"><div align="center"><input type="button" name="Btn_Edit" id="Btn_Edit" class="Btn_Zu_MidNo" value="修改" onClick="checkEdit(Del_IDList.value);"></div></td>
              <td width="54px"><div align="center"><asp:Button ID="Btn_Del" runat="server" 
                      CssClass="Btn_Zu_RightNo" Text="删除" onclick="Btn_Del_Click" /></div></td>
              <td width="20px">&nbsp;</td>              
              <td width="54px"><div align="center"><asp:Button ID="Btn_Back" runat="server" CssClass="Btn_Quan_Small" Text="返回" /></div></td>
              <td width="55px"><div id="Div_Edit" style="position: relative; top: 0px; filter: alpha(opacity=0); background-color: #777;z-index: 2; left: -183px;  width:55px;height:30px;"></div></td>
              <td width="55px"><div id="Div_Del" style="position: relative; top: 0px; filter: alpha(opacity=0); background-color: #777;z-index: 2; left: -183px;  width:54px;height:30px;"></div></td>
              <td>&nbsp;</td>
            </tr>
          </table>
    </div></td>
  </tr>
  <tr>
    <td valign="top"><div align="right">
            <table width="98%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td height="35" colspan="3" background="../images/Page_Title.png" class="tbl_3line_rtl">
										        <table width="100%" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td><div align="left" class="font_style_2a5b8c">&nbsp;&nbsp;&nbsp;&nbsp;用户权限组管理<asp:TextBox ID="Del_IDList" runat="server" style="DISPLAY: none"></asp:TextBox></div>
														</td>
														<td width="50">&nbsp;</div>
														</td>
													</tr>
												</table></td>
									</tr>
									<tr>
										<td background="../images/tbl_rl.png" width="6px"></td>
										<td class="tbl_4line_rblt" valign="top"><div align="center">
												<table width="100%" border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td height="35"><div align="center"><asp:Label ID="ShowInfo" Runat="server"></asp:Label></td>
													</tr>
													<tr>
														<td>&nbsp;</td>
													</tr>
												</table>
											</div>
										</td>
										<td background="../images/tbl_rl2.png" width="6px"></td>
									</tr>
									<tr>
										<td height="6"><div align="center"><img src="../images/tbl_bl.png" width="6" height="6"></div>
										</td>
										<td height="6" background="../images/tbl_bt.png"></td>
										<td height="6"><div align="center"><img src="../images/tbl_br.png" width="6" height="6"></div>
										</td>
									</tr>
								</table>
    </div></td>
  </tr>
</table>
				
			</div>
		</form>
	</body>
</HTML>
