private void createTable() { workingDaysHours = workingDaysHoursService.getWorkingDaysHours(); timeSlotsList.Add("08.30-09.30"); timeSlotsList.Add("09.30-10.30"); timeSlotsList.Add("10.30-11.30"); timeSlotsList.Add("11.30-12.30"); timeSlotsList.Add("12.30-13.00"); timeSlotsList.Add("13.00-14.00"); timeSlotsList.Add("14.00-15.00"); timeSlotsList.Add("15.00-16.00"); timeSlotsList.Add("16.00-17.00"); }
private void populateData() { workingDaysHours = workingDaysHoursService.getWorkingDaysHours(); btnDaysCount.Text = workingDaysHours.NoOfWorkingDays.ToString(); List <String> workingArr = new List <String>(); if (workingDaysHours.Monday == 1) { workingArr.Add("Monday"); } if (workingDaysHours.Tuesday == 1) { workingArr.Add("Tuesday"); } if (workingDaysHours.Wednesday == 1) { workingArr.Add("Wednesday"); } if (workingDaysHours.Thursday == 1) { workingArr.Add("Thursday"); } if (workingDaysHours.Friday == 1) { workingArr.Add("Friday"); } if (workingDaysHours.Saturday == 1) { workingArr.Add("Saturday"); } if (workingDaysHours.Sunday == 1) { workingArr.Add("Sunday"); } btnWorkingDays.Text = String.Empty; foreach (String day in workingArr) { btnWorkingDays.Text = btnWorkingDays.Text + " | " + day; } btnTime.Text = workingDaysHours.NoOfHours + ":" + workingDaysHours.NoOfMinutes; }
private void getData() { workingDaysHoursService = new WorkingDaysHoursService(); workingDaysHours = workingDaysHoursService.getWorkingDaysHours(); // set data to fields numericNoOfDays.Value = workingDaysHours.NoOfWorkingDays; numericTPerDayHours.Value = workingDaysHours.NoOfHours; numericTPerDayMinutes.Value = workingDaysHours.NoOfMinutes; if (workingDaysHours.Monday == 1) { checkBoxMonday.Checked = true; } if (workingDaysHours.Tuesday == 1) { checkBoxTuesday.Checked = true; } if (workingDaysHours.Wednesday == 1) { checkBoxWednesday.Checked = true; } if (workingDaysHours.Thursday == 1) { checkBoxThursday.Checked = true; } if (workingDaysHours.Friday == 1) { checkBoxFriday.Checked = true; } if (workingDaysHours.Saturday == 1) { checkBoxSaturday.Checked = true; } if (workingDaysHours.Sunday == 1) { checkBoxSunday.Checked = true; } }