📄 deliverymaster.asp
字号:
<%
Class DeliveryMaster
Dim l_SQL
Dim l_Cost
'儐乕僓忣曬庢摼
Public Function SearchDeliveryBase(Param1,Param2,Param3)
'SQL暥惗惉
l_SQL = "SELECT RECEIVE_ADDRESS_ID,SECTION_NAME,COMPANY_NAME,CLASS,PERSON " & _
" FROM RECEIVEADDRESS_M" & _
" WHERE SYSTEM_ID = '" & Param2.l_SystemId & "'" & _
" AND DEL_FLG = '0'"
If IsObject(Param3) Then
If Param3.Item("receive_address_id") <> "" Then
l_SQL = l_SQL & " AND RECEIVE_ADDRESS_ID = '" & Param3.Item("receive_address_id") & "'"
End If
If Param3.Item("receive_name") <> "" Then
l_SQL = l_SQL & " AND COMPANY_NAME LIKE('" & l_Dlm.l_CutilObject.chg_HantoZen(Param2.l_ReceiveName) & "%')"
End If
If Param3.Item("class") <> "" Then
l_SQL = l_SQL & " AND CLASS = '" & Param3.Item("class") & "'"
End If
l_SQL = l_SQL & " ORDER BY " & GetOrderByStr(Param3.Item("sortkey"),Param3.Item("sortdesc"))
Else
l_SQL = l_SQL & " ORDER BY COMPANY_NAME"
End If
debug_t(l_SQL)
Set SearchDeliveryBase = Param1.ProcRecordset(l_SQL,20,1)
End Function
Public Function GetOrderByStr(l_sortkey, l_sortdesc)
Dim l_retStr
Dim l_seq
'僜乕僩弴愝掕
If l_sortdesc = FLG_ON Then
l_seq = " DESC"
End If
'僜乕僩暥嶌惉
If l_sortkey = SORT_KEY1 Then '僨僼僅儖僩(憲晅愭柤(徃弴))
l_retStr = "COMPANY_NAME"
ElseIf l_sortkey = SORT_KEY2 Then '晹栧柤弴
l_retStr = "RECEIVE_ADDRESS_ID" & l_seq
ElseIf l_sortkey = SORT_KEY3 Then '憲晅愭柤弴
l_retStr = "COMPANY_NAME" & l_seq
ElseIf l_sortkey = SORT_KEY4 Then '嬫暘弴
l_retStr = "CLASS" & l_seq
End If
GetOrderByStr = l_retStr
End Function
'憲晅愭懚嵼僠僃僢僋
Public Function CheckDelivery(Param1,Param2)
Dim l_RecSet
CheckDelivery = False
'SQL暥惗惉
l_SQL = "SELECT COUNT(*) FROM RECEIVEADDRESS_M" & _
" WHERE SYSTEM_ID = '" & Param2.l_SystemId & "'" & _
" AND RECEIVE_ADDRESS_ID = '" & Param2.l_ReceiveAddressId & "'"
Set l_RecSet = Param1.ProcRecordset(l_SQL,10,0)
'懚嵼偡傟偽True丄側偗傟偽False
If l_RecSet.Fields.Item("COUNT(*)") <> 0 Then
CheckDelivery = True
End If
End Function
'憲晅愭嶍彍
Public Function DeleteDelivery(Param1,Param2)
DeleteDelivery = True
l_SQL = "UPDATE RECEIVEADDRESS_M SET DEL_FLG = '1'" & _
" WHERE SYSTEM_ID = '" & Param2.l_SystemId & "'" & _
" AND RECEIVE_ADDRESS_ID = '" & Param2.l_ReceiveAddressId & "'"
'SQL敪峴
If Not Param1.ProcExecute(l_SQL) Then
Param1.ProcRollBack
DeleteDelivery = False
Exit Function
End If
End Function
'憲晅愭憓擖
Public Function InsertDelivery(Param1,Param2)
InsertDelivery = True
'SQL暥惗惉
l_SQL = "INSERT INTO RECEIVEADDRESS_M" & _
" VALUES ('" & Param2.l_SystemId & "','" & _
Param2.l_ReceiveAddressId & "','" & _
Param2.l_CompanyId & "','" & _
Param2.l_SectionId & "','" & _
Param2.l_SectionName & "','" & _
Param2.l_SectionNameKana & "','" & _
Param2.l_CompanyName & "','" & _
Param2.l_CompanyNameKana & "','" & _
Param2.l_Class & "','" & _
Param2.l_PostCode & "','" & _
Param2.l_Prefecture & "','" & _
Param2.l_Town & "','" & _
Param2.l_HouseNumber & "','" & _
Param2.l_Building & "','" & _
Param2.l_Person & "','" & _
Param2.l_Tel & "','" & _
Param2.l_Extension & "','" & _
Param2.l_Fax & "','" & _
Param2.l_Mail & "'," & _
"SYSDATE,null,'0')"
'SQL敪峴
If Not Param1.ProcExecute(l_SQL) Then
Param1.ProcRollBack
InsertDelivery = False
Exit Function
End If
End Function
'憲晅愭峏怴
Public Function UpdateDelivery(Param1,Param2)
UpdateDelivery = True
l_SQL = "UPDATE RECEIVEADDRESS_M" & _
" SET SECTION_ID = '" & Param2.l_SectionId & "'," & _
"SECTION_NAME = '" & Param2.l_SectionName & "'," & _
"SECTION_NAME_KANA = '" & Param2.l_SectionNameKana & "'," & _
"COMPANY_ID = '" & Param2.l_CompanyId & "'," & _
"COMPANY_NAME = '" & Param2.l_CompanyName & "'," & _
"COMPANY_NAME_KANA = '" & Param2.l_CompanyNameKana & "'," & _
"CLASS = '" & Param2.l_Class & "'," & _
"POSTCODE = '" & Param2.l_Postcode & "'," & _
"PREFECTURE = '" & Param2.l_Prefecture & "'," & _
"TOWN = '" & Param2.l_Town & "'," & _
"HOUSE_NUMBER = '" & Param2.l_HouseNumber & "'," & _
"BUILDING = '" & Param2.l_Building & "'," & _
"PERSON = '" & Param2.l_Person & "'," & _
"TEL = '" & Param2.l_Tel & "'," & _
"EXTENSION = '" & Param2.l_Extension & "'," & _
"FAX = '" & Param2.l_Fax & "'," & _
"MAIL = '" & Param2.l_Mail & "'," & _
"UPDATE_YMD = SYSDATE" & _
" WHERE SYSTEM_ID = '" & Param2.l_SystemId & "'" & _
" AND RECEIVE_ADDRESS_ID = '" & Param2.l_ReceiveAddressId & "'"
'SQL敪峴
If Not Param1.ProcExecute(l_SQL) Then
Param1.ProcRollBack
UpdateDelivery = False
Exit Function
End If
End Function
End Class
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -