coofm0002.4fdcoofm0002.4gl
DATABASE ds GLOBALS "../../config/top.global" DEFINE g_gen DYNAMIC ARRAY OF RECORD --单身记录集 f2b001 LIKE type_file.num5, f2b002 LIKE type_file.chr100, f2b003 LIKE type_file.chr100, f2b004 LIKE type_file.chr100, f2b005 LIKE type_file.chr100, f2b006 LIKE type_file.num5, f2b007 LIKE type_file.chr100, f2b008 LIKE type_file.num5, f2b009 LIKE type_file.dat END RECORD DEFINE g_rec_b LIKE type_file.num10 DEFINE g_curs_index LIKE type_file.num10 DEFINE g_row_count LIKE type_file.num10 DEFINE gen_ac LIKE type_file.num10 DEFINE g_statebar STRING DEFINE gen_wc STRING MAIN DEFINE p_row,p_col LIKE type_file.num5 OPTIONS #改變一些系統預設值 FORM LINE FIRST + 2, #畫面開始的位置 MESSAGE LINE LAST, #訊息顯示的位置 PROMPT LINE LAST, #提示訊息的位置 INPUT NO WRAP #輸入的方式: 不打轉 DEFER INTERRUPT #擷取中斷鍵, 由程式處理 IF (NOT cl_user()) THEN EXIT PROGRAM END IF WHENEVER ERROR CALL cl_err_msg_log IF (NOT cl_setup("COO")) THEN EXIT PROGRAM END IF CALL cl_used(g_prog,g_time,1) #計算使用時間 (進入時間) #No:MOD-580088 HCN 20050818 #No.FUN-6A0081 RETURNING g_time #No.FUN-6A0081 OPEN WINDOW f01 AT p_row,p_col WITH FORM "coo/42f/coofm0002" ATTRIBUTE (STYLE = g_win_style CLIPPED) CALL cl_ui_init() LET g_action_choice = "" CALL f02_menu() --CLOSE WINDOW f01 END MAIN FUNCTION f02_menu() WHILE TRUE CALL f02_bp("G") CASE g_action_choice WHEN "insert" IF cl_chk_act_auth() THEN --CALL f02_a() END IF WHEN "query" IF cl_chk_act_auth() THEN CALL f02_q() END IF WHEN "delete" IF cl_chk_act_auth() THEN --CALL f02_r() END IF WHEN "modify" IF cl_chk_act_auth() THEN --CALL f02_u() END IF WHEN "detail" IF cl_chk_act_auth() THEN --CALL f02_b(' ') ELSE LET g_action_choice = NULL END IF WHEN "help" CALL cl_show_help() WHEN "exit" EXIT WHILE WHEN "controlg" CALL cl_cmdask() END CASE END WHILE END FUNCTION FUNCTION f02_bp(p_ud) DEFINE p_ud STRING IF p_ud <> "G" OR g_action_choice = "detail" THEN RETURN END IF LET g_action_choice = " " CALL cl_set_act_visible("accept,cancel", FALSE) DISPLAY ARRAY g_gen TO s_sfa.* ATTRIBUTE(COUNT=g_rec_b,UNBUFFERED) BEFORE DISPLAY CALL cl_navigator_setting(g_curs_index, g_row_count) BEFORE ROW LET gen_ac = ARR_CURR() #获取当前光标行NO. CALL cl_show_fld_cont() #根据p_per设置栏位格式 MESSAGE SFMT(g_statebar,gen_ac,g_row_count) ON ACTION query LET g_action_choice="query" EXIT DISPLAY ON ACTION detail LET g_action_choice="detail" LET gen_ac = 1 EXIT DISPLAY ON ACTION exit LET g_action_choice="exit" EXIT DISPLAY AFTER DISPLAY CONTINUE DISPLAY END DISPLAY CALL cl_set_act_visible("accept,cancel", TRUE) END FUNCTION FUNCTION f02_q() CALL f02_cs() END FUNCTION FUNCTION f02_cs() CLEAR FORM CALL g_gen.clear() --CONSTRUCT BY NAME gen_wc ON f2001,f2002,f2003,f2004,f2005,f2006,f2007,f2008,f2009,f2010,f2011,f2012 CONSTRUCT gen_wc ON f2001,f2002,f2003,f2004,f2005,f2006,f2007,f2008,f2009,f2010,f2011,f2012 FROM f2001,f2002,f2003,f2004,f2005,f2006,f2007,f2008,f2009,f2010,f2011,f2012 BEFORE CONSTRUCT #预设查询条件 CALL cl_qbe_init() ON ACTION help CALL cl_show_help() END CONSTRUCT DISPLAY "f02_cs" END FUNCTION |
|
沙发#
发布于:2016-12-10 12:05
程式进入_bp后直接退出了,返回导致直接退出程式,看看你的bp函数里的display 的变量和4fd单身的变量是否一致
|
|
|