Project Free HRD & Payroll Application

You can share your experience with HMG. Share with some screenshots/project details so that others will also be benefited.

Moderator: Rathinagiri

gvaronas
Posts: 109
Joined: Wed Aug 06, 2008 5:21 pm

Re: Project Free HRD & Payroll Application

Post by gvaronas » Sat Oct 11, 2014 3:59 am

Ok. I understand.
Thank you

BestRegards
GVS
Roberto Lopez wrote:
gvaronas wrote:Hola Roberto:
Tal como lo haz explicado es realmente muy sencillo el uso de NetIO.
Mis dudas están por el lado de la aplicación del servidor, en el ejemplo que haz descrito no utilizas el hbnetio.exe que viene con la distribución de harbour, en su lugar haz creado tu propia aplicación servidora.
¿Qué ventajas y/o desventajas implica el uso del servidor que viene con la distribución de harbour?

[Google]
Hi Roberto:
As explained beam is actually very simple to use netio.
My doubts are on the side of the server application, in the example you've described does not use the hbnetio.exe that comes with the distribution of harbour, in the beam spot created your own application server.
What advantages and / or disadvantages associated with using the server that comes with the distribution of harbor?

TIA

BestRegards
GVS
I've not tested NETIO server included with Harbour, but I'm sure that it is ok.

Simply, I like to have more control over things, so, I've preferred to create my own server, to add to it a customized logs, interface, etc.

User avatar
serge_girard
Posts: 2372
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 629 times
Been thanked: 126 times
Contact:

Post by serge_girard » Sat Oct 11, 2014 12:14 pm

Roberto,

Can you explain how to let NETIO working with MySQL?

Thx,

Serge

User avatar
serge_girard
Posts: 2372
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 629 times
Been thanked: 126 times
Contact:

Post by serge_girard » Sat Oct 11, 2014 12:31 pm

Roberto,

In the mean time I found out...
So never mind my previous question!

S

User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Post by Agil Abdullah » Tue Oct 14, 2014 10:04 am

Hi All,

I am very sorry to tell you that I am late to reply last comments. This because I've been working hard to finish revised codes as required by you.

I'll be back some day this week with new attachment and explain things when neede ( and all reply all comments).

Many-many thanks to you all.
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender

User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Post by Agil Abdullah » Thu Oct 16, 2014 7:22 am

Many thanks for advices, comments, etc From:

- Roberto Lopez
- Serge Girard
- gvaronas

Today, I am finishing to separate GUI CODES from DBF handles (non-GUI) by creating new *.prg dan *.Fmg to make them easy to organize. But, suddenly error found in compiling. As if I made double functions, in fact I did not:

Harbour 3.2.0dev (r1407111333)
Copyright (c) 1999-2014, http://harbour-project.org/" onclick="window.open(this.href);return false;
C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/mandbf01.o:mandbf01.c:(.text+0x0): multiple definition of `HB_FUN_OPENMANBIO'
C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/manpower.o:manpower.c:(.text+0x40): first defined here
C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/mandbf01.o:mandbf01.c:(.text+0x20): multiple definition of `HB_FUN_OPENMANBACK'
C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/manpower.o:manpower.c:(.text+0x60): first defined here
C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/mandbf01.o:mandbf01.c:(.text+0x40): multiple definition of `HB_FUN_OPENMANBASIC'
C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/manpower.o:manpower.c:(.text+0x80): first defined here
C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/mandbf01.o:mandbf01.c:(.text+0x60): multiple definition of `HB_FUN_MANREINDEXDATABASE'
C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/manpower.o:manpower.c:(.text+0xa0): first defined here
C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/mandbf01.o:mandbf01.c:(.text+0x80): multiple definition of `HB_FUN_MANDATAINTEGRITY'
C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/manpower.o:manpower.c:(.text+0xc0): first defined here
C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/mandbf01.o:mandbf01.c:(.text+0xa0): multiple definition of `HB_FUN_LOCKMANCTRFILE'
C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/manpower.o:manpower.c:(.text+0xe0): first defined here
C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/mandbf91.o:mandbf91.c:(.text+0x0): multiple definition of `HB_FUN_MAN01SAVEDATAENTRY'
C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/manpower.o:manpower.c:(.text+0x0): first defined here
C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/mandbf91.o:mandbf91.c:(.text+0x20): multiple definition of `HB_FUN_MAN01DATAENTRY'
C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/manpower.o:manpower.c:(.text+0x20): first defined here
collect2: ld returned 1 exit status
hbmk2[manpower2]: Error: Running linker. 1
gcc.exe C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/manpower2.o C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/manpower.o C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/manbio.o C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/manback.o C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/manlib.o C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/mandbf01.o C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/manedit01.o C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/mandbf91.o C:/Users/toshiba/AppData/Local/Temp/hbmk_bxkw1n.dir/manbostaurus.o


