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

📄 frm_area_detail.asp

📁 一套石油公司内部的运营管理系统
💻 ASP
字号:
<!--#include virtual="/include/DBCon.inc"-->
<%
areaId=request("id")
'以下从数据库取出作业区
Set Rs = Server.CreateObject("ADODB.RecordSet")
SQL="select dict_value from oil.oil_dict where dict_type='area' and dict_code='" &areaId& "'"
rs.open SQL,conn,1,1
dim areaName
if rs.eof and rs.bof then
	response.redirect "/profile/errorpage.asp?title=查询作业区信息&msg=数据库里没有此作业区信息" 
else
	areaName=rs("dict_value")
end if
rs.close

'以下取出包含的区块
SQL="select * from oil.oil_block where area_id='"  &areaId& "' order by block_id"
rs.open SQL,conn
dim ablock(),blockCount
if not rs.eof and not rs.bof then
	blockCount=0
	do while not rs.eof  
		blockCount=blockCount+1
		redim preserve ablock(blockCount)
		ablock(Ubound(ablock)-1)=rs("block_id") &"@"& rs("block_name")
		rs.movenext
	loop
end if
rs.close

'以下取出含有的油水井
SQL="select well_id,well_block from oil.oil_well where well_area='"  &areaId& "' order by well_block ASC"
rs.open SQL,conn
dim awell(),wellCount
if not rs.eof and not rs.bof then
	wellCount=0
	do while not rs.eof  
		wellCount=wellCount+1
		redim preserve awell(wellCount)
		awell(Ubound(awell)-1)=rs("well_id") &"@"& rs("well_block")
		rs.movenext
	loop
end if
rs.close
%>
<html>
<head>
 
<title>油田采油工艺综合管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/css/oil.css" type="text/css">
<SCRIPT LANGUAGE=javascript>
<!--
function subCheck(act) {
	if (act==1) {
		if (document.form1.chblock.value=="")
			window.alert(document.form1.chblock.value);
		else {
			form1.action="frm_block_remove.asp";
			form1.submit();
		}
	}
	else if (act==2) {
		form1.action="frm_well_remove.asp";
		form1.submit();
	}
	else if (act==3) {
		form1.action="frm_block_add.asp";
		form1.submit();
	}
	else {
		form1.action="frm_well_add.asp";
		form1.submit();
	}
}
-->
</SCRIPT>

</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><br>
	<form action="" method=post name=form1>
	<span class="subject"><%=areaName%>的详细信息</span> 
	<hr size="1" class=hr width="98%" align="center">
	<table width=80% border=0  cellspacing="0" cellpadding="0">
		<tr>
			<td align=center>
				<table width="100%" border="1" cellspacing="0" cellpadding="2" bordercolordark="#F8EDEB" bordercolor="#000000" class=table2>
					<tr>
						<td align=center class=title width=15%>作业区编号</td>
						<td align=center width=20%>&nbsp<%=areaId%></td>
						<td align=center class=title width=20%>作业区名称</td>
						<td align=center width=45%>&nbsp<%=areaName%></td>
					</tr>
					<tr>
						<td align=center class=title colspan=2>区块</td>
						<td align=center class=title colspan=2>油水井&nbsp&nbsp(按住Ctrl键可多重选择)</td>
					</tr>
					<%for i=0 to blockCount-1%>
					<tr>
						<td align=center colspan=2>
							<input type=checkbox name=chblock value=<%=split(ablock(i),"@")(0)%>>
							<%=split(ablock(i),"@")(1)%>
						</td>
						<td align=center colspan=2>&nbsp
							<select name=chwell size=1 MULTIPLE class=text>
							<%
							for j=0 to wellCount-1
								twellId=split(awell(j),"@")(0)
								twellBlock=split(awell(j),"@")(1)
								if twellBlock=split(ablock(i),"@")(0) then
							%>
								<option value=<%=twellId%>><%=twellId%></option>
							<%
								end if
							next
							%>
							</select>
						</td>
					</tr>
					<%next%>
				</table>
			</td>
		</tr>
	</table><br>
	<input type=hidden name=areaId value=<%=areaId%>>
  <table width="60%" border="0" cellspacing="0" cellpadding="2" align="center">
	<tr align="center"> 
	  <td> 
		<input type="button" name="Submit1" value=" 删除选中的区块 " class=button OnClick=subCheck(1)>
		<input type="button" name="Submit2" value=" 删除选中的井 " class=button OnClick=subCheck(2)>
	  </td> 
	</tr>
	<tr align="center"> 
	  <td> 
		<input type="button" name="Submit3" value=" 添加新区块 " class=button OnClick=subCheck(3)>
		<input type="button" name="Submit4" value=" 添加新井 " class=button OnClick=subCheck(4)>
	  </td>
	</tr>
  </table>
	<Br>
	<hr size="1" class=hr width="98%" align="center">
	  <br>
	  <table width="98%" border="0" cellspacing="0" cellpadding="2" align="center">
		<tr align="center"> 
		  <td> 
			<input type="button" name="Submit32" value=" 返回 " class=button LANGUAGE=javascript onclick='javascript:location.replace("frm_area_list.asp");'>
		  </td>
		</tr>
	  </table>
	  </form>

</body>
</html>
<!--#include virtual="/include/DBClose.inc"-->

⌨️ 快捷键说明

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