130 lines
3.6 KiB
Plaintext
130 lines
3.6 KiB
Plaintext
|
|
<!-- #include virtual = "lib/config.asp" -->
|
|
<OBJECT RUNAT=Server PROGID=ADODB.Recordset id=rsp></OBJECT>
|
|
<%
|
|
|
|
|
|
Dim paramType
|
|
Dim p_child_sn
|
|
|
|
paramType = CInt(request("type"))
|
|
p_child_sn = request("p_child_sn")
|
|
|
|
query = " update "
|
|
|
|
If CLng(Left(p_child_sn, 4)) < 1407 Then
|
|
query = query & "project set "
|
|
Else
|
|
query = query & "t_project_method set "
|
|
End If
|
|
|
|
select_query = "select p_sn, p_child_sn, p_sub_type, p_subject, p_rsch_dept, p_field_dept, p_is_dept from T_PROJECT_METHOD where p_child_sn = '"& p_child_sn & "' "
|
|
rsp.Open select_query, adoConn, 1
|
|
|
|
If paramType = 1 Then
|
|
query = query & "p_research_complete = 1 "
|
|
|
|
If rsp("p_field_dept") = "900" Then
|
|
query = query & ", p_field_complete = 1 "
|
|
end if
|
|
|
|
If rsp("p_is_dept") = "900" then
|
|
query = query & ", p_dp_complete = 1 "
|
|
End if
|
|
|
|
|
|
|
|
ElseIf paramType = 2 Then
|
|
If rsp("p_rsch_dept") = "900" Then
|
|
query = query & "p_research_complete = 1, "
|
|
end if
|
|
|
|
If rsp("p_is_dept") = "900" then
|
|
query = query & "p_dp_complete = 1, "
|
|
End if
|
|
|
|
query = query & "p_field_complete = 1, p_field_complete_date = convert(varchar(16), getdate(), 120) "
|
|
ElseIf paramType = 3 Then
|
|
query = query & "p_dp_complete = 1 "
|
|
If rsp("p_rsch_dept") = "900" Then
|
|
query = query & ", p_research_complete = 1 "
|
|
end if
|
|
If rsp("p_field_dept") = "900" Then
|
|
query = query & ", p_field_complete = 1 "
|
|
end if
|
|
ElseIf paramType = 4 Then
|
|
query = query & "p_support_complete = 1 "
|
|
ElseIf paramType = 5 Then ''//--- °³¹ßÆÀ
|
|
query = query & "p_it_complete = 1 "
|
|
End If
|
|
|
|
rsp.Close
|
|
|
|
If CLng(Left(p_child_sn, 4)) < 1407 Then
|
|
query = query & " WHERE p_sn = '"& p_child_sn & "' "
|
|
Else
|
|
if mid(p_child_sn,9,1) = "M" then
|
|
query = query & " WHERE p_child_sn like '"& mid(p_child_sn,1,9) & "%' "
|
|
else
|
|
query = query & " WHERE p_child_sn = '"& p_child_sn & "' "
|
|
end if
|
|
End If
|
|
|
|
adoConn.execute query
|
|
'response.write query & "<br>"
|
|
|
|
|
|
if mid(p_child_sn,9,1) = "M" then
|
|
p_child_sn = "Multi"
|
|
end if
|
|
|
|
query = " delete Job_ProjectList "
|
|
query = query & " where p_sn = '"&left(p_child_sn,7)&"' "
|
|
query = query & " and p_child_sn = '"& p_child_sn &"' "
|
|
query = query & " and p_user IN ( "
|
|
query = query & " select p_user "
|
|
query = query & " from Job_ProjectList jp left outer join person p on jp.p_user = p.p_no "
|
|
query = query & " where p_sn = '"& left(p_child_sn,7) &"' "
|
|
query = query & " and p_child_sn = '"& p_child_sn &"' "
|
|
query = query & " and p_depart = '"&Session("Depart_Code")&"' "
|
|
query = query & " ) "
|
|
|
|
adoConn.execute query
|
|
|
|
|
|
query = " update "
|
|
|
|
If CLng(Left(p_child_sn, 4)) < 1407 Then
|
|
query = query & "project set "
|
|
Else
|
|
query = query & "t_project_method set "
|
|
End If
|
|
|
|
query = query & " p_complete_date = convert(varchar(16), getdate(), 120) "
|
|
|
|
If CLng(Left(p_child_sn, 4)) < 1407 Then
|
|
query = query & " WHERE p_sn = '"& p_child_sn & "' "
|
|
Else
|
|
if mid(p_child_sn,9,1) = "M" then
|
|
query = query & " WHERE p_child_sn like '"& mid(p_child_sn,1,9) & "%' "
|
|
else
|
|
query = query & " WHERE p_child_sn = '"& p_child_sn & "' "
|
|
end if
|
|
End If
|
|
query = query & " and p_research_complete = 1 and p_field_complete = 1 and p_dp_complete = 1 "
|
|
|
|
adoConn.execute query
|
|
|
|
|
|
|
|
|
|
|
|
|
|
' Session.CodePage = 65001 'ÇѱÛ
|
|
Response.CharSet = "EUC-KR" 'ÇѱÛ
|
|
Response.AddHeader "Pragma","no-cache"
|
|
Response.AddHeader "cache-control", "no-staff"
|
|
Response.Expires = -1
|
|
|
|
response.write("success")
|
|
%> |