public void StartFlow() { string state = this.RequestData.Get <string>("state"); string id = this.RequestData.Get <string>("Id"); OtherCost pb = OtherCost.Find(id); pb.State = state; pb.Save(); string code = this.RequestData.Get <string>("FlowKey"); //启动流程 //表单路径,后面加上参数传入 string formUrl = "/DailyManager/FrmOtherAppEdit.aspx?op=r&id=" + id; Guid guid = Aim.WorkFlow.WorkFlow.StartWorkFlow(id, formUrl, "其他费用报销申请(" + pb.LeaveUser + ")", code, this.UserInfo.UserID, this.UserInfo.Name); this.PageState.Add("FlowId", guid.ToString()); }
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"); OtherCost ent = null; switch (this.RequestAction) { case RequestActionEnum.Update: ent = this.GetMergedData <OtherCost>(); ent.DoUpdate(); this.SetMessage("修改成功!"); break; case RequestActionEnum.Insert: case RequestActionEnum.Create: ent = this.GetPostedData <OtherCost>(); //自动生成流水号 ent.Number = DataHelper.QueryValue("select " + db + ".dbo.fun_getOtherCostsNumber()") + ""; ent.DoCreate(); this.SetMessage("新建成功!"); break; case RequestActionEnum.Delete: ent = this.GetTargetData <OtherCost>(); ent.DoDelete(); this.SetMessage("删除成功!"); return; default: if (RequestActionString == "save") { DoSave(); } else if (RequestActionString == "submitfinish") { OtherCost pc = OtherCost.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 = OtherCost.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("OtherCost", SysEnumeration.GetEnumDict("OtherCost")); }