As I remember this need a "cleaning thing" when building, but I don't know how to do it. Pls kindly help.

Best Regards.
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender

User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Post by Agil Abdullah » Thu Oct 16, 2014 4:48 pm

Ok. I can overcome the build/compile error. It^s my own mistake when putting progs in *.hbp file.
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender

User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Post by Agil Abdullah » Sun Oct 19, 2014 7:51 pm

Hi All,

Up to day, I finished some Master Tables as you can see on screenshoot below. This time we do exercises with Split Window/Box and many more.

And some modifications been made briefly as follows:

- Keyfield Company to name COMPCODE, CHARACTER, 2 LENGTH
- Keyfield Unit to name UNITCODE, CHARACTER, 2 LENGTH
- Keyfield Department to name DEPTCODE, CHARACTER, 4 LENGTH

These must be consistant in every tables to ensure connectibility between all tables.

The codes was written as suggestd by Roberto Lopez:

- Separate GUI codes from non-GUI and dbf-handling codes, placed in separates prog-files.
This is to make easy to evolve to MySQL in futher development

- Data entry/Query is organized to retrieve&save records from/to DBF, then placed in Array, then deploy into grid.
So no live data is used in Grid, instead use Recordset. This is for preparation to use NETIO for further development.

But sorry, Source codes is not attached this time coz i Need time put togather pieces of files needed to share. This time is 2 and half o'clock in the morning Jakarta Time.

Best Regards
Attachments
Manpower04.png
Manpower04.png (318.24 KiB) Viewed 2589 times
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender

User avatar
esgici
Posts: 4518
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 391 times
Been thanked: 111 times
Contact:

Post by esgici » Sun Oct 19, 2014 8:32 pm

Agil Abdullah wrote:...
Up to day, I finished some Master Tables as you can see on screenshoot below. This time we do exercises with Split Window/Box and many more.
...
Thanks to share, Agil.

I will wait eagerly the continuation :arrow:

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D

User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Post by Agil Abdullah » Mon Oct 20, 2014 9:43 am

Many-many thanks to Esgici for kind attention.

I will finish this project scheduled to be ready to fully implemented at beginning of 2015. May be developed in 2 or 3 versions to accommodate users' specific need.

Cheers. :D :D
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender

User avatar
Agil Abdullah
Posts: 204
Joined: Mon Aug 25, 2014 11:57 am
Location: Jakarta, Indonesia
Contact:

Post by Agil Abdullah » Mon Oct 20, 2014 10:41 am

Before I put in latest attachment of source progs in full and new data structures in full, let me share pieces of codes of how I did exercises with Split Window/Box as seen at obove screenshoot. May be useful for beginners.

Salam Hangat dari Jakarta.

Code: Select all

**manmastbl.prg** (topmost pieces)

#include "hmg.ch"
#include "i_color_nvo.ch"

//--Open dbf method-set
#Define D_SHARED        .F.
#Define D_EXCLUSIVE     .T.
#Define D_WAIT           1
#Define D_READWRITE     .T.
#Define D_READONLY      .F.

SET CENTURY ON
SET DELETED OFF
SET DATE TO BRITISH

