protected void Page_Load(object sender, EventArgs e) { StockCheck ent = null; switch (RequestActionString) { case "delete": ent = this.GetTargetData <StockCheck>(); ent.DoDelete(); break; case "batchdelete": DoBatchDelete(); break; case "submit": StartFlow(); break; case "AutoExecuteFlow": Task task = Task.FindAllByProperties(Task.Prop_WorkflowInstanceID, this.RequestData.Get <string>("FlowId"))[0]; //自动执行,关键代码 Aim.WorkFlow.WorkFlow.AutoExecute(task); this.PageState.Add("TaskId", task.ID); break; default: DoSelect(); break; } }
string type = String.Empty; // 对象类型 protected void Page_Load(object sender, EventArgs e) { op = RequestData.Get <string>("op"); id = RequestData.Get <string>("id"); type = RequestData.Get <string>("type"); StockCheck scEnt = null; IList <String> strList = RequestData.GetList <string>("data"); switch (RequestActionString) { case "update": scEnt = this.GetMergedData <StockCheck>(); scEnt.DoUpdate(); ProcessDetail(strList, scEnt); break; case "create": scEnt = this.GetPostedData <StockCheck>(); scEnt.State = "未结束"; scEnt.DoCreate(); ProcessDetail(strList, scEnt); break; case "delete": scEnt = this.GetTargetData <StockCheck>(); scEnt.DoDelete(); return; default: if (op != "c" && op != "cs") { if (!String.IsNullOrEmpty(id)) { scEnt = StockCheck.Find(id); SetFormData(scEnt); IList <StockCheckDetail> scdEnts = StockCheckDetail.FindAllByProperty("StockCheckId", id); PageState.Add("DataList", scdEnts); } } else { PageState.Add("StockCheckNo", DataHelper.QueryValue("select SHHG_AimExamine.dbo.fun_getStockCheckNo()")); this.PageState.Add("FlowEnum", SysEnumeration.GetEnumDictList("WorkFlow.Simple")); if (RequestActionString == "submitfinish") { StockCheck pc = StockCheck.Find(this.RequestData.Get <string>("id")); pc.State = "End"; // pc.InventoryState = this.RequestData.Get<string>("ApprovalState"); pc.Save(); } } break; } }
protected void Page_Load(object sender, EventArgs e) { StockCheck ent = null; switch (RequestActionString) { case "delete": ent = this.GetTargetData <StockCheck>(); ent.DoDelete(); break; case "batchdelete": DoBatchDelete(); break; case "SubmitExamine": string id = this.RequestData.Get <string>("Id"); ent = StockCheck.Find(id); ent.WorkFlowState = RequestData.Get <string>("state"); ent.ExamineResult = RequestData.Get <string>("ApprovalState"); ent.DoUpdate(); StartFlow(id); break; case "AutoExecuteFlow": Task task = Task.FindAllByProperties(Task.Prop_WorkflowInstanceID, this.RequestData.Get <string>("FlowId"))[0]; //自动执行,关键代码 Aim.WorkFlow.WorkFlow.AutoExecute(task); this.PageState.Add("TaskId", task.ID); break; default: if (RequestData.Get <string>("optype") == "getChildData") { string stockCheckId = RequestData.Get <string>("StockCheckId"); IList <StockCheckDetail> scdEnt = StockCheckDetail.FindAllByProperty("StockCheckId", stockCheckId); PageState.Add("DetailList", scdEnt); } else { DoSelect(); } break; } }