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

📄 bookedit.inc

📁 物业管理和办公自动化系统
💻 INC
字号:
<%
'#############################################################################################
'#
'#	文件名	 : bookedit.inc
'#
'#
'#	创建人	 : 姚晓辉
'#  	日 期	 : 2002-05-13
'#
'#	修改历史  : ****年**月**日 ****** 修改内容:**********************************************
'#
'#	功能描述	 : 图书信息修改界面函数文件
'#  	版   本	 :
'#	
'#	Copyright(c) 2001-2002 上海阿尔卡特网络支援系统有限公司
'#
'#############################################################################################
Function TableAdd()

	'---------------------------------------------------
	' declares
	'---------------------------------------------------
	Dim sNameText,sFormName, sTemp,id,sDeptText,sTimeText,sStartText,sEndText,sTypeText

        Dim sName,sIsbn,sPrice,sPur_time,sCategory_ID,sAuthor,sPublisher,sDisc,sMemo


	'---------------------------------------------------
	' get parameters
	'---------------------------------------------------

	id = GetParam("id")

	'---------------------------------------------------
	' construct a table contains all buttons
	'---------------------------------------------------
	sTemp = "<td width=600><table width=600 cellspacing=0 cellpadding=0 border=0><tr><td width=600 align=center>"

	'---------------------------------------------------
	' show buttons
	'---------------------------------------------------
	if IsEmpty(id) then
		' --------------------------------
		' add
		'---------------------------------
			sName                           = ""
			sIsbn                           = ""
			sPrice                          = ""
'			sPur_time                       = date
'			sCategory_ID                    = crs.GetValue("Category_ID")
			sAuthor                         = ""
			sPublisher                      = ""
'			sDisc                           = crs.GetValue("disc")
			sMemo                           = ""
		sTemp = sTemp & _
			"<span id=btnAdd style=""cursor:hand"" title=""点击新增图书登记""><img border=0 src=""../images/button/add.gif"" style=""vertical-align:bottom""></span>" & _
			"&nbsp;" & _
			"<span id=btnClear style=""cursor:hand"" title=""清空""><img border=0 src=""../images/button/clear.gif"" style=""vertical-align:bottom""></span>"

	else
		'----------------------------------
		' upd and del
		'----------------------------------
		dim crs	: set crs = New CRecordset
		dim sSQL : sSQL = "select * from t_Library where no=" & ToSQL(id, "Number")
		dim rs	: set rs = crs.open(dbLocal,sSQL)
		
		while not rs.EOF 
			sName                           = crs.GetValue("name")
			sIsbn                           = crs.GetValue("isbn")
			sPrice                          = crs.GetValue("price")
			sPur_time                       = crs.GetValue("pur_time")
			sCategory_ID                    = crs.GetValue("Category_ID")
			sAuthor                         = crs.GetValue("author")
			sPublisher                      = crs.GetValue("publisher")
			sDisc                           = crs.GetValue("disc")
			sMemo                           = crs.GetValue("memo")
			rs.movenext
		wend
		crs.Close()
		''get sNameText end

  
  
  

		sTemp = sTemp & _
			"<span id=btnMod style=""cursor:hand"" title=""修改图书信息,点击更新按钮""><img border=0 src=""../images/button/update.gif"" style=""vertical-align:bottom""></span>" & _
			"&nbsp;" & _
			"<span id=btnDel style=""cursor:hand"" title=""删除图书记录,点击删除按钮""><img border=0 src=""../images/button/delete.gif"" style=""vertical-align:bottom""></span>" & _
			"&nbsp;" & _
			"<span id=btnRes style=""cursor:hand"" title=""重置""><img border=0 src=""../images/button/reset.gif"" style=""vertical-align:bottom""></span>" & _
			"&nbsp;" & _
			"<span id=btnCancel style=""cursor:hand"" title=""取消""><img border=0 src=""../images/button/cancel.gif"" style=""vertical-align:bottom""></span>"
	end if

	sTemp = sTemp & "</td></tr></table></td>"

	'----------------------------------------------------
	' draw add table and return
	'----------------------------------------------------
	TableAdd = _
		TableTitle("图书信息", 300, "", "") & _
		"<table cellspacing=20 cellpadding=0 width=300 align=left border=0>" & _

		"<form name=frmInfoMgr method=post action=""bookedit.asp"">"  & _
		
		"<tr height=60 valign=center>" & _ 
		"	<td width=300 align=left colspan=3>" & _
		"		<BR>书名:<input type=text name=newname value='" & sName & "'  maxlength=50>" & _
		"		<BR>ISBN:<input type=text name=newisbn value='" & sIsbn & "'  maxlength=50>" & _
		"		<BR>价格:<input type=text name=newprice value='" & sPrice &"'  maxlength=50>" & _
		"<BR>购买时间:"           & DrawCal("", sPur_time, "newpur_time", "dateimg3")  & "" & _
		"               <BR>类别:<select name=""Category_ID"" style=""width:86px"">" & _
		                         SelectOptions(dbLocal, "t_library_Books_category", "category_id", "title", sCategory_ID,"")& _
		"                        </select>" & _
		"		<BR>作者:<input type=text name=newauthor value='" & sAuthor & "'  maxlength=50>" & _
		"		<BR>出版商:<input type=text name=newpublisher value='" & sPublisher & "'  maxlength=50>" & _
		"		<BR>有无磁盘:<select name=""disc"" style=""width:86px"">" & _
		"                           <option value=1>有</option>" & vbLF & _
		"			    <option value=2>无</option>" & vbLF & _
		"                           </select>" & _
		"		<BR>备注:<input type=text name=newsends value='" & sDocSends & "'  maxlength=128>" & _
		"		<input type=hidden name=id value='" & id & "'>" & _
		"		<input type=hidden name=formAction>" & _
		"	</td>" & _
		"   </tr>" & _
		"<tr height=40 align=center>" & _
			sTemp & _
		"</tr>" & _
		"<tr height=10><td colspan=3 width=300>&nbsp;</td></tr>" & _
		"</form>" & _
		"</table>"

End Function

Function TableLink()
	TableLink = _
		"<table width=600 cellspacing=0 cellpadding=0 border=0 align=center>" & _
		"<tr height=10>" & _ 
		"	<td width=600><img src=""../images/bg/line.gif"" width=600 height=3></td>" & _
		"</tr>" & _
		"<tr height=20>" & _
		"	<td width=600>&nbsp;" & _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""OK.asp"">OK</a>" & _
		"		&nbsp;" & _
		"		<img src=""../images/goto.gif"">&nbsp;<a href=""BookQuery.asp"">图书查询</a>" & _
		"</tr>" & _
		"</table>"
End Function
%>

⌨️ 快捷键说明

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