コード例 #1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            var myGenericControl = oGeneric;

            ApplicationCommon.UpdateUserPreference(CategoryName, ActivityStreamCommon.DateRangeKey, myGenericControl.Interval);
            ApplicationCommon.UpdateUserPreference(CategoryName, ActivityStreamCommon.BackGroungColorKey, myGenericControl.Color);
            ApplicationCommon.UpdateUserPreference(CategoryName, ActivityStreamCommon.WidthKey, myGenericControl.Width);
            ApplicationCommon.UpdateUserPreference(CategoryName, ActivityStreamCommon.DataTypeKey, myGenericControl.DataType);
            ApplicationCommon.UpdateUserPreference(CategoryName, ActivityStreamCommon.HeightKey, myGenericControl.Height);
            ApplicationCommon.UpdateUserPreference(CategoryName, ActivityStreamCommon.ActivityStreamAuditId, myGenericControl.ActivityStreamAuditId);
            ApplicationCommon.UpdateUserPreference(CategoryName, ActivityStreamCommon.ActivityStreamPageSize, myGenericControl.ActivityStreamPageSize);
            ApplicationCommon.UpdateUserPreference(CategoryName, ActivityStreamCommon.ActivityStreamPagingStyle, myGenericControl.PagingStyle);

            ActivityStreamCommon.SetExcludedSystemEntities(myGenericControl.ExcludedSystemEntities, CategoryName);

            if (!string.IsNullOrEmpty(Request.QueryString["returnPage"]))
            {
                var setId = ApplicationCommon.GetSetId();
                if (Request.QueryString["returnPage"] == "appUserDetail")
                {
                    Response.Redirect(Page.GetRouteUrl("AuthenticationAndAuthorizationSubRoutes", new { EntityName = "ApplicationUser", Action = "Details", SetId = setId }), false);
                }
                else if (Request.QueryString["returnPage"] == "appUserUpdate")
                {
                    Response.Redirect(Page.GetRouteUrl("AuthenticationAndAuthorizationSubRoutes", new { EntityName = "ApplicationUser", Action = "Update", SetId = setId }), false);
                }
            }
            else
            {
                Response.Redirect("~/Shared/ApplicationManagement/Development/ActivityStream/Default.aspx");
            }
        }