示例#1
0
        protected void UpdateButton_OnClick(object sender, EventArgs e)
        {
            WBFarm farm = WBFarm.Local;

            farm.MigrationType = MigrationType.SelectedValue;

            farm.MigrationSourceSystem = MigrationSourceSystem.Text;

            farm.MigrationControlListUrl  = MigrationControlListUrl.Text;
            farm.MigrationControlListView = MigrationControlListView.Text;

            farm.MigrationMappingListUrl  = MigrationMappingListUrl.Text;
            farm.MigrationMappingListView = MigrationMappingListView.Text;

            farm.MigrationSubjectsListUrl  = MigrationSubjectsListUrl.Text;
            farm.MigrationSubjectsListView = MigrationSubjectsListView.Text;

            farm.MigrationItemsPerCycle = ItemsPerCycle.Text;

            farm.MigrationUserName = UserName.Text;
            farm.MigrationPassword = UserPassword.Text;

            farm.Update();

            SPUtility.Redirect("/applications.aspx", SPRedirectFlags.Static, Context);
        }
示例#2
0
        protected void okButton_OnClick(object sender, EventArgs e)
        {
            WBFarm farm = WBFarm.Local;

            farm.FarmInstance = FarmInstance.SelectedValue;

            farm.ProtectedRecordsLibraryUrl      = ProtectedRecordsLibraryURL.Text;
            farm.PublicRecordsLibraryUrl         = PublicRecordsLibraryURL.Text;
            farm.PublicExtranetRecordsLibraryUrl = PublicExtranetRecordsLibraryURL.Text;

            farm.TeamSitesSiteCollectionUrl = TeamSitesSiteCollectionURL.Text;

            //farm.SystemAdminTeamGUIDString = SystemAdminTeam.Text;


            if (!String.IsNullOrEmpty(SystemAdminTeam.Text))
            {
                WBTaxonomy teams           = WBTaxonomy.GetTeams(SPContext.Current.Site);
                WBTeam     systemAdminTeam = teams.GetSelectedTeam(SystemAdminTeam.Text);
                if (systemAdminTeam != null)
                {
                    farm.SystemAdminTeamGUIDString = systemAdminTeam.Id.ToString();
                }
                else
                {
                    farm.SystemAdminTeamGUIDString = "";
                }
            }
            else
            {
                farm.SystemAdminTeamGUIDString = "";
            }


            farm.OpenWorkBoxesCachedDetailsListUrl = OpenWorkBoxesCachedDetailsListURL.Text;

            farm.RecordsManagersGroupName    = RecordsManagersGroupName.Text;
            farm.RecordsSystemAdminGroupName = RecordsSystemAdminGroupName.Text;

            farm.TimerJobsManagementSiteUrl = TimerJobsManagementSiteURL.Text;
            farm.TimerJobsServerName        = TimerJobsServerName.Text;

            farm.AllWorkBoxCollectionsPropertyValue = AllWorkBoxCollections.Text;

            farm.TermStoreName      = TermStoreName.Text;
            farm.TermStoreGroupName = TermStoreGroupName.Text;

            farm.WorkBoxDocumentContentTypeName = DocumentContentTypeName.Text;
            farm.WorkBoxRecordContentTypeName   = RecordContentTypeName.Text;

            farm.SendErrorReportEmailsTo = SendErrorReportsTo.Text;

            farm.Update();

            SPUtility.Redirect("/applications.aspx", SPRedirectFlags.Static, Context);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            WBFarm     farm = WBFarm.Local;
            WBTaxonomy subjectTagsTaxonomy = WBTaxonomy.GetSubjectTags(SPContext.Current.Site);

            WBSubjectTagsRecordsRoutings routings = farm.SubjectTagsRecordsRoutings(subjectTagsTaxonomy);

            if (!String.IsNullOrEmpty(Request.QueryString["RemoveIndex"]))
            {
                int index;
                if (Int32.TryParse(Request.QueryString["RemoveIndex"], out index))
                {
                    routings.RemoveAtIndex(index);

                    // Now save the new routing information:

                    SPContext.Current.Web.AllowUnsafeUpdates = true;
                    farm.SubjectTagsRecordsRoutingsString    = routings.ToString();
                    farm.Update();
                    SPContext.Current.Web.AllowUnsafeUpdates = false;

                    SPUtility.Redirect("/_admin/WorkBoxFramework/RecordsManagementAdmin.aspx", SPRedirectFlags.Static, Context);
                    return;
                }
            }

            if (!IsPostBack)
            {
                PublicDocumentEmailAlertsTo.Text = farm.PublicDocumentEmailAlertsTo;
                PublicWebsiteTeamEmail.Text      = farm.PublicWebsiteTeamEmail;
            }

            String html = "<table cellpadding='6'>\n";

            html += "<tr><th>Subject Tag</th><th>Public Library</th><th>Extranet Library</th></tr>\n\n";
            if (routings.Count > 0)
            {
                int index = 0;
                foreach (WBSubjectTagRecordsRoutings routing in routings)
                {
                    html += "<tr><td>" + routing.SubjectTag.FullPath + "</td><td>"
                            + routing.PublicDocumentsLibrary + "</td><td>"
                            + routing.ExtranetDocumentsLibrary + "</td><td>"
                            + "<a href='#' onclick='WorkBoxFramework_callDialog(\"/_admin/WorkBoxFramework/EditSubjectTagRouting.aspx?RouteIndex=" + index + "\");'>edit</a></td><td>"
                            + "<a href='#' onclick='if (window.confirm(\"Are you sure you want to remove routing?\")) { location.href = \"/_admin/WorkBoxFramework/RecordsManagementAdmin.aspx?RemoveIndex=" + index + "\"; }'>remove</a></td></tr>\n\n";
                    index++;
                }
            }
            else
            {
                html += "<tr><td colspan='5'><i>No subject tag routings</i></td></tr>\n\n";
            }

            html += "<tr><td colspan='5'><a href='#' onclick='WorkBoxFramework_callDialog(\"/_admin/WorkBoxFramework/EditSubjectTagRouting.aspx\");'>Add another subject tag routing rule</a></td></tr>\n\n";
            SubjectTagsRecordsRoutings.Text = html;
        }
        protected void SaveButton_OnClick(object sender, EventArgs e)
        {
            WBFarm farm = WBFarm.Local;

            farm.PublicDocumentEmailAlertsTo = PublicDocumentEmailAlertsTo.Text;
            farm.PublicWebsiteTeamEmail      = PublicWebsiteTeamEmail.Text;

            farm.Update();

            SPUtility.Redirect("/applications.aspx", SPRedirectFlags.Static, Context);
        }
