protected void Page_Load(object sender, EventArgs e) { UcForm1.DFFormName = DFPub.UrlDecode(this.Request[DFPub.DF_FORMNAME]); try { var user = Util.GetCurrentUser(); } catch { this.Response.Redirect("Login.aspx?returnUrl=" + Server.UrlEncode(this.Request.Url.ToString())); } }
public override int Update(FormM form, DFDictionary entity, ref string message) { CheckInput(form, entity); var InstanceStepExecutorId = entity["InstanceStepExecutorId"]; var actionName = DFPub.UrlDecode(entity["actionName"]); var user = Util.GetCurrentUser(); var ExecuteComment = entity["ExecuteComment"]; var ExecuteResult = actionName; var list = base.GetGridClientData <VM_WF_M_USER>(entity); new StateEngineHelper().TransferOrAdditional(InstanceStepExecutorId, list, ExecuteComment, ExecuteResult, user.UserName); base.WriteScript(string.Format("alert('{0}成功,本窗口将自动关闭!');window.top.close();".GetRes(), actionName), ref message); return(DFPub.EXECUTE_SUCCESS); }
public override int Update(FormM form, DFDictionary entity, ref string message) { var InstanceStepExecutorId = entity["InstanceStepExecutorId"]; var actionName = DFPub.UrlDecode(entity["actionName"]); var user = Util.GetCurrentUser(); var ExecuteComment = entity["ExecuteComment"]; var ExecuteResult = actionName; var ToStepId = entity["NextStep"]; var CurrentUserId = user.UserId; var CurrentUserName = user.UserName; new StateEngineHelper().Goto(InstanceStepExecutorId, ExecuteComment, ExecuteResult, ToStepId, CurrentUserId, CurrentUserName); base.WriteScript(string.Format("alert('{0}成功,本窗口将自动关闭!');window.top.close();", actionName), ref message); return(DFPub.EXECUTE_SUCCESS); }
public override void SetAccess(FormM form, DFDictionary entity) { var InstanceStepExecutorId = entity["InstanceStepExecutorId"]; var actionName = DFPub.UrlDecode(entity["actionName"]); var action = entity["action"]; if (string.IsNullOrWhiteSpace(InstanceStepExecutorId)) { throw new WFException("缺少参数 InstanceStepExecutorId"); } //form.GetControlM("NextStep").Text = actionName; var InstanceStepExecutor = InstanceStepExecutorDAO.Get(InstanceStepExecutorId); if (new StateEngineHelper().IsHideNextStep(InstanceStepExecutor.InstanceStepId)) { // 加签不影响流程走向,所以要隐藏下一步 form.GetControlM("NextStep").Visible = false; } else { if (action == "btnSubmit" || action == "btnApprove") { var list = new StateEngineHelper().GetSubmitOrApproveSteps(InstanceStepExecutorId); base.SetSelectDataSource(form, "NextStep", list.Select(a => new DFSelectItem() { Text = a.text, Value = a.value }).ToList()); } else if (action == "btnRollback" || action == "btnReject") { var list = new StateEngineHelper().GetRejectOrRollbackSteps(InstanceStepExecutorId); base.SetSelectDataSource(form, "NextStep", list.Select(a => new DFSelectItem() { Text = a.text, Value = a.value }).ToList()); } } base.SetAccess(form, entity); }
protected void Page_Load(object sender, EventArgs e) { UcForm1.DFFormName = DFPub.UrlDecode(this.Request[DFPub.DF_FORMNAME]); }