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); } }
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(); } }