/// <summary> /// 撤回任务事件代码 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void RevokeTaskButtonEvent(object sender, EventArgs e) { var wfruntime = new WorkFlowRuntime { UserId = userId, MainWorktaskInsId = WorkTaskInsId, CurrentUser = this.UserInfo }; var msg = wfruntime.TaskRevoke(); if (msg == "1") { this.DialogResult = DialogResult.OK; this.Close(); } else { MessageBoxHelper.ShowWarningMsg("对方已认领的任务不能撤回!"); } }
/// <summary> /// 撤回任务 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void RevokeTaskButtonEvent(object sender, EventArgs e) { var wfruntime = new WorkFlowRuntime { UserId = this.UserInfo.Id, MainWorktaskInsId = workTaskInsId, CurrentUser = this.UserInfo }; string msg = wfruntime.TaskRevoke(); if (msg == "1") { Response.Redirect("OperTips.aspx?worktaskInsId=" + workTaskInsId); } else { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "", "alert('您好,对方已认领的任务不能撤回!');", true); } }