zoukankan      html  css  js  c++  java
  • 单档——状态码显示设置,状态码更改链表更新

    范例(cxmt631),状态码显示设置(某状态下不显示某些状态码,即有些状态是不可直接更改的为另一种状态的),更改完状态码后同步更新数据表的指定字段;

    1)在cxmt631_statechange 中的statechange.before_menu 下,置入程序:

        
          #add-point:menu前 name="statechange.before_menu"
     
          CASE g_xmabuc_m.xmabucstus
               WHEN "X"
                     CALL cl_set_act_visible("report,factory,Load,pass,valid",FALSE)
               WHEN "01"
                     CALL cl_set_act_visible("Loading,pass",FALSE)
               WHEN "02"
                     CALL cl_set_act_visible("pass",FALSE)
               WHEN "03"
                    CALL cl_set_act_visible("report",FALSE)
               WHEN "04"
                  CALL cl_set_act_visible("factory,report",FALSE)
          END CASE
          #end add-point
          
            

    以上的report、factory等,为功能编号,具体见azzi850;

    01、02、03、04、X,为状态码编码;

    2)每一个状态更改时都同时更新数据表的相关字段,同样是在cxmt631_statechange 下:

    ON ACTION invalid
             IF cl_auth_chk_act("invalid") THEN
                LET lc_state = "X"
                #add-point:action控制 name="statechange.invalid"
                update xmabuc_t set xmabuc004 = lc_state where xmabucdocno = g_xmabuc_m.xmabucdocno and xmabucent = g_enterprise
                if not cl_null(g_xmabuc_m.xmabuc009) then
                    update xmen_t set xmenua003 = lc_state where xmenent = g_enterprise and xmendocno = g_xmabuc_m.xmabuc009
                end if
                #end add-point
             END IF
             EXIT MENU
          ON ACTION report
             IF cl_auth_chk_act("report") THEN
                LET lc_state = "01"
                #add-point:action控制 name="statechange.report"
                update xmabuc_t set xmabuc004 = lc_state where xmabucdocno = g_xmabuc_m.xmabucdocno and xmabucent = g_enterprise
                if not cl_null(g_xmabuc_m.xmabuc009) then
                    update xmen_t set xmenua003 = lc_state where xmenent = g_enterprise and xmendocno = g_xmabuc_m.xmabuc009
                end if
                #end add-point
             END IF
             EXIT MENU
    
          ON ACTION factory
             IF cl_auth_chk_act("factory") THEN
                LET lc_state = "02"
                #add-point:action控制 name="statechange.factory"
                update xmabuc_t set xmabuc004 = lc_state where xmabucdocno = g_xmabuc_m.xmabucdocno and xmabucent = g_enterprise
                if not cl_null(g_xmabuc_m.xmabuc009) then
                    update xmen_t set xmenua003 = lc_state where xmenent = g_enterprise and xmendocno = g_xmabuc_m.xmabuc009
                end if
                #end add-point
             END IF
             EXIT MENU
    
          ON ACTION loading
             IF cl_auth_chk_act("loading") THEN
                LET lc_state = "03"
                #add-point:action控制 name="statechange.loading"
                update xmabuc_t set xmabuc004 = lc_state where xmabucdocno = g_xmabuc_m.xmabucdocno and xmabucent = g_enterprise
                if not cl_null(g_xmabuc_m.xmabuc009) then
                    update xmen_t set xmenua003 = lc_state where xmenent = g_enterprise and xmendocno = g_xmabuc_m.xmabuc009
                end if
                #end add-point
             END IF
             EXIT MENU
    
          ON ACTION pass
             IF cl_auth_chk_act("pass") THEN
                LET lc_state = "04"
                #add-point:action控制 name="statechange.pass"
                update xmabuc_t set xmabuc004 = lc_state where xmabucdocno = g_xmabuc_m.xmabucdocno and xmabucent = g_enterprise
                if not cl_null(g_xmabuc_m.xmabuc009) then
                    update xmen_t set xmenua003 = lc_state where xmenent = g_enterprise and xmendocno = g_xmabuc_m.xmabuc009
                end if
                #end add-point
             END IF
             EXIT MENU
    

      

  • 相关阅读:
    基于IPV6的数据包分析
    OSPFv3与OSPF的配置
    防火墙技术综合实验
    基于服务器的AAA配置实验
    基于服务器的AAA实验
    ipv6到ipv4隧道6to4(GNS3)
    Intellij IDEA(idea) 设置创建文件自动添加创建人和创建时间
    虎扑盖饭系列的数据爬虫和分析
    优酷评论爬虫
    MySQL聚族索引、辅助索引、回表和索引覆盖
  • 原文地址:https://www.cnblogs.com/xiaoli9627/p/6841139.html
Copyright © 2011-2022 走看看