public void StartFlow() { string state = this.RequestData.Get <string>("state"); string id = this.RequestData.Get <string>("Id"); Leave pb = Leave.Find(id); pb.State = state; pb.Save(); string code = this.RequestData.Get <string>("FlowKey"); //启动流程 //表单路径,后面加上参数传入 string formUrl = "/DailyManager/FrmLeaveAppEdit.aspx?op=r&&id=" + id; Aim.WorkFlow.WorkFlow.StartWorkFlow(id, formUrl, "请假申请(" + pb.LeaveUser + ")", code, this.UserInfo.UserID, this.UserInfo.Name); }
string type = String.Empty; // 对象类型 #endregion #region ASP.NET 事件 protected void Page_Load(object sender, EventArgs e) { string db = ConfigurationManager.AppSettings["ExamineDB"]; op = RequestData.Get <string>("op"); id = RequestData.Get <string>("id"); type = RequestData.Get <string>("type"); Leave ent = null; switch (this.RequestAction) { case RequestActionEnum.Update: ent = this.GetMergedData <Leave>(); ent.DoUpdate(); this.SetMessage("修改成功!"); break; case RequestActionEnum.Insert: case RequestActionEnum.Create: ent = this.GetPostedData <Leave>(); //自动生成流水号 ent.Number = DataHelper.QueryValue("select " + db + ".dbo.fun_getLeaveNumber()") + ""; ent.DoCreate(); this.SetMessage("新建成功!"); break; case RequestActionEnum.Delete: ent = this.GetTargetData <Leave>(); ent.DoDelete(); this.SetMessage("删除成功!"); return; default: if (RequestActionString == "save") { DoSave(); } else if (RequestActionString == "submitfinish") { Leave pc = Leave.Find(this.RequestData.Get <string>("id")); pc.State = "End"; pc.AppState = this.RequestData.Get <string>("ApprovalState"); pc.Save(); } break; } if (op != "c" && op != "cs") { if (!String.IsNullOrEmpty(id)) { ent = Leave.Find(id); } this.SetFormData(ent); this.PageState.Add("State", ent.State); } if (op == "c") { PageState.Add("ReleDepartment", DataHelper.QueryValue("select " + db + ".dbo.get_DeptName('" + UserInfo.UserID + "')")); } this.PageState.Add("FlowEnum", SysEnumeration.GetEnumDictList("WorkFlow.Simple")); PageState.Add("LeaveType", SysEnumeration.GetEnumDict("LeaveType")); }