Пример #1
0
        private void ProcessApproval(SPWeb web, string taskID, string sourceUrl)
        {
            RegistrationApprovalPresenter presenter = new RegistrationApprovalPresenter(this);
            bool success = presenter.ProcessApproval(web, taskID, Status.SelectedValue);

            if (success)
            {
                SPUtility.Redirect(sourceUrl, SPRedirectFlags.DoNotEncodeUrl, HttpContext.Current);
            }
        }
Пример #2
0
        private void RenderView(SPWeb web, string taskID, string sourceUrl)
        {
            RegistrationApprovalPresenter presenter = new RegistrationApprovalPresenter(this);
            bool success = presenter.RenderRegApprovalView(web, taskID);

            ContentMessage.Text = ContentMessage.Text.Replace("\r\n", "<br />");

            if (success)
            {
                ViewState[taskIdViewStateKey] = taskID;
                if (String.IsNullOrEmpty(sourceUrl))
                {
                    sourceUrl = String.Format("{0}/{1}", web.Url, managerDashboardPageFileName);
                }
                ViewState[sourceUrlViewStateKey] = sourceUrl;

                Status.DataBind();
            }
        }