public void LoadData(string categoryName, bool showId) { CategoryName = categoryName; var userPreferenceSettingsDictionary = ActivityStreamCommon.GetUserPreferencesForActivityStream(CategoryName); if (userPreferenceSettingsDictionary.Values.Count > 0) { //defaultCPE.SelectedColor = userPreferenceSettingsDictionary[ActivityStreamCommon.BackGroungColorKey]; txtHeight.Text = userPreferenceSettingsDictionary[ActivityStreamCommon.HeightKey]; txtInterval.Text = userPreferenceSettingsDictionary[ActivityStreamCommon.DateRangeKey]; txtColor.Text = userPreferenceSettingsDictionary[ActivityStreamCommon.BackGroungColorKey]; txtWidth.Text = userPreferenceSettingsDictionary[ActivityStreamCommon.WidthKey]; txtStartDate.Text = String.Format("{0:MM/dd/yyyy}", DateTime.Now); drpActivityAlertMode.SelectedValue = userPreferenceSettingsDictionary[ActivityStreamCommon.DataTypeKey]; txtActivityStreamAuditId.Text = userPreferenceSettingsDictionary[ActivityStreamCommon.ActivityStreamAuditId]; txtActivityStreamPageSize.Text = userPreferenceSettingsDictionary[ActivityStreamCommon.ActivityStreamPageSize]; txtActivityStreamTitle.Text = userPreferenceSettingsDictionary[ActivityStreamCommon.ActivityStreamTitle]; drpPagingStyle.SelectedValue = userPreferenceSettingsDictionary[ActivityStreamCommon.ActivityStreamPagingStyle]; LoadSource(); LoadCurrentTarget(); } else { txtHeight.Text = string.Empty; txtInterval.Text = string.Empty; txtColor.Text = string.Empty; txtWidth.Text = string.Empty; txtStartDate.Text = string.Empty; txtActivityStreamAuditId.Text = string.Empty; txtActivityStreamPageSize.Text = string.Empty; txtActivityStreamTitle.Text = string.Empty; } }
private void LoadActivityStreamSettings() { var userPreferenceCategoryName = ActivityStreamName; var userPreferenceSettingsDictionary = ActivityStreamCommon.GetUserPreferencesForActivityStream(userPreferenceCategoryName); DateInterval = Convert.ToInt32(userPreferenceSettingsDictionary[ActivityStreamCommon.DateRangeKey]); var backGroundColor = userPreferenceSettingsDictionary[ActivityStreamCommon.BackGroungColorKey]; var width = userPreferenceSettingsDictionary[ActivityStreamCommon.WidthKey]; var height = userPreferenceSettingsDictionary[ActivityStreamCommon.HeightKey]; DataViewMode = userPreferenceSettingsDictionary[ActivityStreamCommon.DataTypeKey]; ActivityStreamPageSize = Convert.ToInt32(userPreferenceSettingsDictionary[ActivityStreamCommon.ActivityStreamPageSize]); lblActivityStreamTitle.Text = userPreferenceSettingsDictionary[ActivityStreamCommon.ActivityStreamTitle]; PagingStyle = userPreferenceSettingsDictionary[ActivityStreamCommon.ActivityStreamPagingStyle]; ActivityStreamGroupIntervalInSeconds = Convert.ToInt32(userPreferenceSettingsDictionary[ActivityStreamCommon.ActivityStreamGroupInterval]); ActivityStreamTempPageSize = ActivityStreamPageSize; lblDataViewMode.Text = "<font color='Teal'> Data View Mode: <font/>" + " <font color='Black'>*" + DataViewMode + "<font/>"; tblMain.Style["background-color"] = "#" + backGroundColor; //tblMain.Height = height; divContainer.Style.Add("width", width + "px"); divContainer.Style.Add("height", height + "px"); divContainer.Style.Add("overflow", "auto"); var x = "<font color='Black'>" + String.Format("{0:MM/dd/yyyy}", DateTime.Now.AddDays(DateInterval * (-1))) + " - " + String.Format("{0:MM/dd/yyyy}", DateTime.Now) + "<font/>"; lblDateRange.Text = "<font color='Teal'> Date Range: <font/>" + " " + x; try { ActivityStreamAuditId = Convert.ToInt32(userPreferenceSettingsDictionary[ActivityStreamCommon.ActivityStreamAuditId]); lblActivityStreamAuditId.Text = lblCount.Text = "<font color='Teal'>" + "Audit Id: " + "<font/>" + "<font color='Black'>" + ActivityStreamAuditId + "<font/>"; } catch { } }