示例#5
0
        protected void OKButton_OnClick(object sender, EventArgs e)
        {
            WBFarm farm = WBFarm.Local;

            farm.UseMailToLinks = UseMailToLinks.Checked;
            farm.ChatacterLimitForMailToLinks = CharacterLimitForMailToLinks.Text.WBxToInt();

            farm.Update();

            SPUtility.Redirect("/applications.aspx", SPRedirectFlags.Static, Context);
        }
        protected void SaveButton_OnClick(object sender, EventArgs e)
        {
            WBFarm farm = WBFarm.Local;

            farm.InviteInvolvedDefaultEmailSubject = InvolvedSubject.Text;
            farm.InviteInvolvedDefaultEmailBody    = InvolvedBody.Text;
            farm.InviteVisitingDefaultEmailSubject = VisitingSubject.Text;
            farm.InviteVisitingDefaultEmailBody    = VisitingBody.Text;
            farm.InviteToTeamDefaultEmailSubject   = ToTeamSubject.Text;
            farm.InviteToTeamDefaultEmailBody      = ToTeamBody.Text;

            farm.Update();

            SPUtility.Redirect("/applications.aspx", SPRedirectFlags.Static, Context);
        }
        protected void saveButton_OnClick(object sender, EventArgs e)
        {
            WBSubjectTagRecordsRoutings newRouting = new WBSubjectTagRecordsRoutings(subjectTagsTaxonomy, SubjectTag.Text, PublicDocumentsLibrary.Text, ExtranetDocumentsLibrary.Text);

            int index;

            if (Int32.TryParse(RouteIndex.Value, out index))
            {
                routings[index] = newRouting;
            }
            else
            {
                routings.Add(newRouting);
            }

            // Now save the new routing information:
            farm.SubjectTagsRecordsRoutingsString = routings.ToString();
            farm.Update();

            CloseDialogAndRefresh();
        }
示例#8
0
        protected void DoInitialConfigStep_OnClick(object sender, EventArgs e)
        {
            // First save the values set within the form to the farm object:
            WBFarm farm = WBFarm.Local;

            farm.SystemAdminTeamSiteUrl = AdminTeamSiteURL.Text;
            farm.TimerJobsServerName    = TimerJobsServerName.Text.ToUpper();

            farm.TermStoreName      = TermStoreName.Text;
            farm.TermStoreGroupName = TermStoreGroupName.Text;

            farm.WorkBoxDocumentContentTypeName = DocumentContentTypeName.Text;
            farm.WorkBoxRecordContentTypeName   = RecordContentTypeName.Text;

            farm.Update();

            WBLogging.Config.Unexpected("farm.SystemAdminTeamSiteUrl = " + farm.SystemAdminTeamSiteUrl);

            // Then start the configuration steps:
            doNextConfigurationStep();

            // old code:
            // WBFarm.Local.InitialFarmSetup(SPContext.Current.Site, AdminTeamSiteURL.Text, TimerJobsServerName.Text.ToUpper());
        }