
DECLARE CONSTANT n_RadioOrder 	AS  QUANTITY	30005
DECLARE CONSTANT n_RadioQuote 	AS  QUANTITY	30006
DECLARE CONSTANT n_RadioRFQ 	AS  QUANTITY	30007
DECLARE CONSTANT n_RadioUDS 	AS  QUANTITY	30008
DECLARE CONSTANT n_BtnDashBrd 	AS  QUANTITY	30013

PROCEDURE OnRadioCheck
        DECLARE PARAMETER nControlID as QUANTITY
        DECLARE PARAMETER sName as TEXT
        DECLARE PARAMETER nValue as QUANTITY DO
{
	IF ([nValue] = 1) DO
	{
		DECLARE VARIABLE sWndID				AS TEXT 20
		DECLARE VARIABLE sLayoutCtrlID		AS TEXT 20
		DECLARE VARIABLE sBtnID				AS TEXT 20
				
		DECLARE VARIABLE nID AS QUANTITY 
		[nID] := GetWndID();
		
		[sWndID] 		:= IntToString( [nID] );
		[sLayoutCtrlID] := IntToString( GetCtrlIDByName("OrderEntry") );
		[sBtnID]		:= IntToString( [nControlID] );
		
		ExecExtSrciptProc("OnEntryTypeChanged", [sWndID], [sLayoutCtrlID], [sBtnID]);								
	}
}

PROCEDURE OnPress
        DECLARE PARAMETER nButtonID as QUANTITY
        DECLARE PARAMETER sButtonName as TEXT DO
{
	IF ([nButtonID] = n_BtnDashBrd) DO
	{
		DECLARE VARIABLE sWndID				AS TEXT 20
		DECLARE VARIABLE sLayoutCtrlID		AS TEXT 20
		DECLARE VARIABLE sBtnID				AS TEXT 20
				
		DECLARE VARIABLE nID AS QUANTITY 
		[nID] := GetWndID();
		
		[sWndID] 		:= IntToString( [nID] );
		[sLayoutCtrlID] := IntToString( GetCtrlIDByName("OrderEntry") );
		[sBtnID]		:= IntToString( [nButtonID] );
		
		ExecExtSrciptProc("OnExpandButtonClicked", [sWndID], [sLayoutCtrlID], [sBtnID], "1");	
	}	
}

PROCEDURE SetPreferenceOptions DO 
{
	CALL OnPress n_BtnDashBrd, "" ; 
}

##########################################################
PROCEDURE SetBkgColor
		 DECLARE PARAMETER sRVal AS TEXT
		 DECLARE PARAMETER sGVal AS TEXT 
		 DECLARE PARAMETER sBVal AS TEXT DO
{
	DECLARE VARIABLE nRed	AS QUANTITY
	DECLARE VARIABLE nGreen	AS QUANTITY
	DECLARE VARIABLE nBlue	AS QUANTITY
	
	[nRed]   := StringToInt([sRVal]);
	[nGreen] := StringToInt([sGVal]);
	[nBlue]  := StringToInt([sBVal]);
	
	IF ( [nRed] != 236 ) DO
	{
		SetBackColor([nRed], [nGreen], [nBlue], 1);
	}

}




