public void AddDay(int index, int isworking, string reason, int day_num, int yyyymmdd) { GnkDayDTO day = new GnkDayDTO(); day.yyyymmdd = yyyymmdd; day.isworking = isworking; day.reason = reason; day.day_num = day_num; this.weeks[weeks.Count - 1].AddDay(index, day); }
public void FillEmptyDayToNull() { GnkDayDTO empty_day = new GnkDayDTO(); empty_day.yyyymmdd = 19000000; empty_day.isworking = -1; empty_day.reason = string.Empty; empty_day.day_num = 0; for (int i = 0; i < weeks.Count; i++) { if (weeks[i].Sunday == null) { weeks[i].Sunday = empty_day; } if (weeks[i].Monday == null) { weeks[i].Monday = empty_day; } if (weeks[i].Tuesday == null) { weeks[i].Tuesday = empty_day; } if (weeks[i].Wednesday == null) { weeks[i].Wednesday = empty_day; } if (weeks[i].Thursday == null) { weeks[i].Thursday = empty_day; } if (weeks[i].Friday == null) { weeks[i].Friday = empty_day; } if (weeks[i].Saturday == null) { weeks[i].Saturday = empty_day; } } }
private string GetClassCalendarLink(GnkDayDTO day, string teacherid, int today) { string reason = string.Empty; reason = string.Empty; if (day.yyyymmdd == today) { //reason = "<input type='button' class='btnCalendar' id='btnCalendar' onclick=\"getDetail('" + teacherid + "', '" + day.yyyymmdd.ToString() + "')\" "; reason = "<input type='button' class='btnCalendar' id='btnCalendar' "; reason += "value='Today' />"; } else { //reason += "value='Edit' />"; } if (day.reason.Length > 0) { reason = "<br />" + reason; } return reason; }
public void AddDay(int index, GnkDayDTO day) { switch (index) { case 0: this.Sunday = day; break; case 1: this.Monday = day; break; case 2: this.Tuesday = day; break; case 3: this.Wednesday = day; break; case 4: this.Thursday = day; break; case 5: this.Friday = day; break; case 6: this.Saturday = day; break; } }