// devsolution 2003/6/17: Finished - Added items for calendar control /// <summary> /// devsolution 2003/6/17: /// Change to make a RenderEvents for modularity /// Routine to add show calendar logic /// And Clean up code as now the calendar next and previous /// controls must re-render the display and get the data again /// e.g. modularize the code /// </summary> /// <param name="DisplayMonth">Month to display 1=Jan, 2=Feb, etc</param> /// <param name="DisplayYear">Year to display YYYY, 2003 for 2003</param> private void RenderEvents(int DisplayMonth, int DisplayYear) { EventsDB events = new EventsDB(); myDataList.RepeatDirection = (Settings["RepeatDirectionSetting"].ToString() == "Horizontal" ? RepeatDirection.Horizontal : RepeatDirection.Vertical); myDataList.RepeatColumns = Int32.Parse(Settings["RepeatColumns"].ToString()); if (bool.Parse(Settings["ShowBorder"].ToString())) { //myDataList.BorderWidth=Unit.Pixel(1); myDataList.ItemStyle.BorderWidth = Unit.Pixel(1); } dsEventData = events.GetEvents(ModuleID, Version); myDataList.DataSource = dsEventData; myDataList.DataBind(); // devsolution 2003/6/17: Added items for calendar control if (bool.Parse(Settings["ShowCalendar"].ToString())) { CalendarPanel.Visible = true; string DisplayDate = string.Empty; // devsolution 2003/6/17: Must have Devsolution.Portal.dll in \bin for calendar display functionality EventCalendar eventcalendar = new EventCalendar(); lblCalendar.Text = eventcalendar.GenerateCalendar(ModuleID, DisplayMonth, DisplayYear, out DisplayDate, dsEventData); lblDisplayDate.Text = DisplayDate; } // devsolution 2003/6/17: Finished - Added items for calendar control myDataList.DataSource = dsEventData; myDataList.DataBind(); }