一、按钮点击前事务处理<BeforeEventProcess>
public override void BeforeEventProcess(IPart part, string eventName, object sender, EventArgs args, out bool executeDefault)
{
base.BeforeEventProcess(part, eventName, sender, args, out executeDefault);
UFWebButton4ToolbarAdapter ToolbarAdapter = sender as UFWebButton4ToolbarAdapter;//
if (ToolbarAdapter != null)
{
switch (Adapter.Action)
{
case "DeleteClick":
//此处编辑删除前校验逻辑
break;
case "SubmitClick":
//此处编辑提交前校验逻辑
break;
case "ApproveClick":
//此处编辑审核前校验逻辑
break;
case "UndoApprove":
//此处编辑弃审前校验逻辑
break;
default:
break;
}
}
}
按钮点击前事件< UFWebButton4ToolbarAdapter>
二、按钮点击后事务处理<AfterEventProcess>
public override void AfterEventProcess(IPart Part, string eventName, object sender, EventArgs args)
{
base.AfterEventProcess(Part, eventName, sender, args);
UFWebButtonAdapter ButtonAdapter = sender as UFWebButtonAdapter;//底部菜单
if (ButtonAdapter != null)
{
switch (Adapter.Action)
{
case "MenuIssueNotice":
//此处编辑确认发料后校验逻辑
break;
default:
break;
}
}
}
按钮点击后事件 UFWebButtonAdapter
三、按钮点击后事务处理<AfterEventProcess>
public override void AfterEventProcess(IPart Part, string eventName, object sender, EventArgs args)
{
base.AfterEventProcess(Part, eventName, sender, args);
IUFMenu MenuAdapter= sender as IUFMenu;//下拉菜单按钮
if MenuAdapter= != null)
{
switch (MenuAdapter.Action)
{
case "CancelClick":
//此处编辑生产领料退料按钮点击后校验逻辑
break;
default:
break;
}
}
}
按钮点击后事件 IUFMenu