Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
950
Define WorkDayStartTime and WorkDayEndTime but with a break in between
posted

Hi,

 I have the following situation:

I am developing a timesheet calendar. The thing is that I want to specify the working times for each day along with a break time in between.
Everyday can have different working times.

For example:

Monday 9:00-13:00(working time), 13:00-14:00 lunch break (non working time) , 14:00-18:00 (working time)
Tuesday the same
..
Friday 9:00- 15:00 (working time)    ONLY. the rest is non working time.


Right now I am using

if ((bool)work_days_times.Tables[0].Rows[t]["Working Day"]==true)
{

ultraCalendarInfo1.DaysOfWeek[dayOfWeek].IsWorkDay = true;

DateTime startTime = DateTime.Parse(work_days_times.Tables[0].Rows[t]["Start Time"].ToString());DateTime endTime = DateTime.Parse(work_days_times.Tables[0].Rows[t]["End Time"].ToString());

 

ultraCalendarInfo1.DaysOfWeek[dayOfWeek].WorkDayStartTime = new DateTime(1, 1, 1, startTime.Hour, startTime.Minute, 0);

ultraCalendarInfo1.DaysOfWeek[dayOfWeek].WorkDayEndTime = new DateTime(1, 1, 1, endTime.Hour, endTime.Minute, 0);

}

else

{

this.ultraCalendarInfo1.DaysOfWeek[dayOfWeek].IsWorkDay = false;

}