File: eaf_n_cst_messagemanager.sru
Size: 1029
Date: Tue, 22 Jan 2008 23:39:17 +0100
$PBExportHeader$eaf_n_cst_messagemanager.sru
forward
global type eaf_n_cst_messagemanager from nonvisualobject
end type
end forward

global type eaf_n_cst_messagemanager from nonvisualobject
end type
global eaf_n_cst_messagemanager eaf_n_cst_messagemanager

forward prototypes
public function integer getmessage (string as_messageid, long languageid, ref string as_translation)
end prototypes

public function integer getmessage (string as_messageid, long languageid, ref string as_translation);if not IsValid(sqlca) then return -1
If not sqlca.dbhandle() > 0 Then return -1

select translation into :as_translation
   from eaf_message_translations
   where message_id  = :as_messageid
     and language_id = :languageid;
     
if sqlca.sqlcode = 0 then
   return 1
else
   return -1
end if
end function

on eaf_n_cst_messagemanager.create
call super::create
TriggerEvent( this, "constructor" )
end on

on eaf_n_cst_messagemanager.destroy
TriggerEvent( this, "destructor" )
call super::destroy
end on