private void GridViewOpen() { int num = DateTime.DaysInMonth(this.m_Year, this.m_Month); this.ShowHideColumn(num); for (int i = 1; i <= num; i++) { this.gbList.Columns[i + 4].OptionsColumn.ReadOnly = false; this.gbList.Columns[i + 4].OptionsColumn.AllowEdit = true; DateTime dateTime = new DateTime(this.m_Year, this.m_Month, i); clsTimeKeeperOption _clsTimeKeeperOption = new clsTimeKeeperOption(); if (dateTime.DayOfWeek.ToString() == "Monday") { this.gbList.Columns[i + 4].AppearanceCell.BackColor = _clsTimeKeeperOption.MondayColor; } else if (dateTime.DayOfWeek.ToString() == "Tuesday") { this.gbList.Columns[i + 4].AppearanceCell.BackColor = _clsTimeKeeperOption.TuesdayColor; } else if (dateTime.DayOfWeek.ToString() == "Wednesday") { this.gbList.Columns[i + 4].AppearanceCell.BackColor = _clsTimeKeeperOption.WednesdayColor; } else if (dateTime.DayOfWeek.ToString() == "Thursday") { this.gbList.Columns[i + 4].AppearanceCell.BackColor = _clsTimeKeeperOption.ThursdayColor; } else if (dateTime.DayOfWeek.ToString() == "Friday") { this.gbList.Columns[i + 4].AppearanceCell.BackColor = _clsTimeKeeperOption.FridayColor; } else if (dateTime.DayOfWeek.ToString() == "Saturday") { this.gbList.Columns[i + 4].AppearanceCell.BackColor = _clsTimeKeeperOption.SaturdayColor; } else if (dateTime.DayOfWeek.ToString() == "Sunday") { this.gbList.Columns[i + 4].AppearanceCell.BackColor = _clsTimeKeeperOption.SundayColor; } if ((new DIC_HOLIDAY()).Exist(dateTime)) { this.gbList.Columns[i + 4].AppearanceCell.BackColor = _clsTimeKeeperOption.HolidayColor; } this.gbList.Columns[i + 4].Caption = this.DayName(this.m_Year, this.m_Month, i); } }
private void xfmTimekeeperTable_Load(object sender, EventArgs e) { clsTimeKeeperOption _clsTimeKeeperOption = new clsTimeKeeperOption(); if (_clsTimeKeeperOption.TimeKeeperTableDefault == 0) { this.LoadTimekeeperTable(); } else if (_clsTimeKeeperOption.TimeKeeperTableDefault == 1) { this.LoadTimekeeperTable1(); } else if (_clsTimeKeeperOption.TimeKeeperTableDefault == 2) { this.LoadTimekeeperTableHour(); } else if (_clsTimeKeeperOption.TimeKeeperTableDefault == 3) { this.LoadTimekeeperExtraPrivate(); } }