|
of_createnotifytext
|
|
Full name
|
pfc_n_cst_error.of_createnotifytext
|
Access
|
protected
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
protected function integer of_createnotifytext(ref string,ref string)
|
Name
|
Datatype
|
ls_date
|
string
|
NEWLINE
|
string
|
TAB
|
string
|
protected function integer of_createnotifytext (ref string as_subject, ref string as_text);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_CreateNotifyText
//
// Access: protected
//
// Arguments:
// as_subject The subject string (by reference).
// as_text The text string (by reference.)
//
// Returns: integer
// 1 if it succeeds
// -1 if it fails.
//
// Description:
// This function is used to create the text that is used to peform the Notify process.
//
// Note:
// To create other than the standard text override this function on an descendant.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
// 6.0 Enhanced creation of notify text to use is_notifypretitle.
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
constant string NEWLINE = '~r~n'
constant string TAB = '~t'
string ls_date
If IsNull(inv_errorpass) Or Not IsValid(inv_errorpass) Then
Return -1
End If
// Make sure there are no Null values.
If Not IsNull(inv_errorpass.idt_date) Then ls_date = String(inv_errorpass.idt_date)
If IsNull(inv_errorpass.is_title) Then inv_errorpass.is_title = ''
If IsNull(inv_errorpass.is_text) Then inv_errorpass.is_text = ''
If IsNull(inv_errorpass.is_user) Then inv_errorpass.is_user = ''
If IsNull(inv_errorpass.is_usertext) Then inv_errorpass.is_usertext = ''
//-- Create the Subject text. --
as_subject = is_notifypretitle + inv_errorpass.is_title
//-- Create the Message text. --
If Len(ls_date) > 0 Then
// Optional datetime.
as_text = 'DateTime: '+String(inv_errorpass.idt_date) + NEWLINE + NEWLINE
End If
// Required values.
as_text += 'Title: '+inv_errorpass.is_title + NEWLINE + NEWLINE + &
'Message: '+inv_errorpass.is_text + NEWLINE + NEWLINE
If Len(inv_errorpass.is_user) > 0 Then
// Optional user value.
as_text += 'User: '+ inv_errorpass.is_user + NEWLINE
End If
If Len(inv_errorpass.is_usertext) >0 Then
// Optional comments.
as_text += 'Comments: '+inv_errorpass.is_usertext
End If
Return 1
end function
Name
|
Owner
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.isvalid |
systemfunctions
|
systemfunctions.len |
systemfunctions
|
systemfunctions.string |
systemfunctions
|