• UI单据按钮点击事件校验


    一、按钮点击前事务处理<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
  • 相关阅读:
    RSA
    antd 规则检查
    antd 使用总结问题
    react context prop-types
    【CSS/JS】如何实现单行/多行文本溢出的省略(...)
    react prop-types
    js 监听URL的hash变化
    Spark 读取Hadoop集群文件
    HIVE 常见函数
    Linux ANSI转 UTF8
  • 原文地址:https://www.cnblogs.com/youmin3205/p/11507415.html
Copyright © 2020-2023  润新知