public EditScheduleP getSch(string sid) { EditScheduleP info = new EditScheduleP(); ScheduleM sm = new ScheduleM(); sm.schedule_id = sid; sm = sm.getSchedulesById(); Dt dt = new Dt(); info.schedule_title = sm.schedule_title; info.date = sm.date; info.month = sm.month; info.year = sm.year; info.hour = sm.hour; info.minute = sm.minute; info.time = sm.time; info.location = sm.location; info.priority = sm.priority; if (sm.response == "500") { info.serverResponse = "500"; } return(info); }
public ScheduleViewerP getInfo() { ScheduleViewerP info = new ScheduleViewerP(); ScheduleM sm = new ScheduleM(); sm.schedule_id = this.id; sm = sm.getSchedulesById(); Dt dt = new Dt(); info.title = sm.schedule_title; info.date = dt.getMonthByVal(int.Parse(sm.month)) + " " + sm.date + ", " + sm.year; info.time = sm.hour + ":" + sm.minute + " " + sm.time; info.location = sm.location; if (sm.priority == "1") { info.priority = "High"; } if (sm.priority == "2") { info.priority = "Medium"; } if (sm.priority == "3") { info.priority = "Low"; } if (sm.response == "500") { info.response = "500"; } return(info); }