zoukankan      html  css  js  c++  java
  • How to adding find,filter,remove filter on display method Form

    Adding Find\Filter functionality on Display method
    Override Context method of Form control which is using display method and provide code for filter. E.g I have done below for PhysicalInvent field of InventOnHandItem form.
    
    void context()
    {
        int selectedMenu;
        real test;
        formrun fr;
        Args ag;
        Itemname strtext;
        querybuilddataSource qb1;
        queryrun qr;
        query q;
        PopupMenu menu = new PopupMenu(element.hWnd());
        int a = menu.insertItem('Find');
        int b = menu.insertItem('Filter');
        int c = menu.insertItem('Remove Filter');
    
    
        selectedMenu = menu.draw();
    
        switch (selectedMenu)
        {
            case -1:
                break;
            case a:
                ag = new args('SysformSearch');
                fr = new formrun(ag);
                fr.run();
                fr.wait();
                strtext = fr.design().controlName('FindEdit').valueStr();
                if(strtext)
                {
                    q = inventSum_Ds.query();
                    qb1 =q.dataSourceTable(tablenum(InventSum));
                    QB1.addRange(FieldNum(InventSum,PhysicalInvent)).value(SySQuery::value(strtext));
                    INVENTSUM_DS.query(Q);
                    INVENTSUM_ds.executeQuery();
                }
                break;
            case b:
                InventSum_DS.filter(FieldNum(InventSum,PhysicalInvent),Sysquery::value(InventSum.PhysicalInvent()));
                break;
    
            case c :
                InventSum_DS.removeFilter();
                break;
            Default:
                break;
    
        }
    }
  • 相关阅读:
    开心网注册详解和邀请码发放
    3COM 905TX 配置
    SQL使用
    JDBC的使用
    kiko日记几个月以来工作总结2010 1124
    talk about the history of JAZZ
    这几个月的工作任务
    工作间期的不足
    转: mac使用nvm管理多个版本node
    负载均衡与ssl证书
  • 原文地址:https://www.cnblogs.com/Fandyx/p/2887140.html
Copyright © 2011-2022 走看看