added LSL2 stored procedures
This commit is contained in:
100
LSL2/STPROC/NDW_RDS_SUPP_SIG_EVENTS.txt
Normal file
100
LSL2/STPROC/NDW_RDS_SUPP_SIG_EVENTS.txt
Normal file
@ -0,0 +1,100 @@
|
||||
Compile function NDW_RDS_SUPP_SIG_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#window NDW_RDS_SUPP_SIG
|
||||
|
||||
$Insert APP_INSERTS
|
||||
|
||||
Declare Subroutine End_Dialog, Database_Services, Set_Property
|
||||
Declare Function Time, Date, Get_Property
|
||||
|
||||
GoToEvent Event for CtrlEntId else
|
||||
// Event not implemented
|
||||
end
|
||||
|
||||
Return EventFlow or 1
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EVENT HANDLERS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
|
||||
RDSNo = CreateParam
|
||||
Set_Property(@Window, '@RDS', RDSNo)
|
||||
Database_Services('ActivateRecord', 'RDS', RDSNo)
|
||||
SupplInst = {SUPPL_INST}
|
||||
SupplEntryID = {SUPPL_ENTRY_ID}
|
||||
EntryName = OConv(SupplEntryID, '[XLATE_CONV,LSL_USERS*FIRST_LAST]')
|
||||
SupplEntryDate = {SUPPL_ENTRY_DATE}
|
||||
SupplEntryTime = {SUPPL_ENTRY_TIME}
|
||||
SupplSig = {SUPPL_SIG}
|
||||
SigName = OConv(SupplSig, '[XLATE_CONV,LSL_USERS*FIRST_LAST]')
|
||||
SupplSigDate = {SUPPL_SIG_DATE}
|
||||
SupplSigTime = {SUPPL_SIG_TIME}
|
||||
SupplAck = {SUPPL_ACK}
|
||||
Set_Property(@Window:'.EDL_ENTRY_ID', 'TEXT', SupplEntryID)
|
||||
Set_Property(@Window:'.EDL_ENTRY_NAME', 'TEXT', EntryName)
|
||||
Set_Property(@Window:'.EDL_ENTRY_DATE', 'TEXT', OConv(SupplEntryDate, 'D2/') )
|
||||
Set_Property(@Window:'.EDL_ENTRY_TIME', 'TEXT', OConv(SupplEntryTime, 'MTH') )
|
||||
Set_Property(@Window:'.EDB_SUPPL_INST', 'TEXT', SupplInst)
|
||||
Set_Property(@Window:'.EDL_OP_SIG', 'TEXT', SupplSig)
|
||||
Set_Property(@Window:'.EDL_OP_SIG_NAME', 'TEXT', SigName)
|
||||
Set_Property(@Window:'.EDL_OP_SIG_DATE', 'TEXT', OConv(SupplSigDate, 'D2/') )
|
||||
Set_Property(@Window:'.EDL_OP_SIG_TIME', 'TEXT', OConv(SupplSigTime, 'MTH') )
|
||||
|
||||
If SupplAck EQ True$ then
|
||||
Set_Property(@Window:'.PUB_SIGN', 'ENABLED', False$)
|
||||
end
|
||||
FormSize = ''
|
||||
SRP_Show_Window(@Window, '', 'C', 'C', 1, '', False$, False$, FormSize)
|
||||
|
||||
End Event
|
||||
|
||||
|
||||
Event WINDOW.CLOSE(CancelFlag)
|
||||
|
||||
RDSNo = Get_Property(@Window, '@RDS')
|
||||
Database_Services('ActivateRecord', 'RDS', RDSNo)
|
||||
Response = {SUPPL_ACK}
|
||||
End_Dialog(@Window, Response)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_CLOSE.CLICK()
|
||||
|
||||
RDSNo = Get_Property(@Window, '@RDS')
|
||||
Database_Services('ActivateRecord', 'RDS', RDSNo)
|
||||
Response = {SUPPL_ACK}
|
||||
End_Dialog(@Window, Response)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_SIGN.CLICK()
|
||||
|
||||
Response = Dialog_Box('NDW_VERIFY_USER', @WINDOW, @USER4:@FM:'SUPERVISOR':@VM:'DATA_ENTRY')
|
||||
Valid = Response<1>
|
||||
If Valid EQ True$ then
|
||||
SupplSig = @User4
|
||||
SigName = OConv(SupplSig, '[XLATE_CONV,LSL_USERS*FIRST_LAST]')
|
||||
SupplSigDate = Date()
|
||||
SupplSigTime = Time()
|
||||
Set_Property(@Window:'.EDL_OP_SIG', 'TEXT', SupplSig)
|
||||
Set_Property(@Window:'.EDL_OP_SIG_NAME', 'TEXT', SigName)
|
||||
Set_Property(@Window:'.EDL_OP_SIG_DATE', 'TEXT', OConv(SupplSigDate, 'D2/') )
|
||||
Set_Property(@Window:'.EDL_OP_SIG_TIME', 'TEXT', OConv(SupplSigTime, 'MTH') )
|
||||
RDSNo = Get_Property(@Window, '@RDS')
|
||||
Database_Services('ActivateRecord', 'RDS', RDSNo)
|
||||
{SUPPL_SIG} = SupplSig
|
||||
{SUPPL_SIG_DATE} = SupplSigDate
|
||||
{SUPPL_SIG_TIME} = SupplSigTime
|
||||
{SUPPL_ACK} = True$
|
||||
Database_Services('WriteDataRow', 'RDS', RDSNo, @Record, True$, False$, True$)
|
||||
Set_Property(@Window:'.PUB_SIGN', 'ENABLED', False$)
|
||||
Post_Event(@Window, 'CLOSE')
|
||||
end
|
||||
|
||||
end event
|
||||
|
Reference in New Issue
Block a user