#Define COMP_KEY_COL     1
#Define COMP_KEY_LEN     2
#Define UNIT_KEY_COL     1
#Define UNIT_KEY_LEN     2
#Define DEPT_KEY_COL     1
#Define DEPT_KEY_LEN     4

********************************
* Edit Master Tables (Company, Unit, Department)
********************************
Function ManEditMasterTables()
        PRIVATE aCompHeaders
	PRIVATE aCompRecords
	PRIVATE aCompWidths
	PRIVATE aCompControls
	
	PRIVATE aUnitHeaders
	PRIVATE aUnitRecords
	PRIVATE aUnitWidths
	PRIVATE aUnitControls
	
	PRIVATE aDeptHeaders
	PRIVATE aDeptRecords
	PRIVATE aDeptWidths
	PRIVATE aDeptControls
	
	Private nMainWidth := getdesktopwidth()*0.90
	Private nMainHeight:= getdesktopheight()*0.50
	Private bBackcolor, bFontcolor
	Private isCompanyActive, isUnitActive, isDeptActive
	
	//--initial startup set active to Company Table Grid
	isCompanyActive := .T.
	isUnitActive    := .F.
	isDeptActive    := .F.
	
	//--Grid get-settings
	aCompHeaders  := Mangetcomphead()
	aCompRecords  := Mangetcomprecord( "ALL" )
	aCompwidths   := MangetcompWidth()
	aCompControls := MangetcompControl()

	aUnitHeaders  := MangetUnithead()
	aUnitRecords  := MangetUnitrecord( "ALL" )
	aUnitwidths   := MangetUnitWidth()
	aUnitControls := MangetUnitControl()

	aDeptHeaders  := MangetDepthead()
	aDeptRecords  := MangetDeptrecord( "ALL" )
	aDeptwidths   := MangetDeptWidth()
	aDeptControls := MangetDeptControl()
	
	
    bBackColor := { || if ( This.CellRowIndex/2 == int(This.CellRowIndex/2) , {128,128,128} , {192,192,192} ) }
    bFontColor := { || if ( This.CellRowIndex/2 == int(This.CellRowIndex/2) , BLUE , RED ) }

    CellNavigationColor (_SELECTEDCELL_FORECOLOR, BROWN)
    CellNavigationColor (_SELECTEDCELL_BACKCOLOR, YELLOW)
    CellNavigationColor (_SELECTEDCELL_DISPLAYCOLOR, .T.)

    CellNavigationColor (_SELECTEDROW_FORECOLOR, YELLOW)
    CellNavigationColor (_SELECTEDROW_BACKCOLOR, MAROON)
    CellNavigationColor (_SELECTEDROW_DISPLAYCOLOR, .T.)

        //--start main window
 	DEFINE WINDOW Form_Master ;
               AT 0,0                ;
               WIDTH    nMainWidth   ;
                HEIGHT   nMainHeight     ;
                TITLE    'Master Tables' ;
                CHILD                    ;
                ON INIT  ManEditMasterInit()   ;
                FONT    'Arial' SIZE 10 

		DEFINE STATUSBAR
			STATUSITEM 'HMG Power Ready' 
		END STATUSBAR

	     DEFINE MAIN MENU 
                      POPUP 'Client-Server'
                              ITEM 'Test Client to Server NETIO' ACTION ServerConnect()
                      END POPUP
		      POPUP '&Help'
			     ITEM 'Master Table Company status'  ACTION Msginfo ( "Company Table is " + iif(isCompanyActive, "Active", "Not Active"))
			     ITEM 'Master Table Unit status'          ACTION Msginfo ( "Unit Table is " + iif(isUnitActive, "Active", "Not Active"))
			     ITEM 'Master Table Department status'    ACTION Msginfo ( "Department Table is " + iif(isDeptActive, "Active", "Not Active"))
			     ITEM 'Help Page'	                     ACTION MsgInfo ("not available yet") 
		       END POPUP
		END MENU

		DEFINE SPLITBOX 

                COMBOBOX Combo_Master ;
                        ITEMS        {'Company Table','Unit Table','Department Table'} ;
                        VALUE        1 ;
                        TOOLTIP      'Choose a Master Table of records to add, edit, delete' ;
                        ON CHANGE    ManSelectMaster() ;
                        GRIPPERTEXT "Master Table To Edit: " 

                 DEFINE TOOLBAR ToolBar_Comp BUTTONSIZE 85,85 FLAT 

			BUTTON        Button_AddCompany      ;
				   CAPTION   '&Add'          ;
				   PICTURE   'Add-64'        ;
				   ACTION    ManAddCompany() ;
                                   TOOLTIP   'Add new record to Company'
				
			BUTTON Button_UpdateCompany ;
				    CAPTION   '&Update' ;
				    PICTURE   'Update-64' ;
				    ACTION     iif( Form_Master.Grid_Company.Itemcount=0, MsgInfo("No record to update" ), ManEditCompany()) ;
                                    TOOLTIP   'Update existing record of Company'
				
			BUTTON Button_DeleteCompany ;
				    CAPTION   '&Delete' ;
				    PICTURE   'Remove-64' ;
				    ACTION    iif( Form_Master.Grid_Company.Itemcount=0, MsgInfo("No record to delete" ), ManDeleteCompany()) ;
                                    TOOLTIP   'Delete existing record of Company'
			
 			END TOOLBAR
			  
		DEFINE TOOLBAR ToolBar_Unit BUTTONSIZE 85,85 FLAT 
                         BUTTON        Button_AddUnit      ;
				    CAPTION   '&Add'          ;
				    PICTURE   'Add-64'        ;
				    ACTION    ManAddUnit() ;
                                    TOOLTIP   'Add new record to Unit of Company'
				
			  BUTTON Button_UpdateUnit ;
				    CAPTION   '&Update' ;
				    PICTURE   'Update-64' ;
				    ACTION     iif( Form_Master.Grid_Unit.Itemcount=0, MsgInfo("No record to update" ), ManEditUnit() ) ;
                                   TOOLTIP   'Update existing record of Unit of Company'
				
			  BUTTON Button_DeleteUnit ;
				     CAPTION   '&Delete' ;
				     PICTURE   'Remove-64' ;
				     ACTION    iif( Form_Master.Grid_Unit.Itemcount=0, MsgInfo("No record to delete" ), ManDeleteUnit() ) ;
                                     TOOLTIP   'Delete existing record of Unit of Company'
 		END TOOLBAR
			  
                DEFINE TOOLBAR ToolBar_Dept BUTTONSIZE 85,85 FLAT 
			  BUTTON        Button_AddDept      ;
				    CAPTION   '&Add'          ;
				    PICTURE   'Add-64'        ;
				    ACTION    ManAddDept() ;
                                   TOOLTIP   'Add new record to Department'
				
			  BUTTON Button_UpdateDept ;
				    CAPTION   '&Update' ;
				    PICTURE   'Update-64' ;
				    ACTION     iif( Form_Master.Grid_Dept.Itemcount=0, MsgInfo("No record to update" ), ManEditDept() ) ;
                                   TOOLTIP   'Update existing record of Department'
						 	
		          BUTTON Button_DeleteDept ;
				    CAPTION   '&Delete' ;
				    PICTURE   'Remove-64' ;
				    ACTION    iif( Form_Master.Grid_Dept.Itemcount=0, MsgInfo("No record to delete" ), ManDeleteDept()) ;
                                   TOOLTIP   'Delete existing record of Department'
                END TOOLBAR
			
		DEFINE TOOLBAR ToolBar_Network BUTTONSIZE 85,85 FLAT
			   BUTTON Button_Network ;
				    CAPTION   'Net&work' ;
				    PICTURE   'network-64' ;
				    ACTION    ( Msginfo("You are going to run NETIO Server."), Servermain() );
                                    TOOLTIP   'Network Transmission, Server Application'
			   BUTTON Button_Server ;
				    CAPTION   '&NETIO' ;
				    PICTURE   'NETIO-64' ;
				    ACTION    ( Msginfo("You are going to connect NETIO Server as Client."), ServerConnect() );
                                   TOOLTIP   'Connect to Server NETIO, Client application'
		END TOOLBAR
			
		DEFINE TOOLBAR ToolBar_Exit BUTTONSIZE 85,85 FLAT
			   BUTTON Button_Exit3 ;
				    CAPTION   '&Exit' ;
				    PICTURE   'exit-64' ;
				    ACTION    ( Form_Master.release ) ;
                                   TOOLTIP   'Back to Main Menu'
		END TOOLBAR

                //-*- Grid Value (row post) return in array (row, col) because option CELLNAVIGATION is used
                DEFINE GRID Grid_Company 
                        WIDTH        400 
                        HEIGHT       200 
                        FONTNAME     'ARIAL'
                        FONTSIZE     9
                        FONTBOLD     .T.
                        TOOLTIP      NIL
                        ONGOTFOCUS   ( ManCompEnableUpdate(.T.) , ManCompEnableDelete(.T.) )
                        ONLOSTFOCUS  ( ManCompEnableUpdate(.F.) , ManCompEnableDelete(.F.) )
                        ITEMS        aCompRecords
                        HEADERS      aCompHeaders 
                        WIDTHS       aCompWidths  
                         VALUE        1
                         BACKCOLOR    SpringGreen 
                         FONTCOLOR    MediumBlue
			 DYNAMICBACKCOLOR bBackColor 
                         DYNAMICFORECOLOR bFontColor 						
                         COLUMNCONTROLS NIL
                         CELLNAVIGATION .T.
                         LOCKCOLUMNS  2
                 END GRID
				
                 Form_Master.Grid_Company.ColumnHEADER (1) := aCompHeaders[1]
	
                 DEFINE GRID Grid_Unit
                         WIDTH        400 
                        HEIGHT       200 
                        FONTNAME     'ARIAL'
                        FONTSIZE     9
                        FONTBOLD     .T.
                       TOOLTIP      NIL
                       ONGOTFOCUS   ( ManUnitEnableUpdate(.T.) , ManUnitEnableDelete(.T.) )
                       ONLOSTFOCUS  ( ManUnitEnableUpdate(.F.) , ManUnitEnableDelete(.F.) )
                       ITEMS        aUnitRecords
                       HEADERS      aUnitHeaders 
                       WIDTHS       aUnitWidths  
                       VALUE        1
                        BACKCOLOR    Seashell
                        FONTCOLOR    MediumBlue		                                                              
                        DYNAMICBACKCOLOR bBackColor  
                        DYNAMICFORECOLOR bFontColor  						
                        COLUMNCONTROLS NIL
                        CELLNAVIGATION .T.
                        LOCKCOLUMNS  2
                END GRID
			
                Form_Master.Grid_Unit.ColumnHEADER (1) := aUnitHeaders[1]
			
                DEFINE GRID Grid_Dept
                          WIDTH        400 
                          HEIGHT       200 
                          FONTNAME     'ARIAL'
                          FONTSIZE     9
                          FONTBOLD     .T.
                          TOOLTIP      NIL
                          ONGOTFOCUS   ( ManDeptEnableUpdate(.T.) , ManDeptEnableDelete(.T.) )
                          ONLOSTFOCUS  ( ManDeptEnableUpdate(.F.) , ManDeptEnableDelete(.F.) )
                          ITEMS        aDeptRecords
                          HEADERS      aDeptHeaders 
                          WIDTHS       aDeptWidths  
                          VALUE        1
                           BACKCOLOR    PowderBlue
                           FONTCOLOR    MediumBlue
                           DYNAMICBACKCOLOR bBackColor 
                           DYNAMICFORECOLOR bFontColor  						
                           COLUMNCONTROLS NIL
                           CELLNAVIGATION .T.
                           LOCKCOLUMNS  2
                END GRID
				
                Form_Master.Grid_Dept.ColumnHEADER (1) := aDeptHeaders[1]
			
            END SPLITBOX

       END WINDOW

       CENTER WINDOW Form_Master
       ACTIVATE WINDOW Form_Master
Return
*
*
Agil Abdullah Albatati (just call me Agil)
Programmer Never Surrender

Post Reply