|
东方亮
发表于 2022-6-22 08:27:09
public class D125305Swvrzfc9pubkt1oo42uk01roy1: H3.SmartForm.SmartFormController
{
public D125305Swvrzfc9pubkt1oo42uk01roy1(H3.SmartForm.SmartFormRequest request): base(request)
{
}
protected override void OnLoad(H3.SmartForm.LoadSmartFormResponse response)
{
base.OnLoad(response);
}
protected override void OnSubmit(string actionName, H3.SmartForm.SmartFormPostValue postValue, H3.SmartForm.SubmitSmartFormResponse response)
{
base.OnSubmit(actionName, postValue, response);
}
// 流程结束自动添加【对账序号】
protected override void OnWorkflowInstanceStateChanged(H3.Workflow.Instance.WorkflowInstanceState oldState, H3.Workflow.Instance.WorkflowInstanceState newState)
{
if(oldState == H3.Workflow.Instance.WorkflowInstanceState.Running && newState == H3.Workflow.Instance.WorkflowInstanceState.Finished)
{
H3.DataModel.BizObject biz = H3.DataModel.BizObject.Load(this.Request.UserContext.UserId, this.Engine, "D125305Swvrzfc9pubkt1oo42uk01roy1", this.Request.BizObjectId, false);
H3.DataModel.BizObject[] childBiz = (H3.DataModel.BizObject[]) biz["D125305Fytcv4wqftc9d0gjmoft4xl2h3"];
if(childBiz != null)
{
int index = 0;
List < H3.DataModel.BizObject > newChildBoList = new List<H3.DataModel.BizObject>();
foreach(H3.DataModel.BizObject item in childBiz)
{
item["F0000068"] = index + 1;
index++;
newChildBoList.Add(item);
}
biz["D125305Fytcv4wqftc9d0gjmoft4xl2h3"] = newChildBoList.ToArray();
}
biz.Update();
}
}
}
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|