public ActionResult CalendarDisplay(CalendarViewModel model) {
			CalendarViewSettings settings = new CalendarViewSettings();

			if (!String.IsNullOrEmpty(model.SerialSettings)) {
				settings = model.GetSettings();

				model.AssignSettings(settings);
			} else {
				CalendarDisplaySettings payload = new CalendarDisplaySettings();

				if (this.WidgetPayload is CalendarDisplaySettings) {
					payload = (CalendarDisplaySettings)this.WidgetPayload;
					payload.LoadData();

					settings = model.ConvertSettings(payload);
					model.AssignSettings(settings);

					model.SetSettings(payload);
				}
			}

			ModelState.Clear();

			model.LoadData(settings.SiteID, true);

			if (String.IsNullOrEmpty(settings.AlternateViewFile)) {
				return PartialView(model);
			} else {
				return PartialView(settings.AlternateViewFile, model);
			}
		}
		public void SetSettings(CalendarDisplaySettings obj) {
			string sXML = String.Empty;

			if (obj != null) {
				CalendarViewSettings settings = ConvertSettings(obj);

				XmlSerializer xmlSerializer = new XmlSerializer(typeof(CalendarViewSettings));

				using (StringWriter stringWriter = new StringWriter()) {
					xmlSerializer.Serialize(stringWriter, settings);
					sXML = stringWriter.ToString();
					sXML = Utils.EncodeBase64(sXML);
				}
			}

			this.SerialSettings = sXML;
		}
		public CalendarViewSettings ConvertSettings(CalendarDisplaySettings obj) {
			CalendarViewSettings settings = new CalendarViewSettings();

			if (obj != null) {
				settings.SiteID = obj.SiteID;
				settings.AlternateViewFile = obj.AlternateViewFile;
				settings.GenerateCss = obj.GenerateCss;
				settings.SpecifiedCssFile = obj.SpecifiedCssFile;
			}

			return settings;
		}