📄 formstockmain.asp
字号:
<%
'/************************************
'/挔昜忣曬擖椡(嵼屔堦棗偐傜偺慗堏夋柺)儊僀儞僋儔僗
'/************************************
Class FormStockMain
Dim l_db 'DBAccess DB傾僋僙僗梡
Dim l_cmn '嫟捠僋儔僗(Common)
Dim l_cutil '暥帤儐乕僥傿儕僥傿(CharUtil)
Dim l_chkUtil '僠僃僢僋儐乕僥傿儕僥傿(CheckUtil)
Dim l_stmdl '儗僐乕僪曐帩(FormStockMdl)
Dim l_fm 'FormManageMaster
Dim l_btnSave '曐懚儃僞儞
Dim l_btnFormManage '嵼屔堦棗傊儃僞儞
Dim l_update
'/********************************************
'/* 弶婜張棟
'/********************************************
Public Function Init()
Set l_cmn = New Common
Set l_stmdl = New FormStockMdl
Set l_fm = New FormManageMaster
Set l_chkUtil = New CheckUtil
Set l_cutil = New CharUtil
Call l_cmn.SearchSession
'DB僐僱僋僔儑儞庢摼
Set l_db = New DbAccess
Call l_db.ProcConnection(DSN, USERID, PASSWD)
'僙僢僔儑儞傛傝儐乕僓乕忣曬庢摼
l_stmdl.l_sysId = Session("User").Item("SYSTEM_ID") '僔僗僥儉ID
l_stmdl.l_coId = Session("User").Item("COMPANY_ID") '夛幮ID
'慜夋柺儃僞儞墴壓忬嫷庢摼
l_btnSave = Request.Form("save")
l_btnFormManage = Request.Form("formmanage")
l_stmdl.l_listCd = Request.QueryString("P1")
l_stmdl.l_listEda = Request.QueryString("P2")
End Function
'/********************************************
'/* 挔昜忣曬擖椡夋柺(嵼屔儗僐乕僪擖椡)偺夋柺僷儔儊僞庢摼
'/********************************************
Public Function GetFormParam()
Dim l_baspobj
Set l_baspobj = Server.Createobject("basp21")
GetFormParam = True
'搊榐偡傞儃僞儞墴壓帪(嵼屔堦棗儃僞儞偑墴偝傟側偐偭偨傜僠僃僢僋)
If l_btnFormManage = "" Then
'慜夋柺傛傝忣曬庢摼
'挔昜柤
l_stmdl.l_listName = Request.Form("listname")
'嵼屔忬嫷
l_stmdl.l_stockStatus = Request.Form("stockstatus")
'敪拲揰
l_stmdl.l_orderPoint = Request.Form("orderpoint")
'嬞媫敪拲揰
l_stmdl.l_urgentOrderPoint = Request.Form("urgentorderpoint")
'擺昳応強1
l_stmdl.l_deliveryPlace1 = Request.Form("deliveryplace1")
'悢検1
l_stmdl.l_Num1 = Request.Form("num1")
'梊栺嵼屔悢1
l_stmdl.l_reserveStockNum1 = Request.Form("reservestocknum1")
'悢検1(DB偺悢検)
l_stmdl.l_Num1Db = Request.Form("num1db")
'擺昳応強2
l_stmdl.l_deliveryPlace2 = Request.Form("deliveryplace2")
'悢検2
l_stmdl.l_Num2 = Request.Form("num2")
'梊栺嵼屔悢2
l_stmdl.l_reserveStockNum2 = Request.Form("reservestocknum2")
'悢検2(DB偺悢検)
l_stmdl.l_Num2Db = Request.Form("num2db")
'擺昳応強3
l_stmdl.l_deliveryPlace3 = Request.Form("deliveryplace3")
'悢検3
l_stmdl.l_Num3 = Request.Form("num3")
'梊栺嵼屔悢3
l_stmdl.l_reserveStockNum3 = Request.Form("reservestocknum3")
'悢検3(DB偺悢検)
l_stmdl.l_Num3Db = Request.Form("num3db")
'挔昜娗棟扨埵
l_stmdl.l_listunit = Request.Form("listunit")
'挔昜娗棟斣崋(嵍儊僯儏乕梡)
l_stmdl.l_listManageNo = Request.Form("listmanageno")
'僙僢僩挔昜僼儔僌
l_stmdl.l_setlistFlg = Request.Form("setlistflg")
'========================
'擖椡僠僃僢僋
'========================
If Not CheckInput() Then
'僄儔乕偺応崌擖椡抣傪僙僢僔儑儞偵愝掕
SetSessionInData()
GetFormParam = False
Exit Function
End If
End If
End Function
'/********************************************
'/* 擖椡僠僃僢僋
'/* 僄儔乕偺応崌偼僄儔乕攝楍偵僄儔乕儊僢僙乕僕傪捛壛
'/* return: true:惓忢丄false丗僄儔乕
'/********************************************
Public Function CheckInput()
Dim l_Index, l_errarray(), l_baspobj
Set l_baspobj = Server.Createobject("basp21")
CheckInput = true
l_Index = 0
'敪拲揰僠僃僢僋
If l_stmdl.l_orderPoint <> "" Then
If l_chkUtil.number_chk(l_baspobj,l_stmdl.l_orderPoint) = 0 Then
Redim Preserve l_errarray(l_Index)
'敪拲揰偼敿妏悢帤偱偡
l_errarray(l_Index) = IG08001E
l_Index = l_Index + 1
CheckInput = False
End If
End If
'嬞媫敪拲揰僠僃僢僋
If l_stmdl.l_urgentOrderPoint <> "" Then
If l_chkUtil.number_chk(l_baspobj,l_stmdl.l_urgentOrderPoint) = 0 Then
Redim Preserve l_errarray(l_Index)
'嬞媫敪拲揰偼敿妏悢帤偱偡
l_errarray(l_Index) = IG08002E
l_Index = l_Index + 1
CheckInput = False
End If
End If
'擺昳応強侾昁恵僠僃僢僋
If l_stmdl.l_deliveryPlace1 = "" Then
Redim Preserve l_errarray(l_Index)
'擺昳応強侾傪擖椡偟偰偔偩偝偄
l_errarray(l_Index) = IG08013E
l_Index = l_Index + 1
CheckInput = False
End If
'擺昳応強侾丄俀僠僃僢僋
If l_stmdl.l_deliveryPlace1 <> "" And l_stmdl.l_deliveryPlace2 <> "" And _
l_stmdl.l_deliveryPlace1 = l_stmdl.l_deliveryPlace2 And _
l_stmdl.l_deliveryPlace1 <> l_stmdl.l_deliveryPlace3 Then
Redim Preserve l_errarray(l_Index)
'擺昳応強侾丄俀偑摨堦偱偡
l_errarray(l_Index) = IG11081E
l_Index = l_Index + 1
CheckInput = False
End If
'擺昳応強侾丄俁僠僃僢僋
If l_stmdl.l_deliveryPlace1 <> "" And l_stmdl.l_deliveryPlace3 <> "" And _
l_stmdl.l_deliveryPlace1 = l_stmdl.l_deliveryPlace3 And _
l_stmdl.l_deliveryPlace1 <> l_stmdl.l_deliveryPlace2 Then
Redim Preserve l_errarray(l_Index)
'擺昳応強侾丄俁偑摨堦偱偡
l_errarray(l_Index) = IG11082E
l_Index = l_Index + 1
CheckInput = False
End If
'擺昳応強俀丄俁僠僃僢僋
If l_stmdl.l_deliveryPlace2 <> "" And l_stmdl.l_deliveryPlace3 <> "" And _
l_stmdl.l_deliveryPlace2 = l_stmdl.l_deliveryPlace3 And _
l_stmdl.l_deliveryPlace1 <> l_stmdl.l_deliveryPlace2 Then
Redim Preserve l_errarray(l_Index)
'擺昳応強俀丄俁偑摨堦偱偡
l_errarray(l_Index) = IG11083E
l_Index = l_Index + 1
CheckInput = False
End If
'擺昳応強侾丄俀丄俁僠僃僢僋
If l_stmdl.l_deliveryPlace1 <> "" And l_stmdl.l_deliveryPlace2 <> "" And l_stmdl.l_deliveryPlace3 <> "" And _
l_stmdl.l_deliveryPlace1 = l_stmdl.l_deliveryPlace2 And _
l_stmdl.l_deliveryPlace1 = l_stmdl.l_deliveryPlace3 Then
Redim Preserve l_errarray(l_Index)
'擺昳応強侾丄俀丄俁偑摨堦偱偡
l_errarray(l_Index) = IG11084E
l_Index = l_Index + 1
CheckInput = False
End If
'擺昳応強俀僠僃僢僋
If l_stmdl.l_deliveryPlace2 = "" And l_stmdl.l_Num2 <> "" Then
Redim Preserve l_errarray(l_Index)
'擺昳応強俀傪擖椡偟偰偔偩偝偄
l_errarray(l_Index) = IG11089E
l_Index = l_Index + 1
CheckInput = False
End If
'擺昳応強俁僠僃僢僋
If l_stmdl.l_deliveryPlace3 = "" And l_stmdl.l_Num3 <> "" Then
Redim Preserve l_errarray(l_Index)
'擺昳応強俁傪擖椡偟偰偔偩偝偄
l_errarray(l_Index) = IG11090E
l_Index = l_Index + 1
CheckInput = False
End If
'挷惍悢抣1僠僃僢僋(惍悢丒儅僀僫僗偁傝)
If l_stmdl.l_Num1 <> "" Then
If Not l_chkUtil.IsInteger(l_baspobj,l_stmdl.l_Num1) Then
Redim Preserve l_errarray(l_Index)
'挷惍悢抣1偼敿妏悢帤偱偡
l_errarray(l_Index) = IG11091E
l_Index = l_Index + 1
CheckInput = False
ElseIf Not CheckSum(l_stmdl.l_num1,l_stmdl.l_Num1Db) Then
Redim Preserve l_errarray(l_Index)
'幚嵼屔悢検1偑0枹枮丄傑偨偼丄嵟戝寘悢傪挻偊偰偄傑偡
l_errarray(l_Index) = IG08010E
l_Index = l_Index + 1
CheckInput = False
End If
End If
'挷惍悢抣2僠僃僢僋(惍悢丒儅僀僫僗偁傝)
If l_stmdl.l_Num2 <> "" Then
If Not l_chkUtil.IsInteger(l_baspobj,l_stmdl.l_Num2) Then
Redim Preserve l_errarray(l_Index)
'挷惍悢抣2偼敿妏悢帤偱偡
l_errarray(l_Index) = IG11092E
l_Index = l_Index + 1
CheckInput = False
ElseIf Not CheckSum(l_stmdl.l_num2,l_stmdl.l_Num2Db) Then
Redim Preserve l_errarray(l_Index)
'幚嵼屔悢検2偑0枹枮丄傑偨偼丄嵟戝寘悢傪挻偊偰偄傑偡
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -