I was trying to create a facility/equipment and setting its work hours through c# code, i am successfully able to create the facility and set its work hours. I am able to set the work hours at Freq = Daily/Weekly. The problem i am facing right now is i am not able to set different timings for different days (Freq = weekly), what is happening is the timings are getting set for all the days in the week and if i change one of the timings all the timings of other days gets changed.
Ex: I set timings like this
calendarRule1.Attributes["duration"] = 540;
calendarRule1.Attributes["offset"] = 480;
calendarRule1.Attributes["timezonecode"] = 190;
for the calendar rule as shown below:
calendarRule.Attributes["duration"] = 1440;
calendarRule.Attributes["pattern"] = "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR";
calendarRule.Attributes["timezonecode"] = 190;
The above code adds work hours from Monday to Friday with work hours (8 AM to 5 PM ) Can someone assist me with code as to how to set different work hours on different days i.e. Vary-by-day.
Thanks in advance (code snippet is just an example shown - i have all the supporting code added)