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
    

      

  • 相关阅读:
    深度学习(dropout)
    centos 常见软件安装
    最近读的书 与论文
    如何理解反向传播 Backpropagation 梯度下降算法要点
    ubuntu 15 安装cuda,开启GPU加速
    快速排序算法
    Linux网络中接收 "二进制" 流的那些事 --- 就recv的返回值和strlen库函数进行对话
    linux源码升级编译内核
    C/C++中慎用宏(#define)
    Qt之hello world
  • 原文地址:https://www.cnblogs.com/xiaoli9627/p/6841139.html
Copyright © 2011-2022 走看看