pfc_propertyapply | |
|
pfcutil.pbl > pfc_u_tabpg_dwproperty_srvcalendar2 > pfc_propertyapply |
Full name | pfc_u_tabpg_dwproperty_srvcalendar2.pfc_propertyapply |
---|---|
Access | public |
Extend of | |
Return value | |
Prototype | event pfc_propertyapply() |
Name | Datatype |
---|---|
No Data |
Name | Datatype |
---|---|
lb_current | boolean |
lb_desired | boolean |
ld_date | date |
ld_empty | date[] |
ld_register | date[] |
li_datecount | integer |
li_rc | integer |
li_row | integer |
li_rowcount | integer |
ll_currentcolor | long |
ll_desiredcolor | long |
lnv_datetime | n_cst_datetime |
event pfc_propertyapply;call super::pfc_propertyapply;//////////////////////////////////////////////////////////////////////////////
//
// Function: pfc_PropertyApply
//
// Access: Public
//
// Arguments: None
//
// Returns: Integer
// 1 if it succeeds.
// -1 if an error occurs.
//
// Description:
// Apply the requested changes.
//
//////////////////////////////////////////////////////////////////////////////
//
// 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
integer li_rc
boolean lb_current, lb_desired
integer li_datecount = 0
long ll_desiredcolor, ll_currentcolor
date ld_register[]
date ld_empty[]
date ld_date
n_cst_datetime lnv_datetime
// Validate references.
If IsNull(idw_requestor) or Not IsValid(idw_requestor) Then
Return -1
End If
If IsNull(idw_requestor.iuo_calendar) or Not IsValid(idw_requestor.iuo_calendar) Then
Return -1
End If
// -- Bold Saturdays. --
lb_current = idw_requestor.iuo_calendar.of_IsSaturdayBold()
lb_desired = cbx_boldsaturdays.Checked
// If the desired value differs from the current value.
If lb_current<> lb_desired Then
li_rc = idw_requestor.iuo_calendar.of_SetSaturdayBold(lb_desired)
End If
// -- Color Saturdays. --
ll_currentcolor = idw_requestor.iuo_calendar.of_GetSaturdayColor()
ll_desiredcolor = long(em_colorsaturday.Text)
// If the desired value differs from the current value.
If ll_currentcolor<> ll_desiredcolor Then
li_rc = idw_requestor.iuo_calendar.of_SetSaturdayColor(ll_desiredcolor)
End If
// -- Bold Sundays. --
lb_current = idw_requestor.iuo_calendar.of_IsSundayBold()
lb_desired = cbx_boldsundays.Checked
// If the desired value differs from the current value.
If lb_current<> lb_desired Then
li_rc = idw_requestor.iuo_calendar.of_SetSundayBold(lb_desired)
End If
// -- Color Sundays. --
ll_currentcolor = idw_requestor.iuo_calendar.of_GetSundayColor()
ll_desiredcolor = long(em_colorsunday.Text)
// If the desired value differs from the current value.
If ll_currentcolor<> ll_desiredcolor Then
li_rc = idw_requestor.iuo_calendar.of_SetSundayColor(ll_desiredcolor)
End If
// -- Bold Holidays. --
lb_current = idw_requestor.iuo_calendar.of_IsHolidayBold()
lb_desired = cbx_boldholidays.Checked
// If the desired value differs from the current value.
If lb_current<> lb_desired Then
li_rc = idw_requestor.iuo_calendar.of_SetHolidayBold(lb_desired)
End If
// -- Color Holidays. --
ll_currentcolor = idw_requestor.iuo_calendar.of_GetHolidayColor()
ll_desiredcolor = long(em_colorholiday.Text)
// If the desired value differs from the current value.
If ll_currentcolor<> ll_desiredcolor Then
li_rc = idw_requestor.iuo_calendar.of_SetHolidayColor(ll_desiredcolor)
End If
// -- Set the dates of the Holidays. --
ld_register = ld_empty
li_datecount = 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_datecount ++
ld_register[li_datecount] = ld_date
End If
Next
li_rc = idw_requestor.iuo_calendar.of_SetHoliday(ld_register)
// -- Bold Marked days. --
lb_current = idw_requestor.iuo_calendar.of_IsMarkedDayBold()
lb_desired = cbx_boldmarkeddays.Checked
// If the desired value differs from the current value.
If lb_current<> lb_desired Then
li_rc = idw_requestor.iuo_calendar.of_SetMarkedDayBold(lb_desired)
End If
// -- Color Markedday. --
ll_currentcolor = idw_requestor.iuo_calendar.of_GetMarkeddayColor()
ll_desiredcolor = long(em_colormarkedday.Text)
// If the desired value differs from the current value.
If ll_currentcolor<> ll_desiredcolor Then
li_rc = idw_requestor.iuo_calendar.of_SetMarkeddayColor(ll_desiredcolor)
End If
// -- Set the dates of the Markeddays. --
ld_register = ld_empty
li_datecount = 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_datecount ++
ld_register[li_datecount] = ld_date
End If
Next
li_rc = idw_requestor.iuo_calendar.of_SetMarkedday(ld_register)
Return 1
end event
Name | Owner |
---|---|
No Data |
Full name |
---|
pfc_u_tabpg_dwproperty_srvcalendar2 |
Name | Scope |
---|---|
No Data |