<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Function.asp"-->
<%
Call ChkLogin(session("WebAdminsUserName"))
Call ConnectionDataBase(2)
Action = Request("Action")
Select Case Action
	Case "AcceptTender"
		Call AcceptTender
End Select
'设置中标信息
Sub AcceptTender()
	business = Request.QueryString("business")
	UserID = Request.QueryString("UserID")
	ID = Request.QueryString("ID")
	TenderID = Request.QueryString("TenderID")
	
	Call ChkIsNumber(ID,"参数类型错误!")
	Call ChkIsNumber(business,"参数类型错误!")
	Call ChkIsNumber(UserID,"参数类型错误!")
	Call ChkIsNumber(TenderID,"参数类型错误!")
	'设置中标人成交量
	conn.execute("UPDATE T_Users Set Business=Business+" & business & " Where ID=" & UserID)
		
	IF business=1 Then
		Accept=1
	Else
		UserID=0
		Accept=0
	End IF
	'设置招标信息里中标人ID
	conn.execute("UPDATE T_Tender Set Accept=" & UserID & " Where TenderID=" & TenderID)
	'设置投标信息里的中标记录
	conn.execute("UPDATE T_Ballot Set Accept=" & Accept & " Where ID=" & ID)
	Call CloseDatabase
	Call Success("信息提交成功!",Request.ServerVariables("HTTP_REFERER"))
End Sub
%>
