Type | Description | |||
Long | A long expression that indicates the non-working days in a week. |
You can select the non-working week days in the following table ( In Internet Explorer, you have to allow running the script on this page ).
Saturday | Friday | Thursday | Wednesday | Tuesday | Monday | Sunday | |
Value | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
Bit |
Click the Bit row for non-working week days and the value for property is:
The following samples sets the Sundays as being non-working and also shows it on the schedule panel as in the above screen shot:
VBA (MS Access, Excell...)
With Schedule1 With .Calendar .NonworkingDays = 1 .Selection = "value in (#6/14/2012#,#6/15/2012#,#6/16/2012#,#6/17/2012#)" .FirstWeekDay = 1 End With .NonworkingTimes.Add 1,"00:00","00:00",-1 End With
VB6
With Schedule1 With .Calendar .NonworkingDays = 1 .Selection = "value in (#6/14/2012#,#6/15/2012#,#6/16/2012#,#6/17/2012#)" .FirstWeekDay = exMonday End With .NonworkingTimes.Add 1,"00:00","00:00",-1 End With
VB.NET
With Exschedule1 With .Calendar .NonworkingDays = 1 .Selection = "value in (#6/14/2012#,#6/15/2012#,#6/16/2012#,#6/17/2012#)" .FirstWeekDay = exontrol.EXSCHEDULELib.WeekDayEnum.exMonday End With .NonworkingTimes.Add(1,"00:00","00:00",-1) End With
VB.NET for /COM
With AxSchedule1 With .Calendar .NonworkingDays = 1 .Selection = "value in (#6/14/2012#,#6/15/2012#,#6/16/2012#,#6/17/2012#)" .FirstWeekDay = EXSCHEDULELib.WeekDayEnum.exMonday End With .NonworkingTimes.Add(1,"00:00","00:00",-1) End With
C++
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXSCHEDULELib' for the library: 'ExSchedule 1.0 Control Library'
#import <ExSchedule.dll>
using namespace EXSCHEDULELib;
*/
EXSCHEDULELib::ISchedulePtr spSchedule1 = GetDlgItem(IDC_SCHEDULE1)->GetControlUnknown();
EXSCHEDULELib::ICalendarPtr var_Calendar = spSchedule1->GetCalendar();
var_Calendar->PutNonworkingDays(1);
var_Calendar->PutSelection("value in (#6/14/2012#,#6/15/2012#,#6/16/2012#,#6/17/2012#)");
var_Calendar->PutFirstWeekDay(EXSCHEDULELib::exMonday);
spSchedule1->GetNonworkingTimes()->Add(L"1",L"00:00",L"00:00",-1);
C++ Builder
Exschedulelib_tlb::ICalendarPtr var_Calendar = Schedule1->Calendar; var_Calendar->NonworkingDays = 1; var_Calendar->set_Selection(TVariant("value in (#6/14/2012#,#6/15/2012#,#6/16/2012#,#6/17/2012#)")); var_Calendar->FirstWeekDay = Exschedulelib_tlb::WeekDayEnum::exMonday; Schedule1->NonworkingTimes->Add(L"1",L"00:00",L"00:00",-1);
C#
exontrol.EXSCHEDULELib.Calendar var_Calendar = exschedule1.Calendar; var_Calendar.NonworkingDays = 1; var_Calendar.Selection = "value in (#6/14/2012#,#6/15/2012#,#6/16/2012#,#6/17/2012#)"; var_Calendar.FirstWeekDay = exontrol.EXSCHEDULELib.WeekDayEnum.exMonday; exschedule1.NonworkingTimes.Add(1.ToString(),"00:00","00:00",-1);
JavaScript
<OBJECT classid="clsid:9B09E13D-7A88-4299-9DBE-383380435377" id="Schedule1"></OBJECT> <SCRIPT LANGUAGE="JScript"> var var_Calendar = Schedule1.Calendar; var_Calendar.NonworkingDays = 1; var_Calendar.Selection = "value in (#6/14/2012#,#6/15/2012#,#6/16/2012#,#6/17/2012#)"; var_Calendar.FirstWeekDay = 1; Schedule1.NonworkingTimes.Add(1,"00:00","00:00",-1); </SCRIPT>
C# for /COM
EXSCHEDULELib.Calendar var_Calendar = axSchedule1.Calendar; var_Calendar.NonworkingDays = 1; var_Calendar.Selection = "value in (#6/14/2012#,#6/15/2012#,#6/16/2012#,#6/17/2012#)"; var_Calendar.FirstWeekDay = EXSCHEDULELib.WeekDayEnum.exMonday; axSchedule1.NonworkingTimes.Add(1.ToString(),"00:00","00:00",-1);
X++ (Dynamics Ax 2009)
public void init() { COM com_Calendar; anytype var_Calendar; ; super(); var_Calendar = exschedule1.Calendar(); com_Calendar = var_Calendar; com_Calendar.NonworkingDays(1); com_Calendar.Selection("value in (#6/14/2012#,#6/15/2012#,#6/16/2012#,#6/17/2012#)"); com_Calendar.FirstWeekDay(1/*exMonday*/); exschedule1.NonworkingTimes().Add(1,"00:00","00:00",-1); }
Delphi 8 (.NET only)
with AxSchedule1 do begin with Calendar do begin NonworkingDays := 1; Selection := 'value in (#6/14/2012#,#6/15/2012#,#6/16/2012#,#6/17/2012#)'; FirstWeekDay := EXSCHEDULELib.WeekDayEnum.exMonday; end; NonworkingTimes.Add(1,'00:00','00:00',-1); end
Delphi (standard)
with Schedule1 do begin with Calendar do begin NonworkingDays := 1; Selection := 'value in (#6/14/2012#,#6/15/2012#,#6/16/2012#,#6/17/2012#)'; FirstWeekDay := EXSCHEDULELib_TLB.exMonday; end; NonworkingTimes.Add(1,'00:00','00:00',-1); end
VFP
with thisform.Schedule1 with .Calendar .NonworkingDays = 1 .Selection = "value in (#6/14/2012#,#6/15/2012#,#6/16/2012#,#6/17/2012#)" .FirstWeekDay = 1 endwith .NonworkingTimes.Add(1,"00:00","00:00",-1) endwith
dBASE Plus
local oSchedule,var_Calendar oSchedule = form.Activex1.nativeObject var_Calendar = oSchedule.Calendar var_Calendar.NonworkingDays = 1 var_Calendar.Selection = "value in (#6/14/2012#,#6/15/2012#,#6/16/2012#,#6/17/2012#)" var_Calendar.FirstWeekDay = 1 oSchedule.NonworkingTimes.Add(Str(1),"00:00","00:00",-1)
XBasic (Alpha Five)
Dim oSchedule as P Dim var_Calendar as P oSchedule = topparent:CONTROL_ACTIVEX1.activex var_Calendar = oSchedule.Calendar var_Calendar.NonworkingDays = 1 var_Calendar.Selection = "value in (#6/14/2012#,#6/15/2012#,#6/16/2012#,#6/17/2012#)" var_Calendar.FirstWeekDay = 1 oSchedule.NonworkingTimes.Add(1,"00:00","00:00",-1)
Visual Objects
local var_Calendar as ICalendar var_Calendar := oDCOCX_Exontrol1:Calendar var_Calendar:NonworkingDays := 1 var_Calendar:Selection := "value in (#6/14/2012#,#6/15/2012#,#6/16/2012#,#6/17/2012#)" var_Calendar:FirstWeekDay := exMonday oDCOCX_Exontrol1:NonworkingTimes:Add(AsString(1),"00:00","00:00",-1)
PowerBuilder
OleObject oSchedule,var_Calendar oSchedule = ole_1.Object var_Calendar = oSchedule.Calendar var_Calendar.NonworkingDays = 1 var_Calendar.Selection = "value in (#6/14/2012#,#6/15/2012#,#6/16/2012#,#6/17/2012#)" var_Calendar.FirstWeekDay = 1 oSchedule.NonworkingTimes.Add(String(1),"00:00","00:00",-1)