pfc_propertysyntax


pfcutil.pbl   >   pfc_u_tabpg_dwproperty_srvcalendar2   >   pfc_propertysyntax   

Full name pfc_u_tabpg_dwproperty_srvcalendar2.pfc_propertysyntax
Access public
Extend of
Return value
Prototype event pfc_propertysyntax()

Name Datatype
No Data

Name Datatype
lb_desired boolean
ld_date date
ld_registermarked string
li_cnt integer
li_desired integer
li_index integer
li_rc integer
li_registercount integer
li_row integer
li_rowcount integer
li_upper integer
lnv_conversion n_cst_conversion
lnv_datetime n_cst_datetime
ls_desired string
ls_register string
ls_syntax string

event pfc_propertysyntax;call super::pfc_propertysyntax;//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		pfc_propertysyntax
//
//	Access:    		Public
//
//	Arguments:  	None
//
//	Returns:   		String
//	  The syntax required to create the currently selections.
//   '!' in error
//
//	Description:  
//	Create the required syntax to match the current selections.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	6.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	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.
//
//////////////////////////////////////////////////////////////////////////////

integer	li_rowcount
integer	li_row
string	ls_register
string	ld_registermarked
integer	li_registercount
integer	li_desired
integer	li_upper
integer	li_cnt
integer 	li_rc
integer	li_index
string	ls_syntax
boolean	lb_desired
string	ls_desired
date		ld_date
n_cst_conversion lnv_conversion
n_cst_datetime		lnv_datetime

// Validate references.
If IsNull(idw_requestor) or Not IsValid(idw_requestor) Then
	Return '!'
End If
If IsNull(idw_requestor.iuo_calendar) or Not IsValid(idw_requestor.iuo_calendar) Then
	Return '!'
End If

// -- Bold Saturdays. --
lb_desired = cbx_boldsaturdays.Checked
ls_syntax += '~r~nThis.iuo_calendar.of_SetSaturdayBold('+lnv_conversion.of_String(lb_desired)+')'

// -- Color Saturdays. --
ls_desired = em_colorsaturday.Text
ls_syntax += '~r~nThis.iuo_calendar.of_SetSaturdayColor('+ls_desired+')'

// -- Bold Sundays. --
lb_desired = cbx_boldsundays.Checked
ls_syntax += '~r~nThis.iuo_calendar.of_SetSundayBold('+lnv_conversion.of_String(lb_desired)+')'

// -- Color Sundays. --
ls_desired = em_colorsunday.Text
ls_syntax += '~r~nThis.iuo_calendar.of_SetSundayColor('+ls_desired+')'

// -- Bold Holidays. --
lb_desired = cbx_boldholidays.Checked
ls_syntax += '~r~nThis.iuo_calendar.of_SetHolidayBold('+lnv_conversion.of_String(lb_desired)+')'

// -- Color Holidays. --
ls_desired = em_colorholiday.Text
ls_syntax += '~r~nThis.iuo_calendar.of_SetHolidayColor('+ls_desired+')'

// -- Set the dates of the Holidays. --
ls_register = ''
li_registercount = 0
li_rowcount = dw_holidays.RowCount()
For li_row = 1 to li_rowcount
	ld_date = dw_holidays.object.date.primary[li_row]
	If lnv_datetime.of_IsValid(ld_date) Then
		li_registercount ++
		ls_register += '~r~nld_registerholiday['+string(li_registercount)+'] = Date("'+ &
							String(ld_date)+'")'
	End If
Next
If li_registercount > 0 Then
	// -- Defined required variables.  -- 
	ls_syntax += '~r~nDate	ld_registerholiday[]'
	ls_syntax += ls_register
	ls_syntax += '~r~nThis.iuo_calendar.of_SetHoliday(ld_registerholiday)'
End If

//
// -- Bold Marked days. --
lb_desired = cbx_boldmarkeddays.Checked
ls_syntax += '~r~nThis.iuo_calendar.of_SetMarkedDayBold('+lnv_conversion.of_String(lb_desired)+')'

// -- Color Markedday. --
ls_desired = em_colormarkedday.Text
ls_syntax += '~r~nThis.iuo_calendar.of_SetMarkeddayColor('+ls_desired+')'

// -- Set the dates of the Markeddays. --
ls_register = ''
li_registercount = 0
li_rowcount = dw_markeddays.RowCount()
For li_row = 1 to li_rowcount
	ld_date = dw_markeddays.object.date.primary[li_row]
	If lnv_datetime.of_IsValid(ld_date) Then
		li_registercount ++
		ls_register += '~r~nld_registermarked['+string(li_registercount)+'] = Date("'+ &
							String(ld_date)+'")'
	End If
Next
If li_registercount > 0 Then
	// -- Defined required variables.  -- 
	ls_syntax += '~r~nDate	ld_registermarked[]'
	ls_syntax += ls_register
	ls_syntax += '~r~nThis.iuo_calendar.of_SetHoliday(ld_registermarked)'
End If

Return ls_syntax

end event

     
Name Owner
No Data

     
Name Owner
datawindow.rowcount datawindow
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.string systemfunctions
pfc_n_cst_conversion.of_string pfc_n_cst_conversion
pfc_n_cst_datetime.of_isvalid pfc_n_cst_datetime
pfc_u_tabpg_dwproperty_base.pfc_propertysyntax pfc_u_tabpg_dwproperty_base

     
Full name
pfc_u_tabpg_dwproperty_srvcalendar2

     
Name Scope
No Data