Form S_154FC: Domino Demonstration C
Name: S_154FC
Description: The following RDMLX form is a demonstration of interfacing LANSA applications with Domino databases.
;
* ;
* Disclaimer: The following material is supplied as example material only. ;
* ---------------- No warranty concerning this material or its use in any way;
* whatsoever is expressed or implied. ;
* ;
;
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM FORMPOSITION(ScreenCenter) HEIGHT(573) LAYOUTMANAGER(#ATLM_1) LEFT(547) TOP(152) WIDTH(502);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1);
DEFINE_COM CLASS(#PRIM_STBR) NAME(#STBR_1) DISPLAYPOSITION(6) HEIGHT(22) LEFT(0) MESSAGEPOSITION(1) PARENT(#COM_OWNER) TABPOSITION(6) TABSTOP(False) TOP(524) WIDTH(494);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Bottom) MANAGE(#STBR_1) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#PANL_1) DISPLAYPOSITION(7) HEIGHT(413) LAYOUTMANAGER(#SPLM_1) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(7) TABSTOP(False) TOP(75) WIDTH(494);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_2) ATTACHMENT(Center) MANAGE(#PANL_1) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_SPLM) NAME(#SPLM_1) ORIENTATION(Vertical);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#DEP_PANEL) DISPLAYPOSITION(1) HEIGHT(413) LAYOUTMANAGER(#ATLM_2) LEFT(0) PARENT(#PANL_1) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_PANEL) WIDTH(159);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#PANL_3) DISPLAYPOSITION(2) HEIGHT(413) LAYOUTMANAGER(#SPLM_2) LEFT(163) PARENT(#PANL_1) TABPOSITION(2) TABSTOP(False) TOP(0) WIDTH(331);
DEFINE_COM CLASS(#PRIM_SPLI) NAME(#SPLI_1) MANAGE(#DEP_PANEL) PARENT(#SPLM_1);
DEFINE_COM CLASS(#PRIM_SPLI) NAME(#SPLI_2) MANAGE(#PANL_3) PARENT(#SPLM_1) WEIGHT(1);
DEFINE_COM CLASS(#PRIM_SPLM) NAME(#SPLM_2);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#SEC_PANEL) DISPLAYPOSITION(1) HEIGHT(142) LAYOUTMANAGER(#ATLM_3) LEFT(0) PARENT(#PANL_3) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_PANEL) WIDTH(331);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#PANL_4) DISPLAYPOSITION(2) HEIGHT(267) LAYOUTMANAGER(#SPLM_3) LEFT(0) PARENT(#PANL_3) TABPOSITION(2) TABSTOP(False) TOP(146) WIDTH(331);
DEFINE_COM CLASS(#PRIM_SPLI) NAME(#SPLI_3) MANAGE(#SEC_PANEL) PARENT(#SPLM_2) WEIGHT(1);
DEFINE_COM CLASS(#PRIM_SPLI) NAME(#SPLI_4) MANAGE(#PANL_4) PARENT(#SPLM_2);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_2);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_3);
DEFINE_COM CLASS(#PRIM_SPLM) NAME(#SPLM_3);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#EMP_PANEL) DISPLAYPOSITION(1) HEIGHT(158) LAYOUTMANAGER(#ATLM_4) LEFT(0) PARENT(#PANL_4) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_PANEL) WIDTH(331);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#DET_PANEL) DISPLAYPOSITION(2) HEIGHT(105) LEFT(0) PARENT(#PANL_4) TABPOSITION(2) TABSTOP(False) TOP(162) VISUALSTYLE(#VS_PANEL) WIDTH(331);
DEFINE_COM CLASS(#PRIM_SPLI) NAME(#SPLI_5) MANAGE(#EMP_PANEL) PARENT(#SPLM_3) WEIGHT(1);
DEFINE_COM CLASS(#PRIM_SPLI) NAME(#SPLI_6) MANAGE(#DET_PANEL) PARENT(#SPLM_3) WEIGHT(1);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_4);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_5);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_3) ATTACHMENT(Left) PARENT(#ATLM_2);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_4) ATTACHMENT(Center) PARENT(#ATLM_2);
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#DEP_LIST) DISPLAYPOSITION(1) HEIGHT(409) LEFT(0) PARENT(#DEP_PANEL) SELECTIONSTYLE(Single) TABPOSITION(1) TOP(0) WIDTH(155);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_5) ATTACHMENT(Center) MANAGE(#DEP_LIST) PARENT(#ATLM_2);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_1) DISPLAYPOSITION(1) PARENT(#DEP_LIST) SOURCE(#DEPTDESC) WIDTH(100) WIDTHTYPE(Remainder);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_2) PARENT(#DEP_LIST) SOURCE(#DEPTMENT) VISIBLE(False) WIDTH(20);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#BTN_PANEL) DISPLAYPOSITION(5) HEIGHT(36) LAYOUTMANAGER(#FWLM_1) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(5) TABSTOP(False) TOP(488) VISUALSTYLE(#VS_PANEL) WIDTH(494);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_6) ATTACHMENT(Bottom) MANAGE(#BTN_PANEL) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_FWLM) NAME(#FWLM_1) FLOWOPERATION(Center) FLOWOPERATIONVER(Decrease) MARGINLEFT(5);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_OPEN) CAPTION('Open') DISPLAYPOSITION(1) LEFT(5) PARENT(#BTN_PANEL) TABPOSITION(1) TOP(3) VISUALSTYLEOFPARENT(False);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_1) MANAGE(#BTN_OPEN) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_CLOSE) CAPTION('Close') DISPLAYPOSITION(2) ENABLED(False) LEFT(95) PARENT(#BTN_PANEL) TABPOSITION(2) TOP(3) VISUALSTYLEOFPARENT(False);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_2) MANAGE(#BTN_CLOSE) PARENT(#FWLM_1);
;
DEFINE_COM CLASS(#PRIM_PANL) NAME(#HDR_PANEL) DISPLAYPOSITION(4) HEIGHT(75) LAYOUTMANAGER(#FWLM_1) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(4) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_PANEL) WIDTH(494);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_7) ATTACHMENT(Top) MANAGE(#HDR_PANEL) PARENT(#ATLM_1);
;
;
DEFINE_COM CLASS(#S_154RDW) NAME(#DOM_EMP) DISPLAYPOSITION(3) PARENT(#COM_OWNER) TABPOSITION(3);
DEFINE_COM CLASS(#S_154RDW) NAME(#DOM_DEP) DISPLAYPOSITION(2) PARENT(#COM_OWNER) TABPOSITION(2);
DEFINE_COM CLASS(#S_154RDW) NAME(#DOM_SEC) PARENT(#COM_OWNER);
;
DEFINE_COM CLASS(#SYSVAR$AV.Visual) NAME(#DOM_EMP_NAME) CAPTION('PSLMST Equivalent Domino Data Base Name') DISPLAYPOSITION(1) LABELTYPE(Caption) LEFT(3) MARGINLEFT(230) PARENT(#HDR_PANEL) READONLY(True) TABPOSITION(1) TABSTOP(False) TOP(26) VISUALSTYLE(#VS_NOREAD) WIDTH(480);
DEFINE_COM CLASS(#SYSVAR$AV.Visual) NAME(#DOM_DEP_NAME) CAPTION('DEPTAB Equivalent Domino Data Base Name') DISPLAYPOSITION(2) LABELTYPE(Caption) LEFT(3) MARGINLEFT(230) PARENT(#HDR_PANEL) READONLY(True) TABPOSITION(2) TABSTOP(False) TOP(4) VISUALSTYLE(#VS_NOREAD) WIDTH(480);
DEFINE_COM CLASS(#SYSVAR$AV.Visual) NAME(#DOM_SEC_NAME) CAPTION('SECTAB Equivalent Domino Data Base Name') DISPLAYPOSITION(3) LABELTYPE(Caption) LEFT(3) MARGINLEFT(230) PARENT(#HDR_PANEL) READONLY(True) TABPOSITION(3) TABSTOP(False) TOP(48) VISUALSTYLE(#VS_NOREAD) WIDTH(480);
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#SEC_LIST) DISPLAYPOSITION(1) HEIGHT(138) LEFT(0) PARENT(#SEC_PANEL) SELECTIONSTYLE(Single) TABPOSITION(1) TOP(0) WIDTH(327);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_8) ATTACHMENT(Center) MANAGE(#SEC_LIST) PARENT(#ATLM_3);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_3) PARENT(#SEC_LIST) SOURCE(#DEPTMENT) VISIBLE(False) WIDTH(20);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_4) CAPTION('Section') CAPTIONTYPE(Caption) DISPLAYPOSITION(1) PARENT(#SEC_LIST) SOURCE(#SECTION) WIDTH(20);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_5) DISPLAYPOSITION(2) PARENT(#SEC_LIST) SOURCE(#SECDESC) WIDTH(20) WIDTHTYPE(Remainder);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_9) ATTACHMENT(Left) PARENT(#ATLM_4);
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#EMP_LIST) DISPLAYPOSITION(1) HEIGHT(154) LEFT(0) PARENT(#EMP_PANEL) SELECTIONSTYLE(Single) TABPOSITION(1) TOP(0) WIDTH(327);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_10) ATTACHMENT(Center) MANAGE(#EMP_LIST) PARENT(#ATLM_4);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_6) DISPLAYPOSITION(1) PARENT(#EMP_LIST) SOURCE(#FULLNAME) WIDTH(20) WIDTHTYPE(Remainder);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_11) ATTACHMENT(Left) PARENT(#ATLM_5);
DEFINE_COM CLASS(#EMPNO.Visual) NAME(#EMPNO) DISPLAYPOSITION(1) LEFT(1) PARENT(#DET_PANEL) READONLY(True) TABPOSITION(1) TABSTOP(False) TOP(4) VISUALSTYLE(#VS_NOREAD) WIDTH(324);
DEFINE_COM CLASS(#SURNAME.Visual) NAME(#SURNAME) DISPLAYPOSITION(2) LEFT(1) PARENT(#DET_PANEL) READONLY(True) TABPOSITION(2) TABSTOP(False) TOP(23) VISUALSTYLE(#VS_NOREAD);
DEFINE_COM CLASS(#GIVENAME.Visual) NAME(#GIVENAME) DISPLAYPOSITION(3) LEFT(1) PARENT(#DET_PANEL) READONLY(True) TABPOSITION(3) TABSTOP(False) TOP(42) VISUALSTYLE(#VS_NOREAD);
DEFINE_COM CLASS(#POSTCODE.Visual) NAME(#POSTCODE) DISPLAYPOSITION(4) LEFT(1) PARENT(#DET_PANEL) READONLY(True) TABPOSITION(4) TABSTOP(False) TOP(61) VISUALSTYLE(#VS_NOREAD) WIDTH(324);
DEFINE_COM CLASS(#SALARY.Visual) NAME(#SALARY) DISPLAYPOSITION(5) LEFT(0) PARENT(#DET_PANEL) READONLY(True) TABPOSITION(5) TABSTOP(False) TOP(80) VISUALSTYLE(#VS_NOREAD) WIDTH(325);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_8) PARENT(#EMP_LIST) SOURCE(#STD_NUM) VISIBLE(False) WIDTH(20);
;
Define #RowHandle RefFld(#Std_Num);
Def_Cond *RowFound '#RowHandle > 0' ;
Group_By #Emp_Group (#EmpNo #SurName #GiveName #salary #Postcode);
;
* =========================================================================================== ;
;
* Component Initialization Logic ;
;
EVTROUTINE handling(#Com_Owner.Initialize);
;
* Define the names of the Domino databases to be used ;
* WARNING : These database names must be defined to Domino before executing this application ;
;
Set #Dom_EMP_Name Value(PSLMST_DEMO);
Set #Dom_SEC_Name Value(SECTAB_DEMO);
Set #Dom_DEP_Name Value(DEPTAB_DEMO);
Set #HDR_Panel Visible(False);
* ;
* Define the Domino equivalent of PSLMST;
* ;
Invoke #DOM_EMP.DefineItem SymName(Empno) DomName(EMPLOYEE_NUMBER) TYPE(Text) ;
Invoke #DOM_EMP.DefineItem SymName(Surname) DomName(EMPLOYEE_SURNAME) TYPE(Text);
Invoke #DOM_EMP.DefineItem SymName(GiveName) DomName(EMPLOYEE_GIVEN_NAME) TYPE(Text);
Invoke #DOM_EMP.DefineItem SymName(Section) DomName(EMPLOYEE_SECTION) TYPE(Text) KeyNumber(2);
Invoke #DOM_EMP.DefineItem SymName(Deptment) DomName(EMPLOYEE_DEPARTMENT) TYPE(Text) KeyNumber(1);
Invoke #DOM_EMP.DefineItem SymName(Salary) DomName(EMPLOYEE_SALARY) TYPE(Number) Decimals(2);
Invoke #DOM_EMP.DefineItem SymName(Postcode) DomName(EMPLOYEE_ZIP_CODE) TYPE(Number) Decimals(0);
* ;
* Define the Domino equivalent of DEPTAB;
* ;
Invoke #DOM_DEP.DefineItem SymName(Deptment) DomName(DEPARTMENT_NAME) TYPE(Text) KeyNumber(1);
Invoke #DOM_DEP.DefineItem SymName(DeptDesc) DomName(DEPARTMENT_DESCRIPTION) TYPE(Text);
* ;
* Define the Domino equivalent of SECTAB;
* ;
Invoke #DOM_SEC.DefineItem SymName(Deptment) DomName(DEPARTMENT_NAME) TYPE(Text) KeyNumber(1);
Invoke #DOM_SEC.DefineItem SymName(Section) DomName(DEPARTMENT_SECTION) TYPE(Text) KeyNumber(2);
Invoke #DOM_SEC.DefineItem SymName(SecDesc) DomName(SECTION_DESCRIPTION) TYPE(Text) ;
Invoke #DOM_SEC.DefineItem SymName(SecPhBus) DomName(SECTION_PHONE_NUMBER) TYPE(Text) ;
* ;
ENDROUTINE ;
;
* =========================================================================================== ;
;
* Handle an error from any of the Domino Components;
;
EvtRoutine Handling(#DOM_EMP.DominoErrorDetected #DOM_DEP.DominoErrorDetected #DOM_SEC.DominoErrorDetected);
USE BUILTIN(MESSAGE_BOX_SHOW) WITH_ARGS(OK OK WARNING *COMPONENT 'A domino related error was signalled');
EndRoutine ;
;
* =========================================================================================== ;
;
* Handling this component is being closed;
;
EvtRoutine Handling(#Com_Owner.Closing);
Invoke #Dom_SEC.Close;
Invoke #Dom_DEP.Close;
Invoke #Dom_EMP.Close;
Endroutine ;
;
* =========================================================================================== ;
;
* Handle the "Open" button being used;
;
EVTROUTINE HANDLING(#BTN_OPEN.Click);
;
Invoke #Dom_EMP.Open WithName(#Dom_EMP_Name.Value);
Invoke #Dom_DEP.Open WithName(#Dom_DEP_Name.Value);
Invoke #Dom_SEC.Open WithName(#Dom_SEC_Name.Value);
Message 'Open of Domino completed';
;
* Load up the list of a departments from Domino ;
;
Clr_List #Dep_List;
Clr_List #Sec_List;
Clr_List #Emp_List;
;
Invoke #Dom_DEP.Select RetHandle(#RowHandle);
DoWhile *RowFound;
Invoke #Dom_DEP.GetItem SymName(Deptment) AlphaVal(#Deptment);
Invoke #Dom_DEP.GetItem SymName(DeptDesc) AlphaVal(#DeptDesc);
Add_Entry #Dep_List;
Invoke #Dom_DEP.SelectNext RetHandle(#RowHandle);
EndWhile ;
;
Change #Emp_Group *Null ;
;
;
* Alter the enablement of the "Open" and "Close" buttons ;
;
Set #BTN_Open Enabled(False);
Set #BTN_Close Enabled(True);
;
ENDROUTINE ;
;
* =========================================================================================== ;
;
* Handle the close button is being used;
;
EVTROUTINE HANDLING(#BTN_CLOSE.Click);
;
Set #BTN_Open Enabled(True);
Set #BTN_Close Enabled(False);
;
Clr_List #Dep_List;
Clr_List #Sec_List;
Clr_List #Emp_List;
Change #Emp_Group *Null ;
;
Invoke #DOM_SEC.Close;
Invoke #DOM_DEP.Close;
Invoke #DOM_EMP.Close;
;
Message 'Close of Domino completed';
;
ENDROUTINE ;
;
* =========================================================================================== ;
;
* Handle department selected in the department list;
;
EVTROUTINE HANDLING(#DEP_LIST.ItemGotSelection);
;
Clr_List #Sec_List;
Clr_List #Emp_List;
;
Invoke #Dom_SEC.SetItem SymName(Deptment) AlphaVal(#Deptment);
Invoke #Dom_SEC.Select NumberKeys(1) RetHandle(#RowHandle);
;
DoWhile *RowFound;
Invoke #Dom_SEC.GetItem SymName(Section) AlphaVal(#Section);
Invoke #Dom_SEC.GetItem SymName(SecDesc) AlphaVal(#SecDesc);
Add_Entry #Sec_List;
Invoke #Dom_SEC.SelectNext RetHandle(#RowHandle);
EndWhile ;
;
Change #Emp_Group *NULL ;
;
ENDROUTINE ;
;
* =========================================================================================== ;
;
* Handle section selected in the selection list;
;
EVTROUTINE HANDLING(#SEC_LIST.ItemGotSelection) ;
;
Clr_List #Emp_List;
;
Invoke #Dom_EMP.SetItem SymName(Deptment) AlphaVal(#Deptment);
Invoke #Dom_EMP.SetItem SymName(Section) AlphaVal(#Section);
Invoke #Dom_EMP.Select NumberKeys(2) RetHandle(#RowHandle);
;
DoWhile *RowFound;
Invoke #Dom_EMP.GetItem SymName(SurName) AlphaVal(#SurName);
Invoke #Dom_EMP.GetItem SymName(GiveName) AlphaVal(#GiveName);
Use BConcat (#GiveName #SurName) (#FullName) ;
Change #Std_Num #RowHandle ;
Add_Entry #Emp_List;
Invoke #Dom_EMP.SelectNext RetHandle(#RowHandle);
EndWhile ;
;
Change #Emp_Group *NULL ;
;
ENDROUTINE ;
;
* =========================================================================================== ;
;
* Handle an employee selected from the employee list ;
;
EVTROUTINE HANDLING(#EMP_LIST.ItemGotSelection) ;
;
Invoke #Dom_EMP.Get WithHandle(#Std_Num) RetHandle(#RowHandle);
;
If *RowFound;
Invoke #Dom_EMP.GetItem SymName(Empno) AlphaVal(#Empno);
Invoke #Dom_EMP.GetItem SymName(SurName) AlphaVal(#SurName);
Invoke #Dom_EMP.GetItem SymName(GiveName) AlphaVal(#GiveName);
Invoke #Dom_EMP.GetItem SymName(Salary) NumericVal(#Salary);
Invoke #Dom_EMP.GetItem SymName(PostCode) NumericVal(#PostCode);
Else ;
Message 'Employee details no found';
Change #Emp_Group *NULL ;
Endif ;
;
ENDROUTINE ;
;
;
END_COM ;
Name: S_154FC
Description: The following RDMLX form is a demonstration of interfacing LANSA applications with Domino databases.
;
* ;
* Disclaimer: The following material is supplied as example material only. ;
* ---------------- No warranty concerning this material or its use in any way;
* whatsoever is expressed or implied. ;
* ;
;
FUNCTION OPTIONS(*DIRECT);
BEGIN_COM FORMPOSITION(ScreenCenter) HEIGHT(573) LAYOUTMANAGER(#ATLM_1) LEFT(547) TOP(152) WIDTH(502);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1);
DEFINE_COM CLASS(#PRIM_STBR) NAME(#STBR_1) DISPLAYPOSITION(6) HEIGHT(22) LEFT(0) MESSAGEPOSITION(1) PARENT(#COM_OWNER) TABPOSITION(6) TABSTOP(False) TOP(524) WIDTH(494);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Bottom) MANAGE(#STBR_1) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#PANL_1) DISPLAYPOSITION(7) HEIGHT(413) LAYOUTMANAGER(#SPLM_1) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(7) TABSTOP(False) TOP(75) WIDTH(494);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_2) ATTACHMENT(Center) MANAGE(#PANL_1) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_SPLM) NAME(#SPLM_1) ORIENTATION(Vertical);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#DEP_PANEL) DISPLAYPOSITION(1) HEIGHT(413) LAYOUTMANAGER(#ATLM_2) LEFT(0) PARENT(#PANL_1) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_PANEL) WIDTH(159);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#PANL_3) DISPLAYPOSITION(2) HEIGHT(413) LAYOUTMANAGER(#SPLM_2) LEFT(163) PARENT(#PANL_1) TABPOSITION(2) TABSTOP(False) TOP(0) WIDTH(331);
DEFINE_COM CLASS(#PRIM_SPLI) NAME(#SPLI_1) MANAGE(#DEP_PANEL) PARENT(#SPLM_1);
DEFINE_COM CLASS(#PRIM_SPLI) NAME(#SPLI_2) MANAGE(#PANL_3) PARENT(#SPLM_1) WEIGHT(1);
DEFINE_COM CLASS(#PRIM_SPLM) NAME(#SPLM_2);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#SEC_PANEL) DISPLAYPOSITION(1) HEIGHT(142) LAYOUTMANAGER(#ATLM_3) LEFT(0) PARENT(#PANL_3) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_PANEL) WIDTH(331);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#PANL_4) DISPLAYPOSITION(2) HEIGHT(267) LAYOUTMANAGER(#SPLM_3) LEFT(0) PARENT(#PANL_3) TABPOSITION(2) TABSTOP(False) TOP(146) WIDTH(331);
DEFINE_COM CLASS(#PRIM_SPLI) NAME(#SPLI_3) MANAGE(#SEC_PANEL) PARENT(#SPLM_2) WEIGHT(1);
DEFINE_COM CLASS(#PRIM_SPLI) NAME(#SPLI_4) MANAGE(#PANL_4) PARENT(#SPLM_2);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_2);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_3);
DEFINE_COM CLASS(#PRIM_SPLM) NAME(#SPLM_3);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#EMP_PANEL) DISPLAYPOSITION(1) HEIGHT(158) LAYOUTMANAGER(#ATLM_4) LEFT(0) PARENT(#PANL_4) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_PANEL) WIDTH(331);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#DET_PANEL) DISPLAYPOSITION(2) HEIGHT(105) LEFT(0) PARENT(#PANL_4) TABPOSITION(2) TABSTOP(False) TOP(162) VISUALSTYLE(#VS_PANEL) WIDTH(331);
DEFINE_COM CLASS(#PRIM_SPLI) NAME(#SPLI_5) MANAGE(#EMP_PANEL) PARENT(#SPLM_3) WEIGHT(1);
DEFINE_COM CLASS(#PRIM_SPLI) NAME(#SPLI_6) MANAGE(#DET_PANEL) PARENT(#SPLM_3) WEIGHT(1);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_4);
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_5);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_3) ATTACHMENT(Left) PARENT(#ATLM_2);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_4) ATTACHMENT(Center) PARENT(#ATLM_2);
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#DEP_LIST) DISPLAYPOSITION(1) HEIGHT(409) LEFT(0) PARENT(#DEP_PANEL) SELECTIONSTYLE(Single) TABPOSITION(1) TOP(0) WIDTH(155);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_5) ATTACHMENT(Center) MANAGE(#DEP_LIST) PARENT(#ATLM_2);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_1) DISPLAYPOSITION(1) PARENT(#DEP_LIST) SOURCE(#DEPTDESC) WIDTH(100) WIDTHTYPE(Remainder);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_2) PARENT(#DEP_LIST) SOURCE(#DEPTMENT) VISIBLE(False) WIDTH(20);
DEFINE_COM CLASS(#PRIM_PANL) NAME(#BTN_PANEL) DISPLAYPOSITION(5) HEIGHT(36) LAYOUTMANAGER(#FWLM_1) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(5) TABSTOP(False) TOP(488) VISUALSTYLE(#VS_PANEL) WIDTH(494);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_6) ATTACHMENT(Bottom) MANAGE(#BTN_PANEL) PARENT(#ATLM_1);
DEFINE_COM CLASS(#PRIM_FWLM) NAME(#FWLM_1) FLOWOPERATION(Center) FLOWOPERATIONVER(Decrease) MARGINLEFT(5);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_OPEN) CAPTION('Open') DISPLAYPOSITION(1) LEFT(5) PARENT(#BTN_PANEL) TABPOSITION(1) TOP(3) VISUALSTYLEOFPARENT(False);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_1) MANAGE(#BTN_OPEN) PARENT(#FWLM_1);
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_CLOSE) CAPTION('Close') DISPLAYPOSITION(2) ENABLED(False) LEFT(95) PARENT(#BTN_PANEL) TABPOSITION(2) TOP(3) VISUALSTYLEOFPARENT(False);
DEFINE_COM CLASS(#PRIM_FWLI) NAME(#FWLI_2) MANAGE(#BTN_CLOSE) PARENT(#FWLM_1);
;
DEFINE_COM CLASS(#PRIM_PANL) NAME(#HDR_PANEL) DISPLAYPOSITION(4) HEIGHT(75) LAYOUTMANAGER(#FWLM_1) LEFT(0) PARENT(#COM_OWNER) TABPOSITION(4) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_PANEL) WIDTH(494);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_7) ATTACHMENT(Top) MANAGE(#HDR_PANEL) PARENT(#ATLM_1);
;
;
DEFINE_COM CLASS(#S_154RDW) NAME(#DOM_EMP) DISPLAYPOSITION(3) PARENT(#COM_OWNER) TABPOSITION(3);
DEFINE_COM CLASS(#S_154RDW) NAME(#DOM_DEP) DISPLAYPOSITION(2) PARENT(#COM_OWNER) TABPOSITION(2);
DEFINE_COM CLASS(#S_154RDW) NAME(#DOM_SEC) PARENT(#COM_OWNER);
;
DEFINE_COM CLASS(#SYSVAR$AV.Visual) NAME(#DOM_EMP_NAME) CAPTION('PSLMST Equivalent Domino Data Base Name') DISPLAYPOSITION(1) LABELTYPE(Caption) LEFT(3) MARGINLEFT(230) PARENT(#HDR_PANEL) READONLY(True) TABPOSITION(1) TABSTOP(False) TOP(26) VISUALSTYLE(#VS_NOREAD) WIDTH(480);
DEFINE_COM CLASS(#SYSVAR$AV.Visual) NAME(#DOM_DEP_NAME) CAPTION('DEPTAB Equivalent Domino Data Base Name') DISPLAYPOSITION(2) LABELTYPE(Caption) LEFT(3) MARGINLEFT(230) PARENT(#HDR_PANEL) READONLY(True) TABPOSITION(2) TABSTOP(False) TOP(4) VISUALSTYLE(#VS_NOREAD) WIDTH(480);
DEFINE_COM CLASS(#SYSVAR$AV.Visual) NAME(#DOM_SEC_NAME) CAPTION('SECTAB Equivalent Domino Data Base Name') DISPLAYPOSITION(3) LABELTYPE(Caption) LEFT(3) MARGINLEFT(230) PARENT(#HDR_PANEL) READONLY(True) TABPOSITION(3) TABSTOP(False) TOP(48) VISUALSTYLE(#VS_NOREAD) WIDTH(480);
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#SEC_LIST) DISPLAYPOSITION(1) HEIGHT(138) LEFT(0) PARENT(#SEC_PANEL) SELECTIONSTYLE(Single) TABPOSITION(1) TOP(0) WIDTH(327);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_8) ATTACHMENT(Center) MANAGE(#SEC_LIST) PARENT(#ATLM_3);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_3) PARENT(#SEC_LIST) SOURCE(#DEPTMENT) VISIBLE(False) WIDTH(20);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_4) CAPTION('Section') CAPTIONTYPE(Caption) DISPLAYPOSITION(1) PARENT(#SEC_LIST) SOURCE(#SECTION) WIDTH(20);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_5) DISPLAYPOSITION(2) PARENT(#SEC_LIST) SOURCE(#SECDESC) WIDTH(20) WIDTHTYPE(Remainder);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_9) ATTACHMENT(Left) PARENT(#ATLM_4);
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#EMP_LIST) DISPLAYPOSITION(1) HEIGHT(154) LEFT(0) PARENT(#EMP_PANEL) SELECTIONSTYLE(Single) TABPOSITION(1) TOP(0) WIDTH(327);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_10) ATTACHMENT(Center) MANAGE(#EMP_LIST) PARENT(#ATLM_4);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_6) DISPLAYPOSITION(1) PARENT(#EMP_LIST) SOURCE(#FULLNAME) WIDTH(20) WIDTHTYPE(Remainder);
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_11) ATTACHMENT(Left) PARENT(#ATLM_5);
DEFINE_COM CLASS(#EMPNO.Visual) NAME(#EMPNO) DISPLAYPOSITION(1) LEFT(1) PARENT(#DET_PANEL) READONLY(True) TABPOSITION(1) TABSTOP(False) TOP(4) VISUALSTYLE(#VS_NOREAD) WIDTH(324);
DEFINE_COM CLASS(#SURNAME.Visual) NAME(#SURNAME) DISPLAYPOSITION(2) LEFT(1) PARENT(#DET_PANEL) READONLY(True) TABPOSITION(2) TABSTOP(False) TOP(23) VISUALSTYLE(#VS_NOREAD);
DEFINE_COM CLASS(#GIVENAME.Visual) NAME(#GIVENAME) DISPLAYPOSITION(3) LEFT(1) PARENT(#DET_PANEL) READONLY(True) TABPOSITION(3) TABSTOP(False) TOP(42) VISUALSTYLE(#VS_NOREAD);
DEFINE_COM CLASS(#POSTCODE.Visual) NAME(#POSTCODE) DISPLAYPOSITION(4) LEFT(1) PARENT(#DET_PANEL) READONLY(True) TABPOSITION(4) TABSTOP(False) TOP(61) VISUALSTYLE(#VS_NOREAD) WIDTH(324);
DEFINE_COM CLASS(#SALARY.Visual) NAME(#SALARY) DISPLAYPOSITION(5) LEFT(0) PARENT(#DET_PANEL) READONLY(True) TABPOSITION(5) TABSTOP(False) TOP(80) VISUALSTYLE(#VS_NOREAD) WIDTH(325);
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_8) PARENT(#EMP_LIST) SOURCE(#STD_NUM) VISIBLE(False) WIDTH(20);
;
Define #RowHandle RefFld(#Std_Num);
Def_Cond *RowFound '#RowHandle > 0' ;
Group_By #Emp_Group (#EmpNo #SurName #GiveName #salary #Postcode);
;
* =========================================================================================== ;
;
* Component Initialization Logic ;
;
EVTROUTINE handling(#Com_Owner.Initialize);
;
* Define the names of the Domino databases to be used ;
* WARNING : These database names must be defined to Domino before executing this application ;
;
Set #Dom_EMP_Name Value(PSLMST_DEMO);
Set #Dom_SEC_Name Value(SECTAB_DEMO);
Set #Dom_DEP_Name Value(DEPTAB_DEMO);
Set #HDR_Panel Visible(False);
* ;
* Define the Domino equivalent of PSLMST;
* ;
Invoke #DOM_EMP.DefineItem SymName(Empno) DomName(EMPLOYEE_NUMBER) TYPE(Text) ;
Invoke #DOM_EMP.DefineItem SymName(Surname) DomName(EMPLOYEE_SURNAME) TYPE(Text);
Invoke #DOM_EMP.DefineItem SymName(GiveName) DomName(EMPLOYEE_GIVEN_NAME) TYPE(Text);
Invoke #DOM_EMP.DefineItem SymName(Section) DomName(EMPLOYEE_SECTION) TYPE(Text) KeyNumber(2);
Invoke #DOM_EMP.DefineItem SymName(Deptment) DomName(EMPLOYEE_DEPARTMENT) TYPE(Text) KeyNumber(1);
Invoke #DOM_EMP.DefineItem SymName(Salary) DomName(EMPLOYEE_SALARY) TYPE(Number) Decimals(2);
Invoke #DOM_EMP.DefineItem SymName(Postcode) DomName(EMPLOYEE_ZIP_CODE) TYPE(Number) Decimals(0);
* ;
* Define the Domino equivalent of DEPTAB;
* ;
Invoke #DOM_DEP.DefineItem SymName(Deptment) DomName(DEPARTMENT_NAME) TYPE(Text) KeyNumber(1);
Invoke #DOM_DEP.DefineItem SymName(DeptDesc) DomName(DEPARTMENT_DESCRIPTION) TYPE(Text);
* ;
* Define the Domino equivalent of SECTAB;
* ;
Invoke #DOM_SEC.DefineItem SymName(Deptment) DomName(DEPARTMENT_NAME) TYPE(Text) KeyNumber(1);
Invoke #DOM_SEC.DefineItem SymName(Section) DomName(DEPARTMENT_SECTION) TYPE(Text) KeyNumber(2);
Invoke #DOM_SEC.DefineItem SymName(SecDesc) DomName(SECTION_DESCRIPTION) TYPE(Text) ;
Invoke #DOM_SEC.DefineItem SymName(SecPhBus) DomName(SECTION_PHONE_NUMBER) TYPE(Text) ;
* ;
ENDROUTINE ;
;
* =========================================================================================== ;
;
* Handle an error from any of the Domino Components;
;
EvtRoutine Handling(#DOM_EMP.DominoErrorDetected #DOM_DEP.DominoErrorDetected #DOM_SEC.DominoErrorDetected);
USE BUILTIN(MESSAGE_BOX_SHOW) WITH_ARGS(OK OK WARNING *COMPONENT 'A domino related error was signalled');
EndRoutine ;
;
* =========================================================================================== ;
;
* Handling this component is being closed;
;
EvtRoutine Handling(#Com_Owner.Closing);
Invoke #Dom_SEC.Close;
Invoke #Dom_DEP.Close;
Invoke #Dom_EMP.Close;
Endroutine ;
;
* =========================================================================================== ;
;
* Handle the "Open" button being used;
;
EVTROUTINE HANDLING(#BTN_OPEN.Click);
;
Invoke #Dom_EMP.Open WithName(#Dom_EMP_Name.Value);
Invoke #Dom_DEP.Open WithName(#Dom_DEP_Name.Value);
Invoke #Dom_SEC.Open WithName(#Dom_SEC_Name.Value);
Message 'Open of Domino completed';
;
* Load up the list of a departments from Domino ;
;
Clr_List #Dep_List;
Clr_List #Sec_List;
Clr_List #Emp_List;
;
Invoke #Dom_DEP.Select RetHandle(#RowHandle);
DoWhile *RowFound;
Invoke #Dom_DEP.GetItem SymName(Deptment) AlphaVal(#Deptment);
Invoke #Dom_DEP.GetItem SymName(DeptDesc) AlphaVal(#DeptDesc);
Add_Entry #Dep_List;
Invoke #Dom_DEP.SelectNext RetHandle(#RowHandle);
EndWhile ;
;
Change #Emp_Group *Null ;
;
;
* Alter the enablement of the "Open" and "Close" buttons ;
;
Set #BTN_Open Enabled(False);
Set #BTN_Close Enabled(True);
;
ENDROUTINE ;
;
* =========================================================================================== ;
;
* Handle the close button is being used;
;
EVTROUTINE HANDLING(#BTN_CLOSE.Click);
;
Set #BTN_Open Enabled(True);
Set #BTN_Close Enabled(False);
;
Clr_List #Dep_List;
Clr_List #Sec_List;
Clr_List #Emp_List;
Change #Emp_Group *Null ;
;
Invoke #DOM_SEC.Close;
Invoke #DOM_DEP.Close;
Invoke #DOM_EMP.Close;
;
Message 'Close of Domino completed';
;
ENDROUTINE ;
;
* =========================================================================================== ;
;
* Handle department selected in the department list;
;
EVTROUTINE HANDLING(#DEP_LIST.ItemGotSelection);
;
Clr_List #Sec_List;
Clr_List #Emp_List;
;
Invoke #Dom_SEC.SetItem SymName(Deptment) AlphaVal(#Deptment);
Invoke #Dom_SEC.Select NumberKeys(1) RetHandle(#RowHandle);
;
DoWhile *RowFound;
Invoke #Dom_SEC.GetItem SymName(Section) AlphaVal(#Section);
Invoke #Dom_SEC.GetItem SymName(SecDesc) AlphaVal(#SecDesc);
Add_Entry #Sec_List;
Invoke #Dom_SEC.SelectNext RetHandle(#RowHandle);
EndWhile ;
;
Change #Emp_Group *NULL ;
;
ENDROUTINE ;
;
* =========================================================================================== ;
;
* Handle section selected in the selection list;
;
EVTROUTINE HANDLING(#SEC_LIST.ItemGotSelection) ;
;
Clr_List #Emp_List;
;
Invoke #Dom_EMP.SetItem SymName(Deptment) AlphaVal(#Deptment);
Invoke #Dom_EMP.SetItem SymName(Section) AlphaVal(#Section);
Invoke #Dom_EMP.Select NumberKeys(2) RetHandle(#RowHandle);
;
DoWhile *RowFound;
Invoke #Dom_EMP.GetItem SymName(SurName) AlphaVal(#SurName);
Invoke #Dom_EMP.GetItem SymName(GiveName) AlphaVal(#GiveName);
Use BConcat (#GiveName #SurName) (#FullName) ;
Change #Std_Num #RowHandle ;
Add_Entry #Emp_List;
Invoke #Dom_EMP.SelectNext RetHandle(#RowHandle);
EndWhile ;
;
Change #Emp_Group *NULL ;
;
ENDROUTINE ;
;
* =========================================================================================== ;
;
* Handle an employee selected from the employee list ;
;
EVTROUTINE HANDLING(#EMP_LIST.ItemGotSelection) ;
;
Invoke #Dom_EMP.Get WithHandle(#Std_Num) RetHandle(#RowHandle);
;
If *RowFound;
Invoke #Dom_EMP.GetItem SymName(Empno) AlphaVal(#Empno);
Invoke #Dom_EMP.GetItem SymName(SurName) AlphaVal(#SurName);
Invoke #Dom_EMP.GetItem SymName(GiveName) AlphaVal(#GiveName);
Invoke #Dom_EMP.GetItem SymName(Salary) NumericVal(#Salary);
Invoke #Dom_EMP.GetItem SymName(PostCode) NumericVal(#PostCode);
Else ;
Message 'Employee details no found';
Change #Emp_Group *NULL ;
Endif ;
;
ENDROUTINE ;
;
;
END_COM ;