w_system_plan_development.srw 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073
  1. $PBExportHeader$w_system_plan_development.srw
  2. forward
  3. global type w_system_plan_development from w_publ_base
  4. end type
  5. type tab_1 from tab within w_system_plan_development
  6. end type
  7. type tabpage_1 from userobject within tab_1
  8. end type
  9. type tv_1 from treeview within tabpage_1
  10. end type
  11. type tabpage_1 from userobject within tab_1
  12. tv_1 tv_1
  13. end type
  14. type tabpage_3 from userobject within tab_1
  15. end type
  16. type dw_1 from u_dw_rbtnfilter within tabpage_3
  17. end type
  18. type tabpage_3 from userobject within tab_1
  19. dw_1 dw_1
  20. end type
  21. type tabpage_2 from userobject within tab_1
  22. end type
  23. type dw_3 from u_dw_uc_rbtnfilter within tabpage_2
  24. end type
  25. type dw_2 from u_dw_rbtnfilter within tabpage_2
  26. end type
  27. type dw_column from u_dw_rbtnfilter within tabpage_2
  28. end type
  29. type dw_windw from u_dw_rbtnfilter within tabpage_2
  30. end type
  31. type tv_2 from treeview within tabpage_2
  32. end type
  33. type tabpage_2 from userobject within tab_1
  34. dw_3 dw_3
  35. dw_2 dw_2
  36. dw_column dw_column
  37. dw_windw dw_windw
  38. tv_2 tv_2
  39. end type
  40. type tab_1 from tab within w_system_plan_development
  41. tabpage_1 tabpage_1
  42. tabpage_3 tabpage_3
  43. tabpage_2 tabpage_2
  44. end type
  45. type cb_edit from uo_imflatbutton within w_system_plan_development
  46. end type
  47. type cb_save from uo_imflatbutton within w_system_plan_development
  48. end type
  49. type cb_select from uo_imflatbutton within w_system_plan_development
  50. end type
  51. type st_1 from statictext within w_system_plan_development
  52. end type
  53. type ddlb_version from dropdownlistbox within w_system_plan_development
  54. end type
  55. type cb_1 from uo_imflatbutton within w_system_plan_development
  56. end type
  57. type cb_out from uo_imflatbutton within w_system_plan_development
  58. end type
  59. type cb_in from uo_imflatbutton within w_system_plan_development
  60. end type
  61. type cb_retrieve from uo_imflatbutton within w_system_plan_development
  62. end type
  63. type ln_bar from line within w_system_plan_development
  64. end type
  65. type ln_bar2 from line within w_system_plan_development
  66. end type
  67. type r_bar from rectangle within w_system_plan_development
  68. end type
  69. type ln_1 from line within w_system_plan_development
  70. end type
  71. type ln_2 from line within w_system_plan_development
  72. end type
  73. end forward
  74. global type w_system_plan_development from w_publ_base
  75. integer width = 3611
  76. integer height = 2380
  77. string title = "系统解决方案-开发模式"
  78. boolean maxbox = true
  79. windowstate windowstate = maximized!
  80. tab_1 tab_1
  81. cb_edit cb_edit
  82. cb_save cb_save
  83. cb_select cb_select
  84. st_1 st_1
  85. ddlb_version ddlb_version
  86. cb_1 cb_1
  87. cb_out cb_out
  88. cb_in cb_in
  89. cb_retrieve cb_retrieve
  90. ln_bar ln_bar
  91. ln_bar2 ln_bar2
  92. r_bar r_bar
  93. ln_1 ln_1
  94. ln_2 ln_2
  95. end type
  96. global w_system_plan_development w_system_plan_development
  97. type prototypes
  98. subroutine keybd_event(uint bVk,uint bScan,long dwFlags,long dwExtraInfo ) library 'user32.dll'
  99. Function long GetCursor () Library "user32.dll" Alias for "GetCursor"
  100. Function long LoadCursor (long hInstance, long lpCursorName) Library "user32.dll" Alias for "LoadCursorW"
  101. end prototypes
  102. type variables
  103. treeview tv_func, tv_2
  104. datawindow dw_sys_option
  105. Long deep = 0
  106. Long il_handle_arr[], il_state_arr[]
  107. Long il_max = 0
  108. //datastore ds_func_tree
  109. long il_dw_mainid
  110. //tab_1.tabpage_2.dw_windw.SetTransObject(sqlca)
  111. //tab_1.tabpage_2.dw_column.SetTransObject(sqlca)
  112. string is_AllowVersion
  113. string is_dwname
  114. int ii_version_int
  115. end variables
  116. forward prototypes
  117. public function integer pf_treegrowth (long arg_handl, long arg_funcid, integer arg_lp)
  118. public function integer wf_build_functree ()
  119. public subroutine wf_refresh_option ()
  120. public subroutine wf_sethandlestate (long arg_handle, long arg_state)
  121. public function long wf_gethandlestate (long arg_handle)
  122. public subroutine wf_set_tvchild (long arg_handl)
  123. public subroutine wf_set_tvnext (long arg_handl)
  124. public subroutine wf_set_tvparent (long arg_handl)
  125. public function integer wf_face ()
  126. public subroutine wf_refresh_tvnext (long arg_handl, string arg_rightstr)
  127. public subroutine wf_refresh_tvchild (long arg_handl, string arg_rightstr)
  128. public subroutine wf_setvalue_option (string arg_str)
  129. public subroutine wf_retrieve_value ()
  130. public subroutine wf_getright_tvnext (long arg_handl, ref string arg_rightstr)
  131. public subroutine wf_getright_tvchild (long arg_handl, ref string arg_rightstr)
  132. public function string wf_getright ()
  133. public function string wf_getoption ()
  134. public function integer wf_build_functree2 ()
  135. public function integer pf_treegrowth2 (long arg_handl, long arg_funcid, integer arg_lp)
  136. public subroutine wf_check_modify (integer arg_winflag, integer arg_colflag)
  137. public subroutine wf_retrieve_col (long currentrow)
  138. public subroutine wf_set_version ()
  139. public subroutine wf_retrieve_allowversion (long currentrow)
  140. public subroutine wf_set_allowversion ()
  141. public subroutine wf_retrieve_dw_obj (long currentrow)
  142. public subroutine wf_save_dw_obj ()
  143. end prototypes
  144. public function integer pf_treegrowth (long arg_handl, long arg_funcid, integer arg_lp);//====================================================================
  145. // function: pf_treegrowth()
  146. //--------------------------------------------------------------------
  147. // description:
  148. //--------------------------------------------------------------------
  149. // arguments:
  150. // value long arg_handl
  151. // value long arg_funcid
  152. // value integer arg_lp
  153. //--------------------------------------------------------------------
  154. // returns: integer
  155. //--------------------------------------------------------------------
  156. // author: lhd date: 2013.06.16
  157. //--------------------------------------------------------------------
  158. // modify history:
  159. //
  160. //====================================================================
  161. Int rslt = 1
  162. s_sys_func ls_s_func[]
  163. Long count = 0,ls_i
  164. Long handl
  165. treeviewitem tvi
  166. IF IsNull(arg_funcid) THEN RETURN 0
  167. deep++
  168. IF deep > 100000 THEN //防止死递归
  169. RETURN 0
  170. END IF
  171. String ls_filter
  172. IF sys_if_network = 1 THEN
  173. ls_filter = 'parentid='+String(arg_funcid)+ ' and worktype <> 1 '
  174. ELSE
  175. ls_filter = 'parentid='+String(arg_funcid)+ ' and worktype <> 2 '
  176. END IF
  177. IF sys_version_type = 0 THEN
  178. ls_filter = ls_filter + 'and ( Versiontype = 0 or Versiontype = -1 )'
  179. ELSEIF sys_version_type = 1 THEN
  180. ls_filter = ls_filter + 'and ( Versiontype = 1 or Versiontype = -1 )'
  181. ELSEIF sys_version_type = 2 THEN
  182. ls_filter = ls_filter + 'and ( Versiontype = 0 or Versiontype = -1 or Versiontype = 2 )'
  183. END IF
  184. ls_filter += " and if_use <> 0 and functype <> 2 "
  185. sys_ds_maininfo.SetFilter(ls_filter)
  186. sys_ds_maininfo.Filter()
  187. FOR ls_i = 1 To sys_ds_maininfo.RowCount( )
  188. IF sys_ds_maininfo.Object.functype[ls_i] = 9 And &
  189. (sys_ds_maininfo.Object.funcid[ls_i] <> 263 And sys_ds_maininfo.Object.funcid[ls_i] <> 1573) THEN CONTINUE
  190. count++
  191. ls_s_func[count].funcid = sys_ds_maininfo.Object.funcid[ls_i]
  192. ls_s_func[count].treename = sys_ds_maininfo.Object.treename[ls_i]
  193. ls_s_func[count].MenuName = sys_ds_maininfo.Object.MenuName[ls_i]
  194. ls_s_func[count].parentid = sys_ds_maininfo.Object.parentid[ls_i]
  195. ls_s_func[count].sortflag = sys_ds_maininfo.Object.sortflag[ls_i]
  196. ls_s_func[count].functype = sys_ds_maininfo.Object.functype[ls_i]
  197. ls_s_func[count].mainid = sys_ds_maininfo.Object.mainid[ls_i]
  198. ls_s_func[count].if_use = sys_ds_maininfo.Object.if_use[ls_i]
  199. ls_s_func[count].versiontype = sys_ds_maininfo.Object.versiontype[ls_i]
  200. ls_s_func[count].worktype = sys_ds_maininfo.Object.worktype[ls_i]
  201. NEXT
  202. FOR ls_i = 1 To count
  203. IF ls_s_func[ls_i].functype = 0 THEN
  204. arg_lp = 2
  205. ELSEIF ls_s_func[ls_i].functype = 8 THEN
  206. arg_lp = 3
  207. ELSEIF ls_s_func[ls_i].functype = 2 THEN //嵌入式报表模块
  208. arg_lp = 10
  209. ELSEIF ls_s_func[ls_i].functype = 9 THEN
  210. arg_lp = 4
  211. END IF
  212. handl = tv_func.InsertItemLast(arg_handl,ls_s_func[ls_i].treename,arg_lp) //生成树
  213. // tv_func.ExpandItem(arg_handl)
  214. tv_func.GetItem(handl,tvi)
  215. tvi.StatePictureIndex = 2
  216. tvi.Data = ls_s_func[ls_i].funcid
  217. tv_func.SetItem(handl,tvi)
  218. pf_treegrowth(handl,ls_s_func[ls_i].funcid,arg_lp+1) //下级生成树
  219. NEXT
  220. RETURN rslt
  221. end function
  222. public function integer wf_build_functree ();//====================================================================
  223. // Function: wf_build_functree()
  224. //--------------------------------------------------------------------
  225. // Description:
  226. //--------------------------------------------------------------------
  227. // Arguments:(None)
  228. //--------------------------------------------------------------------
  229. // Returns: integer
  230. //--------------------------------------------------------------------
  231. // Author: lhd Date: 2013.06.14
  232. //--------------------------------------------------------------------
  233. // Modify History:
  234. //
  235. //====================================================================
  236. Long hand
  237. deep = 1
  238. Long tvi_hdl = 0
  239. DO UNTIL tv_func.FindItem(roottreeitem!, 0) = -1
  240. tv_func.DeleteItem(tvi_hdl)
  241. LOOP
  242. hand = tv_func.InsertItemLast(0,sys_message_title,1)
  243. pf_treegrowth(hand,0,2)
  244. //tv_func.ExpandItem(hand)
  245. tv_func.ExpandAll(hand)
  246. tv_func.SelectItem(hand)
  247. sys_ds_maininfo.SetFilter("")
  248. sys_ds_maininfo.Filter()
  249. RETURN 1
  250. end function
  251. public subroutine wf_refresh_option ();Long i
  252. Long ll_row
  253. String ls_kind
  254. String ls_value,arg_msg
  255. dw_sys_option.SetRedraw(FALSE)
  256. dw_sys_option.Reset()
  257. FOR i = 1 TO UpperBound(s_sys_opt)
  258. IF s_sys_opt[i].optionname = '' THEN CONTINUE
  259. IF s_sys_opt[i].module = '' THEN CONTINUE
  260. ll_row = dw_sys_option.InsertRow(0)
  261. dw_sys_option.Object.module[ll_row] = s_sys_opt[i].module
  262. dw_sys_option.Object.optionid[ll_row] = s_sys_opt[i].optionid
  263. dw_sys_option.Object.optionname[ll_row] = s_sys_opt[i].optionname
  264. dw_sys_option.Object.itype[ll_row] = s_sys_opt[i].itype
  265. // dw_sys_option.Object.Kindid[ll_row] = s_sys_opt[i].Kind
  266. // dw_sys_option.Object.printid[ll_row] = s_sys_opt[i].printid
  267. // IF s_sys_opt[i].Kind = 0 THEN
  268. ls_kind = '流程类'
  269. // ELSEIF s_sys_opt[i].Kind = 1 THEN
  270. // ls_kind = '参数类'
  271. // ELSEIF s_sys_opt[i].Kind = 2 THEN
  272. // ls_kind = '限制类'
  273. // ELSEIF s_sys_opt[i].Kind = 3 THEN
  274. // ls_kind = '界面类'
  275. // END IF
  276. // dw_sys_option.Object.Kind[ll_row] = ls_kind
  277. dw_sys_option.Object.module_int[ll_row] = s_sys_opt[i].module_int
  278. dw_sys_option.Object.dscrp[ll_row] = s_sys_opt[i].dscrp
  279. NEXT
  280. dw_sys_option.SetSort('module_int asc, kindid asc ,printid asc')
  281. dw_sys_option.Sort()
  282. dw_sys_option.SetRedraw(TRUE)
  283. end subroutine
  284. public subroutine wf_sethandlestate (long arg_handle, long arg_state);long i
  285. for i = 1 to il_max
  286. if il_handle_arr[i] = arg_handle then
  287. il_state_arr[i] = arg_state
  288. return
  289. end if
  290. next
  291. il_max ++
  292. il_handle_arr[il_max] = arg_handle
  293. il_state_arr[il_max] = arg_state
  294. end subroutine
  295. public function long wf_gethandlestate (long arg_handle);long i
  296. for i = 1 to il_max
  297. if il_handle_arr[i] = arg_handle then
  298. return il_state_arr[i]
  299. end if
  300. next
  301. return 0
  302. end function
  303. public subroutine wf_set_tvchild (long arg_handl);//====================================================================
  304. // Function: wf_find_childtree()
  305. //--------------------------------------------------------------------
  306. // Description:
  307. //--------------------------------------------------------------------
  308. // Arguments:
  309. // value long arg_handl
  310. // value long arg_state
  311. //--------------------------------------------------------------------
  312. // Returns: integer
  313. //--------------------------------------------------------------------
  314. // Author: yyx Date: 2004.11.18
  315. //--------------------------------------------------------------------
  316. // Modify History:
  317. //
  318. //====================================================================
  319. long ll_handl
  320. treeviewitem tvi
  321. ll_handl = arg_handl
  322. tv_func.getitem(ll_handl,tvi)
  323. tvi.StatePictureIndex = 1
  324. tv_func.setitem(ll_handl,tvi)
  325. ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
  326. do while ll_handl > 0
  327. wf_set_tvnext(ll_handl)
  328. ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
  329. loop
  330. end subroutine
  331. public subroutine wf_set_tvnext (long arg_handl);//====================================================================
  332. // Function: wf_find_childtree()
  333. //--------------------------------------------------------------------
  334. // Description:
  335. //--------------------------------------------------------------------
  336. // Arguments:
  337. // value long arg_handl
  338. // value long arg_state
  339. //--------------------------------------------------------------------
  340. // Returns: integer
  341. //--------------------------------------------------------------------
  342. // Author: yyx Date: 2004.11.18
  343. //--------------------------------------------------------------------
  344. // Modify History:
  345. //
  346. //====================================================================
  347. long ll_handl
  348. treeviewitem tvi
  349. ll_handl = arg_handl
  350. tv_func.getitem(ll_handl,tvi)
  351. tvi.StatePictureIndex = 1
  352. tv_func.setitem(ll_handl,tvi)
  353. ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
  354. do while ll_handl > 0
  355. wf_set_tvchild(ll_handl)
  356. ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
  357. loop
  358. end subroutine
  359. public subroutine wf_set_tvparent (long arg_handl);//====================================================================
  360. // Function: wf_find_parenttree()
  361. //--------------------------------------------------------------------
  362. // Description:
  363. //--------------------------------------------------------------------
  364. // Arguments:
  365. // value long arg_handl
  366. // value long arg_state
  367. //--------------------------------------------------------------------
  368. // Returns: (none)
  369. //--------------------------------------------------------------------
  370. // Author: yyx Date: 2004.11.18
  371. //--------------------------------------------------------------------
  372. // Modify History:
  373. //
  374. //====================================================================
  375. long ll_handl
  376. treeviewitem tvi
  377. ll_handl = arg_handl
  378. tv_func.getitem(ll_handl,tvi)
  379. tvi.StatePictureIndex = 2
  380. tv_func.setitem(ll_handl,tvi)
  381. ll_handl = tv_func.finditem(ParentTreeItem!,ll_handl)
  382. do while ll_handl > 0
  383. tv_func.getitem(ll_handl,tvi)
  384. tvi.StatePictureIndex = 2
  385. tv_func.setitem(ll_handl,tvi)
  386. ll_handl = tv_func.finditem(ParentTreeItem!,ll_handl)
  387. loop
  388. end subroutine
  389. public function integer wf_face ();IF dw_edit_mode THEN
  390. cb_in.Enabled = FALSE
  391. cb_out.Enabled = FALSE
  392. cb_select.Enabled = TRUE
  393. cb_save.Enabled = TRUE
  394. cb_edit.Text = "放弃&E"
  395. cb_edit.normalpicname = 'Undo.bmp'
  396. dw_sys_option.SetTabOrder('ch',10)
  397. tab_1.tabpage_2.dw_windw.SetTabOrder('autoheight',10)
  398. tab_1.tabpage_2.dw_windw.SetTabOrder('colheight',20)
  399. tab_1.tabpage_2.dw_column.SetTabOrder('objvisible',10)
  400. tab_1.tabpage_2.dw_column.SetTabOrder('objdftvalue',20)
  401. // tab_1.tabpage_2.dw_allowversion.SetTabOrder('ch',10)
  402. ELSE
  403. cb_in.Enabled = TRUE
  404. cb_out.Enabled = TRUE
  405. cb_select.Enabled = FALSE
  406. cb_save.Enabled = FALSE
  407. cb_edit.Text = "修改&E"
  408. cb_edit.normalpicname = 'OPEN.bmp'
  409. dw_sys_option.SetTabOrder('ch',0)
  410. tab_1.tabpage_2.dw_windw.SetTabOrder('autoheight',0)
  411. tab_1.tabpage_2.dw_windw.SetTabOrder('colheight',0)
  412. tab_1.tabpage_2.dw_column.SetTabOrder('objvisible',0)
  413. tab_1.tabpage_2.dw_column.SetTabOrder('objdftvalue',0)
  414. // tab_1.tabpage_2.dw_allowversion.SetTabOrder('ch',0)
  415. END IF
  416. cb_edit.of_init_draw()
  417. cb_edit.of_paint()
  418. cb_edit.TriggerEvent('ue_textchange')
  419. RETURN 1
  420. end function
  421. public subroutine wf_refresh_tvnext (long arg_handl, string arg_rightstr);Long ll_handl
  422. Long ll_funcid
  423. treeviewitem tvi
  424. ll_handl = arg_handl
  425. ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl)
  426. DO WHILE ll_handl > 0
  427. tv_func.GetItem(ll_handl,tvi)
  428. ll_funcid = tvi.Data
  429. IF NOT ll_funcid = 0 THEN
  430. IF Mid(arg_rightstr,ll_funcid,1) = '0' OR Mid(arg_rightstr,ll_funcid,1) = '' THEN
  431. tvi.StatePictureIndex = 1
  432. ELSE
  433. tvi.StatePictureIndex = 2
  434. END IF
  435. END IF
  436. tv_func.SetItem(ll_handl,tvi)
  437. wf_refresh_tvchild(ll_handl,arg_rightstr)
  438. ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl)
  439. LOOP
  440. end subroutine
  441. public subroutine wf_refresh_tvchild (long arg_handl, string arg_rightstr);Long ll_handl
  442. Long ll_funcid
  443. treeviewitem tvi
  444. ll_handl = arg_handl
  445. ll_handl = tv_func.FindItem(ChildTreeItem!,ll_handl)
  446. DO WHILE ll_handl > 0
  447. tv_func.GetItem(ll_handl,tvi)
  448. ll_funcid = tvi.Data
  449. IF NOT ll_funcid = 0 THEN
  450. IF Mid(arg_rightstr,ll_funcid,1) = '0' or Mid(arg_rightstr,ll_funcid,1) = '' THEN
  451. tvi.StatePictureIndex = 1
  452. ELSE
  453. tvi.StatePictureIndex = 2
  454. END IF
  455. END IF
  456. tv_func.SetItem(ll_handl,tvi)
  457. wf_refresh_tvnext(ll_handl,arg_rightstr)
  458. ll_handl = tv_func.FindItem(ChildTreeItem!,ll_handl)
  459. LOOP
  460. end subroutine
  461. public subroutine wf_setvalue_option (string arg_str);Long ll_i
  462. Long ll_optionid
  463. dw_sys_option.AcceptText()
  464. dw_sys_option.SetRedraw(FALSE)
  465. FOR ll_i = 1 TO dw_sys_option.RowCount()
  466. ll_optionid = Long(dw_sys_option.Object.optionid[ll_i])
  467. IF Mid(arg_str,ll_optionid,1) = '0' OR Mid(arg_str,ll_optionid,1) = '' THEN
  468. dw_sys_option.Object.ch[ll_i] = 0
  469. ELSE
  470. dw_sys_option.Object.ch[ll_i] = 1
  471. END IF
  472. NEXT
  473. dw_sys_option.SetRedraw(TRUE)
  474. end subroutine
  475. public subroutine wf_retrieve_value ();
  476. String ls_sys_pwrstr,ls_sys_optionstr
  477. SELECT sys_pwrstr,sys_optionstr
  478. INTO :ls_sys_pwrstr,:ls_sys_optionstr
  479. FROM sys_DB_version;
  480. IF sqlca.SQLCode <> 0 THEN
  481. ls_sys_pwrstr = Fill('1',5000)
  482. ls_sys_optionstr = Fill('1',500)
  483. END IF
  484. IF ls_sys_pwrstr = '' THEN
  485. ls_sys_pwrstr = Fill('1',5000)
  486. END IF
  487. IF ls_sys_optionstr = '' THEN
  488. ls_sys_optionstr = Fill('1',1000)
  489. END IF
  490. Long ll_handl
  491. ll_handl = tv_func.FindItem(RootTreeItem!,0)
  492. IF ll_handl > 0 THEN wf_refresh_tvchild(ll_handl,ls_sys_pwrstr)
  493. wf_setvalue_option(ls_sys_optionstr)
  494. end subroutine
  495. public subroutine wf_getright_tvnext (long arg_handl, ref string arg_rightstr);Long ll_handl
  496. Long ll_funcid
  497. treeviewitem tvi
  498. ll_handl = arg_handl
  499. ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl)
  500. DO WHILE ll_handl > 0
  501. tv_func.GetItem(ll_handl,tvi)
  502. ll_funcid = tvi.Data
  503. IF NOT ll_funcid = 0 THEN
  504. IF tvi.StatePictureIndex = 2 THEN
  505. arg_rightstr = Replace(arg_rightstr,ll_funcid,1,"1")
  506. END IF
  507. END IF
  508. tv_func.SetItem(ll_handl,tvi)
  509. wf_getright_tvchild(ll_handl,arg_rightstr)
  510. ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl)
  511. LOOP
  512. end subroutine
  513. public subroutine wf_getright_tvchild (long arg_handl, ref string arg_rightstr);Long ll_handl
  514. Long ll_funcid
  515. treeviewitem tvi
  516. ll_handl = arg_handl
  517. ll_handl = tv_func.FindItem(ChildTreeItem!,ll_handl)
  518. DO WHILE ll_handl > 0
  519. tv_func.GetItem(ll_handl,tvi)
  520. ll_funcid = tvi.Data
  521. IF NOT ll_funcid = 0 THEN
  522. IF tvi.StatePictureIndex = 2 THEN
  523. arg_rightstr = Replace(arg_rightstr,ll_funcid,1,"1")
  524. END IF
  525. END IF
  526. wf_getright_tvnext(ll_handl,arg_rightstr)
  527. ll_handl = tv_func.FindItem(ChildTreeItem!,ll_handl)
  528. LOOP
  529. end subroutine
  530. public function string wf_getright ();string ls_ret
  531. ls_ret=fill("0",5000)
  532. long ll_handl
  533. ll_handl = tv_func.finditem(RootTreeItem!,0)
  534. if ll_handl > 0 then wf_getright_tvchild(ll_handl,ls_ret)
  535. return ls_ret
  536. end function
  537. public function string wf_getoption ();String ls_ret
  538. Long ll_i,ll_optionid
  539. ls_ret = Fill("0",500)
  540. dw_sys_option.SetFilter('')
  541. dw_sys_option.Filter()
  542. dw_sys_option.AcceptText()
  543. FOR ll_i = 1 TO dw_sys_option.RowCount()
  544. ll_optionid = Long(dw_sys_option.Object.optionid[ll_i])
  545. IF dw_sys_option.Object.ch[ll_i] = 1 THEN
  546. ls_ret = Replace(ls_ret,ll_optionid,1,"1")
  547. END IF
  548. NEXT
  549. RETURN ls_ret
  550. end function
  551. public function integer wf_build_functree2 ();//====================================================================
  552. // Function: wf_build_functree()
  553. //--------------------------------------------------------------------
  554. // Description:
  555. //--------------------------------------------------------------------
  556. // Arguments:(None)
  557. //--------------------------------------------------------------------
  558. // Returns: integer
  559. //--------------------------------------------------------------------
  560. // Author: lhd Date: 2013.06.14
  561. //--------------------------------------------------------------------
  562. // Modify History:
  563. //
  564. //====================================================================
  565. Long hand
  566. deep = 1
  567. Long tvi_hdl = 0
  568. DO UNTIL tv_2.FindItem(roottreeitem!, 0) = -1
  569. tv_2.DeleteItem(tvi_hdl)
  570. LOOP
  571. hand = tv_2.InsertItemLast(0,sys_message_title,1)
  572. pf_treegrowth2(hand,0,2)
  573. tv_2.ExpandItem(hand)
  574. sys_ds_maininfo.SetFilter("")
  575. sys_ds_maininfo.Filter()
  576. RETURN 1
  577. end function
  578. public function integer pf_treegrowth2 (long arg_handl, long arg_funcid, integer arg_lp);//====================================================================
  579. // function: pf_treegrowth()
  580. //--------------------------------------------------------------------
  581. // description:
  582. //--------------------------------------------------------------------
  583. // arguments:
  584. // value long arg_handl
  585. // value long arg_funcid
  586. // value integer arg_lp
  587. //--------------------------------------------------------------------
  588. // returns: integer
  589. //--------------------------------------------------------------------
  590. // author: lhd date: 2013.06.16
  591. //--------------------------------------------------------------------
  592. // modify history:
  593. //
  594. //====================================================================
  595. Int rslt = 1
  596. s_sys_func ls_s_func[]
  597. Long count = 0,ls_i, ll_cnt
  598. Long handl
  599. treeviewitem tvi
  600. IF IsNull(arg_funcid) THEN RETURN 0
  601. deep++
  602. IF deep > 100000 THEN //防止死递归
  603. RETURN 0
  604. END IF
  605. String ls_filter
  606. IF sys_if_network = 1 THEN
  607. ls_filter = 'parentid='+String(arg_funcid)+ ' and worktype <> 1 '
  608. ELSE
  609. ls_filter = 'parentid='+String(arg_funcid)+ ' and worktype <> 2 '
  610. END IF
  611. IF sys_version_type = 0 THEN
  612. ls_filter = ls_filter + 'and ( Versiontype = 0 or Versiontype = -1 )'
  613. ELSEIF sys_version_type = 1 THEN
  614. ls_filter = ls_filter + 'and ( Versiontype = 1 or Versiontype = -1 )'
  615. ELSEIF sys_version_type = 2 THEN
  616. ls_filter = ls_filter + 'and ( Versiontype = 0 or Versiontype = -1 or Versiontype = 2 )'
  617. END IF
  618. ls_filter += " and if_use <> 0 and functype <> 2 and functype <> 9 "
  619. sys_ds_maininfo.SetFilter(ls_filter)
  620. sys_ds_maininfo.Filter()
  621. FOR ls_i = 1 To sys_ds_maininfo.RowCount( )
  622. // IF sys_ds_maininfo.Object.functype[ls_i] = 9 And &
  623. // (sys_ds_maininfo.Object.funcid[ls_i] <> 263 And sys_ds_maininfo.Object.funcid[ls_i] <> 1573) THEN CONTINUE
  624. count++
  625. ls_s_func[count].funcid = sys_ds_maininfo.Object.funcid[ls_i]
  626. ls_s_func[count].treename = sys_ds_maininfo.Object.treename[ls_i]
  627. ls_s_func[count].MenuName = sys_ds_maininfo.Object.MenuName[ls_i]
  628. ls_s_func[count].parentid = sys_ds_maininfo.Object.parentid[ls_i]
  629. ls_s_func[count].sortflag = sys_ds_maininfo.Object.sortflag[ls_i]
  630. ls_s_func[count].functype = sys_ds_maininfo.Object.functype[ls_i]
  631. ls_s_func[count].mainid = sys_ds_maininfo.Object.mainid[ls_i]
  632. ls_s_func[count].if_use = sys_ds_maininfo.Object.if_use[ls_i]
  633. ls_s_func[count].versiontype = sys_ds_maininfo.Object.versiontype[ls_i]
  634. ls_s_func[count].worktype = sys_ds_maininfo.Object.worktype[ls_i]
  635. NEXT
  636. sys_ds_maininfo.SetFilter("")
  637. sys_ds_maininfo.Filter()
  638. FOR ls_i = 1 To count
  639. IF ls_s_func[ls_i].functype = 0 THEN
  640. arg_lp = 2
  641. ELSEIF ls_s_func[ls_i].functype = 8 THEN
  642. arg_lp = 3
  643. ELSEIF ls_s_func[ls_i].functype = 2 THEN //嵌入式报表模块
  644. arg_lp = 10
  645. ELSEIF ls_s_func[ls_i].functype = 9 THEN
  646. arg_lp = 4
  647. END IF
  648. ll_cnt = sys_ds_maininfo.Find('parentid='+String(ls_s_func[ls_i].funcid) &
  649. + " and if_use <> 0 " &
  650. + " and functype <> 2 "&
  651. + " and functype <> 9 ", 1, sys_ds_maininfo.RowCount())
  652. handl = tv_2.InsertItemLast(arg_handl,ls_s_func[ls_i].treename,arg_lp) //生成树
  653. // tv_func.ExpandItem(arg_handl)
  654. tv_2.GetItem(handl,tvi)
  655. tvi.StatePictureIndex = 2
  656. tvi.Data = ls_s_func[ls_i].funcid
  657. IF ll_cnt > 0 THEN
  658. tvi.Children = True
  659. ELSE
  660. tvi.Children = False
  661. END IF
  662. tv_2.SetItem(handl,tvi)
  663. // pf_treegrowth(handl,ls_s_func[ls_i].funcid,arg_lp+1) //下级生成树
  664. NEXT
  665. RETURN rslt
  666. end function
  667. public subroutine wf_check_modify (integer arg_winflag, integer arg_colflag);Boolean lb_save = False
  668. IF arg_colflag = 1 THEN
  669. wf_save_dw_obj()
  670. END IF
  671. IF arg_winflag = 1 THEN
  672. IF tab_1.tabpage_2.dw_windw.GetNextModified(0, Primary!) <> 0 Or &
  673. tab_1.tabpage_2.dw_windw.GetNextModified(0, Filter!) <> 0 THEN
  674. IF MessageBox('系统提示','数据窗口内容已更改,是否保存!',Question!,YesNo!) = 2 THEN RETURN
  675. lb_save = True
  676. IF tab_1.tabpage_2.dw_windw.Update() = -1 THEN
  677. ROLLBACK;
  678. ELSE
  679. COMMIT;
  680. END IF
  681. END IF
  682. END IF
  683. //IF arg_colflag = 1 THEN
  684. // IF tab_1.tabpage_2.dw_column.GetNextModified(0, Primary!) <> 0 Or &
  685. // tab_1.tabpage_2.dw_column.GetNextModified(0, Filter!) <> 0 THEN
  686. // IF not lb_save THEN
  687. // IF MessageBox('系统提示','数据窗口字段内容已更改,是否保存!',Question!,YesNo!) = 2 THEN RETURN
  688. // END IF
  689. // IF tab_1.tabpage_2.dw_column.Update() = -1 THEN
  690. // ROLLBACK;
  691. // ELSE
  692. // COMMIT;
  693. // END IF
  694. //
  695. // END IF
  696. //END IF
  697. RETURN
  698. end subroutine
  699. public subroutine wf_retrieve_col (long currentrow);String ls_dwname
  700. Int li_dwstyle
  701. IF currentrow > 0 THEN
  702. ls_dwname = tab_1.tabpage_2.dw_windw.Object.dwname[currentrow]
  703. li_dwstyle = tab_1.tabpage_2.dw_windw.Object.dwstyle[currentrow]
  704. tab_1.tabpage_2.dw_column.Retrieve(ls_dwname, li_dwstyle,is_AllowVersion)
  705. ELSE
  706. tab_1.tabpage_2.dw_column.Reset()
  707. END IF
  708. RETURN
  709. end subroutine
  710. public subroutine wf_set_version ();String ls_version_arr[]
  711. ls_version_arr[1] = "商业版"
  712. ls_version_arr[2] = "工业版"
  713. ls_version_arr[3] = "工业版+"
  714. Long i, ll_row
  715. ddlb_version.Reset()
  716. FOR i = 1 To UpperBound(ls_version_arr)
  717. ddlb_version.InsertItem(ls_version_arr[i],i)
  718. NEXT
  719. //ddlb_version.SelectItem(ls_version_arr[1],0)
  720. //首次进入,锁定当前系统的版本
  721. string ls_dft_version
  722. if sys_version = 802001 then
  723. ls_dft_version = "商业版"
  724. ddlb_version.SelectItem(ls_version_arr[1],0)
  725. elseif sys_version = 802002 then
  726. ls_dft_version = "工业版"
  727. ddlb_version.SelectItem(ls_version_arr[2],0)
  728. elseif sys_version = 802003 then
  729. ls_dft_version = "工业版+"
  730. ddlb_version.SelectItem(ls_version_arr[3],0)
  731. end if
  732. FOR i = 1 To UpperBound(sys_Version_arr)
  733. IF ddlb_version.Text = sys_Version_arr[i] THEN
  734. ii_version_int = i
  735. is_AllowVersion = Fill("0", i - 1) + "1" + Fill("0",20 - i)
  736. EXIT
  737. END IF
  738. NEXT
  739. RETURN
  740. end subroutine
  741. public subroutine wf_retrieve_allowversion (long currentrow);string ls_allowversion
  742. long ll_rowcnt
  743. long i
  744. //ll_rowcnt = tab_1.tabpage_2.dw_allowversion.rowcount()
  745. //IF currentrow > 0 THEN
  746. // ls_allowversion = tab_1.tabpage_2.dw_column.Object.allowversion[currentrow]
  747. //
  748. // for i = 1 to ll_rowcnt
  749. // tab_1.tabpage_2.dw_allowversion.Object.ch[i] = long(mid(ls_allowversion, i, 1))
  750. // next
  751. //ELSE
  752. // for i = 1 to ll_rowcnt
  753. // tab_1.tabpage_2.dw_allowversion.Object.ch[i] = 0
  754. // next
  755. //END IF
  756. RETURN
  757. end subroutine
  758. public subroutine wf_set_allowversion ();//String ls_allowversion
  759. //String ls_ch
  760. //Long i
  761. //Long ll_row
  762. //ls_allowversion = "111111111111111111"
  763. //IF tab_1.tabpage_2.dw_allowversion.GetNextModified(0, Primary!) <> 0 Or &
  764. // tab_1.tabpage_2.dw_allowversion.GetNextModified(0, Filter!) <> 0 THEN
  765. //
  766. // FOR i = 1 To tab_1.tabpage_2.dw_allowversion.RowCount()
  767. // ls_ch = String(tab_1.tabpage_2.dw_allowversion.Object.ch[i] )
  768. // ls_allowversion = Replace(ls_allowversion, i, 1, ls_ch)
  769. // NEXT
  770. //
  771. // ll_row = tab_1.tabpage_2.dw_column.GetRow()
  772. //
  773. // IF ll_row > 0 THEN
  774. // tab_1.tabpage_2.dw_column.Object.allowversion[ll_row] = ls_allowversion
  775. // END IF
  776. //
  777. //END IF
  778. RETURN
  779. end subroutine
  780. public subroutine wf_retrieve_dw_obj (long currentrow);String ls_dwname
  781. Int li_dwstyle
  782. String ls_object, ls_object_col, ls_object_txt, ls_object_txt_text
  783. String ls_mdfstr_visible, ls_mdfstr_x, ls_mdfstr_width, ls_mdfstr_alignment, ls_mdfstr_DftValue
  784. String ls_mdfstr_text
  785. String ls_mdfstr_height,ls_mdfstr_y,ls_mdfstr_Taborder
  786. Int li_sys_development_ori
  787. IF currentrow > 0 THEN
  788. ls_dwname = tab_1.tabpage_2.dw_windw.Object.dwname[currentrow]
  789. li_dwstyle = tab_1.tabpage_2.dw_windw.Object.dwstyle[currentrow]
  790. IF li_dwstyle = 1 THEN //Grid
  791. tab_1.tabpage_2.dw_2.visible = true
  792. tab_1.tabpage_2.dw_3.visible = false
  793. //tab_1.tabpage_2.dw_2
  794. ////////////////////////////////////////////
  795. li_sys_development_ori = sys_development
  796. sys_development = 0
  797. tab_1.tabpage_2.dw_2.SetRedraw(False)
  798. tab_1.tabpage_2.dw_2.DataObject = ls_dwname
  799. tab_1.tabpage_2.dw_2.cur_developtype = 2
  800. tab_1.tabpage_2.dw_2.TriggerEvent(Constructor!)
  801. tab_1.tabpage_2.dw_2.InsertRow(0)
  802. tab_1.tabpage_2.dw_2.SetRedraw(True)
  803. sys_development = li_sys_development_ori
  804. ////////////////////////////////////////// //
  805. ELSE //freefrom
  806. tab_1.tabpage_2.dw_2.visible = false
  807. tab_1.tabpage_2.dw_3.visible = true
  808. //tab_1.tabpage_2.dw_3
  809. ////////////////////////////////////////////
  810. li_sys_development_ori = sys_development
  811. sys_development = 0
  812. tab_1.tabpage_2.dw_3.SetRedraw(False)
  813. tab_1.tabpage_2.dw_3.DataObject = ls_dwname
  814. tab_1.tabpage_2.dw_3.cur_developtype = 2
  815. tab_1.tabpage_2.dw_3.TriggerEvent(Constructor!)
  816. tab_1.tabpage_2.dw_3.InsertRow(0)
  817. tab_1.tabpage_2.dw_3.SetRedraw(True)
  818. sys_development = li_sys_development_ori
  819. ////////////////////////////////////////// //
  820. END IF
  821. tab_1.tabpage_2.dw_column.SetRedraw(False)
  822. tab_1.tabpage_2.dw_column.Reset()
  823. //读obj
  824. IF li_dwstyle = 1 THEN //Grid
  825. f_get_obj2dw_development(is_AllowVersion,ls_dwname, tab_1.tabpage_2.dw_column,tab_1.tabpage_2.dw_2)
  826. ELSE
  827. f_get_obj2dw_development(is_AllowVersion,ls_dwname, tab_1.tabpage_2.dw_column,tab_1.tabpage_2.dw_3)
  828. END IF
  829. tab_1.tabpage_2.dw_column.SetSort("objx")
  830. tab_1.tabpage_2.dw_column.Sort()
  831. tab_1.tabpage_2.dw_column.SetRedraw(True)
  832. ELSE
  833. tab_1.tabpage_2.dw_column.Reset()
  834. tab_1.tabpage_2.dw_2.visible = false
  835. tab_1.tabpage_2.dw_3.visible = false
  836. tab_1.tabpage_2.dw_2.SetRedraw(False)
  837. tab_1.tabpage_2.dw_2.DataObject = ""
  838. tab_1.tabpage_2.dw_2.SetRedraw(True)
  839. tab_1.tabpage_2.dw_3.SetRedraw(False)
  840. tab_1.tabpage_2.dw_3.DataObject = ""
  841. tab_1.tabpage_2.dw_3.SetRedraw(True)
  842. END IF
  843. RETURN
  844. end subroutine
  845. public subroutine wf_save_dw_obj ();
  846. IF not dw_edit_mode THEN return
  847. String ls_object, ls_object_col, ls_object_txt, ls_object_txt_text
  848. String ls_mdfstr_visible, ls_mdfstr_x, ls_mdfstr_width, ls_mdfstr_alignment, ls_mdfstr_DftValue
  849. String ls_mdfstr_text
  850. String ls_mdfstr_height,ls_mdfstr_y,ls_mdfstr_Taborder
  851. String ls_dwname, ls_AllowVersion,ls_dbname
  852. String ls_coltype, ls_dftvalue
  853. Integer ll_objvisible
  854. Long ll_width
  855. Long ll_alignment
  856. Long ll_x, ll_y,ll_titlex,ll_titley
  857. Long i, ll_row
  858. IF tab_1.tabpage_2.dw_column.RowCount() <= 0 THEN RETURN
  859. ll_row = tab_1.tabpage_2.dw_windw.GetRow()
  860. IF ll_row <= 0 THEN RETURN
  861. ls_dwname = tab_1.tabpage_2.dw_windw.Object.dwname[ll_row]
  862. tab_1.tabpage_2.dw_column.AcceptText()
  863. FOR i = 1 To tab_1.tabpage_2.dw_column.RowCount()
  864. ls_object_col = tab_1.tabpage_2.dw_column.Object.objname[i]
  865. ll_objvisible = tab_1.tabpage_2.dw_column.Object.objvisible[i]
  866. ls_dftvalue = tab_1.tabpage_2.dw_column.Object.objdftvalue[i]
  867. ls_mdfstr_visible += ls_object_col+'.visible='+String(ll_objvisible)+'~t'
  868. ls_mdfstr_DftValue += ls_object_col+'.initial='+ls_dftvalue+'~t'
  869. NEXT
  870. UPDATE sys_dwnSyntax_sys
  871. SET DwObjVisible = :ls_mdfstr_visible,
  872. DwObjDftValue = :ls_mdfstr_DftValue
  873. WHERE AllowVersion = :is_AllowVersion
  874. And dwname = :ls_dwname;
  875. IF sqlca.SQLCode = 0 THEN
  876. IF sqlca.SQLNRows = 0 THEN
  877. INSERT INTO sys_dwnSyntax_sys
  878. (AllowVersion, DwName, DwObjVisible,
  879. DwObjDftValue)
  880. VALUES (:ls_AllowVersion,:ls_dwname,:ls_mdfstr_visible,
  881. :ls_mdfstr_DftValue);
  882. IF sqlca.SQLCode <> 0 THEN
  883. ROLLBACK;
  884. ELSE
  885. COMMIT;
  886. END IF
  887. ELSE
  888. COMMIT;
  889. END IF
  890. ELSE
  891. ROLLBACK;
  892. END IF
  893. RETURN
  894. end subroutine
  895. on w_system_plan_development.create
  896. int iCurrent
  897. call super::create
  898. this.tab_1=create tab_1
  899. this.cb_edit=create cb_edit
  900. this.cb_save=create cb_save
  901. this.cb_select=create cb_select
  902. this.st_1=create st_1
  903. this.ddlb_version=create ddlb_version
  904. this.cb_1=create cb_1
  905. this.cb_out=create cb_out
  906. this.cb_in=create cb_in
  907. this.cb_retrieve=create cb_retrieve
  908. this.ln_bar=create ln_bar
  909. this.ln_bar2=create ln_bar2
  910. this.r_bar=create r_bar
  911. this.ln_1=create ln_1
  912. this.ln_2=create ln_2
  913. iCurrent=UpperBound(this.Control)
  914. this.Control[iCurrent+1]=this.tab_1
  915. this.Control[iCurrent+2]=this.cb_edit
  916. this.Control[iCurrent+3]=this.cb_save
  917. this.Control[iCurrent+4]=this.cb_select
  918. this.Control[iCurrent+5]=this.st_1
  919. this.Control[iCurrent+6]=this.ddlb_version
  920. this.Control[iCurrent+7]=this.cb_1
  921. this.Control[iCurrent+8]=this.cb_out
  922. this.Control[iCurrent+9]=this.cb_in
  923. this.Control[iCurrent+10]=this.cb_retrieve
  924. this.Control[iCurrent+11]=this.ln_bar
  925. this.Control[iCurrent+12]=this.ln_bar2
  926. this.Control[iCurrent+13]=this.r_bar
  927. this.Control[iCurrent+14]=this.ln_1
  928. this.Control[iCurrent+15]=this.ln_2
  929. end on
  930. on w_system_plan_development.destroy
  931. call super::destroy
  932. destroy(this.tab_1)
  933. destroy(this.cb_edit)
  934. destroy(this.cb_save)
  935. destroy(this.cb_select)
  936. destroy(this.st_1)
  937. destroy(this.ddlb_version)
  938. destroy(this.cb_1)
  939. destroy(this.cb_out)
  940. destroy(this.cb_in)
  941. destroy(this.cb_retrieve)
  942. destroy(this.ln_bar)
  943. destroy(this.ln_bar2)
  944. destroy(this.r_bar)
  945. destroy(this.ln_1)
  946. destroy(this.ln_2)
  947. end on
  948. event open;call super::open;sys_development = 1
  949. tv_func = tab_1.tabpage_1.tv_1
  950. tv_2 = tab_1.tabpage_2.tv_2
  951. dw_sys_option = tab_1.tabpage_3.dw_1
  952. tab_1.tabpage_2.dw_windw.SetTransObject(sqlca)
  953. tab_1.tabpage_2.dw_column.SetTransObject(sqlca)
  954. wf_set_version()
  955. wf_build_functree()
  956. wf_build_functree2()
  957. cb_retrieve.triggerevent(clicked!)
  958. //wf_refresh_option()
  959. //wf_retrieve_value()
  960. end event
  961. event resize;call super::resize;ln_bar.EndX = This.Width
  962. ln_bar2.EndX = This.Width
  963. r_bar.Width = This.Width
  964. tab_1.Width = This.Width - tab_1.X - 40
  965. tab_1.Height = This.Height - tab_1.Y - 150
  966. tab_1.tabpage_1.tv_1.Height = tab_1.tabpage_1.Height
  967. tab_1.tabpage_3.dw_1.Height = tab_1.tabpage_3.Height
  968. tab_1.tabpage_1.tv_1.Width = tab_1.tabpage_1.Width
  969. tab_1.tabpage_3.dw_1.Width = tab_1.tabpage_3.Width
  970. tab_1.tabpage_2.tv_2.Height = tab_1.tabpage_2.Height
  971. tab_1.tabpage_2.dw_windw.X = tab_1.tabpage_2.tv_2.X + tab_1.tabpage_2.tv_2.Width + 5
  972. tab_1.tabpage_2.dw_windw.Y = tab_1.tabpage_2.tv_2.Y
  973. tab_1.tabpage_2.dw_windw.Width = tab_1.tabpage_2.Width - tab_1.tabpage_2.dw_windw.X - 40
  974. tab_1.tabpage_2.dw_windw.Height = 500 // tab_1.tabpage_2.Height / 3
  975. tab_1.tabpage_2.dw_column.X = tab_1.tabpage_2.tv_2.X + tab_1.tabpage_2.tv_2.Width + 5
  976. tab_1.tabpage_2.dw_column.Y = tab_1.tabpage_2.dw_windw.Y + tab_1.tabpage_2.dw_windw.Height + 5
  977. tab_1.tabpage_2.dw_column.Width = tab_1.tabpage_2.dw_windw.Width
  978. long ll_dw_column_height = 600
  979. //long ll_row
  980. //integer li_dwstyle
  981. //ll_row = tab_1.tabpage_2.dw_windw.getrow()
  982. //if ll_row > 0 then
  983. // li_dwstyle = tab_1.tabpage_2.dw_windw.object.dwstyle[ll_row]
  984. //else
  985. // li_dwstyle = -1
  986. //end if
  987. //
  988. //if li_dwstyle = 1 then
  989. // ll_dw_column_height = 300
  990. //else
  991. // ll_dw_column_height = 900
  992. //end if
  993. //IF tab_1.tabpage_2.dw_2.Visible THEN
  994. //tab_1.tabpage_2.dw_column.Height = tab_1.tabpage_2.Height * 2 / 3 - ll_dw_column_height
  995. tab_1.tabpage_2.dw_column.Height = tab_1.tabpage_2.Height - tab_1.tabpage_2.dw_column.Y - ll_dw_column_height //- 140
  996. tab_1.tabpage_2.dw_2.X = tab_1.tabpage_2.tv_2.X + tab_1.tabpage_2.tv_2.Width + 5
  997. tab_1.tabpage_2.dw_2.Y = tab_1.tabpage_2.dw_column.Y + tab_1.tabpage_2.dw_column.Height + 5
  998. tab_1.tabpage_2.dw_2.Width = tab_1.tabpage_2.dw_windw.Width
  999. tab_1.tabpage_2.dw_2.Height = ll_dw_column_height - 10
  1000. //ELSEIF tab_1.tabpage_2.dw_3.Visible THEN
  1001. //tab_1.tabpage_2.dw_column.Height = tab_1.tabpage_2.Height * 2 / 3 - ll_dw_column_height
  1002. tab_1.tabpage_2.dw_column.Height = tab_1.tabpage_2.Height - tab_1.tabpage_2.dw_column.Y - ll_dw_column_height //- 140
  1003. tab_1.tabpage_2.dw_3.X = tab_1.tabpage_2.tv_2.X + tab_1.tabpage_2.tv_2.Width + 5
  1004. tab_1.tabpage_2.dw_3.Y = tab_1.tabpage_2.dw_column.Y + tab_1.tabpage_2.dw_column.Height + 5
  1005. tab_1.tabpage_2.dw_3.Width = tab_1.tabpage_2.dw_windw.Width
  1006. tab_1.tabpage_2.dw_3.Height = ll_dw_column_height - 10
  1007. //ELSE
  1008. // //tab_1.tabpage_2.dw_column.Height = tab_1.tabpage_2.Height * 2 / 3
  1009. // tab_1.tabpage_2.dw_column.Height = tab_1.tabpage_2.Height - tab_1.tabpage_2.dw_column.Y - 140
  1010. //END IF
  1011. end event
  1012. type cb_func from w_publ_base`cb_func within w_system_plan_development
  1013. boolean visible = false
  1014. end type
  1015. type cb_exit from w_publ_base`cb_exit within w_system_plan_development
  1016. integer x = 1925
  1017. integer width = 165
  1018. integer height = 164
  1019. integer picsize = 16
  1020. toolbaralignment pic_align = alignattop!
  1021. boolean border = false
  1022. end type
  1023. type tab_1 from tab within w_system_plan_development
  1024. integer y = 296
  1025. integer width = 3584
  1026. integer height = 1984
  1027. integer taborder = 20
  1028. boolean bringtotop = true
  1029. integer textsize = -9
  1030. integer weight = 400
  1031. fontcharset fontcharset = gb2312charset!
  1032. fontpitch fontpitch = variable!
  1033. string facename = "宋体"
  1034. long backcolor = 134217739
  1035. boolean raggedright = true
  1036. boolean focusonbuttondown = true
  1037. integer selectedtab = 1
  1038. tabpage_1 tabpage_1
  1039. tabpage_3 tabpage_3
  1040. tabpage_2 tabpage_2
  1041. end type
  1042. on tab_1.create
  1043. this.tabpage_1=create tabpage_1
  1044. this.tabpage_3=create tabpage_3
  1045. this.tabpage_2=create tabpage_2
  1046. this.Control[]={this.tabpage_1,&
  1047. this.tabpage_3,&
  1048. this.tabpage_2}
  1049. end on
  1050. on tab_1.destroy
  1051. destroy(this.tabpage_1)
  1052. destroy(this.tabpage_3)
  1053. destroy(this.tabpage_2)
  1054. end on
  1055. type tabpage_1 from userobject within tab_1
  1056. integer x = 18
  1057. integer y = 96
  1058. integer width = 3547
  1059. integer height = 1872
  1060. long backcolor = 134217739
  1061. string text = "系统菜单"
  1062. long tabtextcolor = 33554432
  1063. long tabbackcolor = 134217739
  1064. long picturemaskcolor = 536870912
  1065. tv_1 tv_1
  1066. end type
  1067. on tabpage_1.create
  1068. this.tv_1=create tv_1
  1069. this.Control[]={this.tv_1}
  1070. end on
  1071. on tabpage_1.destroy
  1072. destroy(this.tv_1)
  1073. end on
  1074. type tv_1 from treeview within tabpage_1
  1075. event afterclicked ( long handle, boolean arg_changed )
  1076. integer width = 3269
  1077. integer height = 1976
  1078. integer taborder = 30
  1079. integer textsize = -9
  1080. integer weight = 400
  1081. fontcharset fontcharset = gb2312charset!
  1082. fontpitch fontpitch = variable!
  1083. string facename = "宋体"
  1084. long textcolor = 33554432
  1085. borderstyle borderstyle = stylelowered!
  1086. boolean disabledragdrop = false
  1087. boolean hideselection = false
  1088. boolean tooltips = false
  1089. boolean checkboxes = true
  1090. boolean trackselect = true
  1091. string picturename[] = {"application.ico","graphics\Shell32 005.bmp","graphics\task.bmp","graphics\Shell32 025.ico","graphics\guide.ico","graphics\plan.bmp","graphics\define.bmp","graphics\report.bmp","graphics\system.bmp","graphics\reportfold2.jpg","graphics\Window 08.ico"}
  1092. long picturemaskcolor = 536870912
  1093. long statepicturemaskcolor = 536870912
  1094. end type
  1095. event afterclicked(long handle, boolean arg_changed);treeviewitem tvi
  1096. long laststate
  1097. laststate = wf_gethandlestate(handle)
  1098. if laststate = 0 then return
  1099. IF tv_func.GetItem(Handle,tvi) = 1 THEN
  1100. IF arg_changed THEN // 状态更改
  1101. IF NOT dw_edit_mode THEN
  1102. tvi.StatePictureIndex = lastState
  1103. THIS.SetItem(Handle, tvi)
  1104. ELSE
  1105. IF Handle > 0 THEN
  1106. IF lastState = 2 THEN //孩子全部取消
  1107. wf_set_tvchild(Handle)
  1108. ELSEIF lastState = 1 THEN //父亲选定
  1109. wf_set_tvparent(Handle)
  1110. END IF
  1111. END IF
  1112. END IF
  1113. wf_sethandlestate(handle, 0)
  1114. END IF
  1115. END IF
  1116. end event
  1117. event clicked;Int ls_state
  1118. treeviewitem tvi
  1119. Boolean lb_changed = FALSE
  1120. IF GetCursor() = LoadCursor(0, 32649) THEN
  1121. lb_changed = TRUE
  1122. END IF
  1123. IF tv_func.GetItem(Handle,tvi) = 1 THEN
  1124. ls_state = tvi.StatePictureIndex
  1125. IF wf_gethandlestate(Handle) = 0 THEN
  1126. wf_sethandlestate(Handle, ls_state)
  1127. END IF
  1128. THIS.EVENT POST afterclicked(Handle, lb_changed)
  1129. END IF
  1130. end event
  1131. event key;Int ls_state
  1132. treeviewitem tvi
  1133. Long Handle
  1134. IF Key = keyspacebar! THEN
  1135. Handle = tv_func.FindItem(CurrentTreeItem!, 0)
  1136. IF tv_func.GetItem(Handle,tvi) = 1 THEN
  1137. ls_state = tvi.StatePictureIndex
  1138. IF wf_gethandlestate(Handle) = 0 THEN
  1139. wf_sethandlestate(Handle, ls_state)
  1140. END IF
  1141. THIS.EVENT POST afterclicked(Handle, TRUE)
  1142. END IF
  1143. END IF
  1144. end event
  1145. type tabpage_3 from userobject within tab_1
  1146. integer x = 18
  1147. integer y = 96
  1148. integer width = 3547
  1149. integer height = 1872
  1150. long backcolor = 134217739
  1151. string text = "系统选项"
  1152. long tabtextcolor = 33554432
  1153. long tabbackcolor = 134217739
  1154. long picturemaskcolor = 536870912
  1155. dw_1 dw_1
  1156. end type
  1157. on tabpage_3.create
  1158. this.dw_1=create dw_1
  1159. this.Control[]={this.dw_1}
  1160. end on
  1161. on tabpage_3.destroy
  1162. destroy(this.dw_1)
  1163. end on
  1164. type dw_1 from u_dw_rbtnfilter within tabpage_3
  1165. integer width = 3547
  1166. integer height = 1984
  1167. integer taborder = 20
  1168. string dataobject = "dw_sys_option_systemplan"
  1169. boolean hscrollbar = true
  1170. boolean vscrollbar = true
  1171. boolean hsplitscroll = true
  1172. boolean rbutton_filter_use = true
  1173. boolean rbutton_setposition_use = true
  1174. boolean titleclick_sort_use = true
  1175. end type
  1176. event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN
  1177. THIS.SelectRow(0,FALSE)
  1178. THIS.SelectRow(currentrow,TRUE)
  1179. THIS.SetRow(currentrow)
  1180. END IF
  1181. end event
  1182. event clicked;call super::clicked;IF row > 0 THEN
  1183. THIS.SelectRow(0,FALSE)
  1184. THIS.SelectRow(row,TRUE)
  1185. THIS.SetRow(row)
  1186. END IF
  1187. end event
  1188. type tabpage_2 from userobject within tab_1
  1189. integer x = 18
  1190. integer y = 96
  1191. integer width = 3547
  1192. integer height = 1872
  1193. long backcolor = 134217739
  1194. string text = "数据窗口"
  1195. long tabtextcolor = 33554432
  1196. long tabbackcolor = 134217739
  1197. long picturemaskcolor = 536870912
  1198. dw_3 dw_3
  1199. dw_2 dw_2
  1200. dw_column dw_column
  1201. dw_windw dw_windw
  1202. tv_2 tv_2
  1203. end type
  1204. on tabpage_2.create
  1205. this.dw_3=create dw_3
  1206. this.dw_2=create dw_2
  1207. this.dw_column=create dw_column
  1208. this.dw_windw=create dw_windw
  1209. this.tv_2=create tv_2
  1210. this.Control[]={this.dw_3,&
  1211. this.dw_2,&
  1212. this.dw_column,&
  1213. this.dw_windw,&
  1214. this.tv_2}
  1215. end on
  1216. on tabpage_2.destroy
  1217. destroy(this.dw_3)
  1218. destroy(this.dw_2)
  1219. destroy(this.dw_column)
  1220. destroy(this.dw_windw)
  1221. destroy(this.tv_2)
  1222. end on
  1223. type dw_3 from u_dw_uc_rbtnfilter within tabpage_2
  1224. integer x = 2290
  1225. integer y = 1112
  1226. integer taborder = 20
  1227. boolean hscrollbar = true
  1228. boolean vscrollbar = true
  1229. boolean hsplitscroll = true
  1230. boolean cur_usekey = true
  1231. boolean cur_autosave_wh = false
  1232. end type
  1233. type dw_2 from u_dw_rbtnfilter within tabpage_2
  1234. integer x = 1097
  1235. integer y = 1020
  1236. integer taborder = 20
  1237. boolean hscrollbar = true
  1238. boolean vscrollbar = true
  1239. boolean hsplitscroll = true
  1240. end type
  1241. event ue_setlayout;call super::ue_setlayout;
  1242. wf_retrieve_dw_obj(dw_windw.getrow())
  1243. end event
  1244. type dw_column from u_dw_rbtnfilter within tabpage_2
  1245. integer x = 1175
  1246. integer y = 628
  1247. integer width = 1157
  1248. integer taborder = 20
  1249. string dataobject = "dw_system_plan_dw_obj"
  1250. boolean hscrollbar = true
  1251. boolean vscrollbar = true
  1252. boolean hsplitscroll = true
  1253. boolean rbutton_filter_use = true
  1254. boolean titleclick_sort_use = true
  1255. end type
  1256. event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN
  1257. this.setrow(currentrow)
  1258. this.selectrow(0,false)
  1259. this.selectrow(currentrow,true)
  1260. END IF
  1261. //wf_retrieve_allowversion(currentrow)
  1262. end event
  1263. event clicked;call super::clicked;IF dw_edit_mode THEN
  1264. IF row > 0 THEN
  1265. This.SetRow(row)
  1266. This.SelectRow(0,False)
  1267. This.SelectRow(row,True)
  1268. END IF
  1269. // wf_retrieve_allowversion(row)
  1270. END IF
  1271. end event
  1272. type dw_windw from u_dw_rbtnfilter within tabpage_2
  1273. integer x = 1019
  1274. integer y = 4
  1275. integer width = 1888
  1276. integer height = 508
  1277. integer taborder = 20
  1278. string dataobject = "dw_sys_win_dw_systemplan"
  1279. boolean hscrollbar = true
  1280. boolean vscrollbar = true
  1281. boolean hsplitscroll = true
  1282. boolean rbutton_filter_use = true
  1283. boolean titleclick_sort_use = true
  1284. end type
  1285. event rowfocuschanged;call super::rowfocuschanged;//IF dw_edit_mode THEN
  1286. // wf_check_modify(0,1)
  1287. //END IF
  1288. IF currentrow > 0 THEN
  1289. This.SetRow(currentrow)
  1290. This.SelectRow(0,False)
  1291. This.SelectRow(currentrow,True)
  1292. END IF
  1293. wf_retrieve_dw_obj(currentrow)
  1294. //wf_retrieve_col(currentrow)
  1295. end event
  1296. event clicked;call super::clicked;IF dw_edit_mode THEN
  1297. wf_check_modify(0,1)
  1298. IF row > 0 THEN
  1299. This.SetRow(row)
  1300. This.SelectRow(0,False)
  1301. This.SelectRow(row,True)
  1302. END IF
  1303. // wf_retrieve_col(row)
  1304. wf_retrieve_dw_obj(row)
  1305. END IF
  1306. end event
  1307. event doubleclicked;call super::doubleclicked;IF row > 0 THEN
  1308. String ls_dwobject, ls_winname
  1309. Int li_dwstyle
  1310. string ls_mod_arr[]
  1311. string arg_msg
  1312. long uc_width, uc_height
  1313. f_set_nomod(ls_dwobject, ls_mod_arr, arg_msg)
  1314. ls_dwobject = This.Object.dwname[row]
  1315. li_dwstyle = This.Object.dwstyle[row]
  1316. ls_winname = This.Object.winname[row]
  1317. //读出UC高度与宽度
  1318. uc_width = Long(f_ProfileString(sys_empid,publ_userid+'_'+ls_dwobject, "width",'0'))
  1319. uc_height = Long(f_ProfileString(sys_empid,publ_userid+'_'+ls_dwobject, "height",'0'))
  1320. s_dw_uc_modify s_modify
  1321. IF li_dwstyle = 0 THEN //freeform
  1322. //ue_modify()调用修改UC布局窗口
  1323. s_modify.datawinname_uc = ls_dwobject
  1324. s_modify.nomod = ls_mod_arr
  1325. s_modify.uc_column_int = 20 //uc_column_int
  1326. s_modify.uc_width = uc_width
  1327. s_modify.uc_height = uc_height
  1328. s_modify.win = ls_winname
  1329. s_modify.mainid = il_dw_mainid
  1330. OpenWithParm(w_sysplan_dw_freeform_edit,s_modify)
  1331. ELSE
  1332. s_modify.datawinname_uc = ls_dwobject
  1333. s_modify.nomod = ls_mod_arr
  1334. s_modify.uc_column_int = 20 //uc_column_int
  1335. s_modify.uc_width = uc_width
  1336. s_modify.uc_height = uc_height
  1337. s_modify.win = ls_winname
  1338. s_modify.mainid = il_dw_mainid
  1339. OpenWithParm(w_sysplan_dw_edit,s_modify)
  1340. END IF
  1341. END IF
  1342. end event
  1343. type tv_2 from treeview within tabpage_2
  1344. event afterclicked ( long handle, boolean arg_changed )
  1345. integer width = 1015
  1346. integer height = 1976
  1347. integer taborder = 10
  1348. integer textsize = -9
  1349. integer weight = 400
  1350. fontcharset fontcharset = gb2312charset!
  1351. fontpitch fontpitch = variable!
  1352. string facename = "宋体"
  1353. long textcolor = 33554432
  1354. borderstyle borderstyle = stylelowered!
  1355. boolean disabledragdrop = false
  1356. boolean hideselection = false
  1357. boolean tooltips = false
  1358. boolean trackselect = true
  1359. string picturename[] = {"application.ico","graphics\Shell32 005.bmp","graphics\task.bmp","graphics\Shell32 025.ico","graphics\guide.ico","graphics\plan.bmp","graphics\define.bmp","graphics\report.bmp","graphics\system.bmp","graphics\reportfold2.jpg","graphics\Window 08.ico"}
  1360. long picturemaskcolor = 536870912
  1361. long statepicturemaskcolor = 536870912
  1362. end type
  1363. event clicked;Long ll_funcid
  1364. Long ll_mainid
  1365. Long ll_row
  1366. String ls_winname
  1367. treeviewitem tvi
  1368. boolean lb_reset = true
  1369. IF this.GetItem(Handle,tvi) = 1 THEN
  1370. ll_funcid = Long(tvi.Data)
  1371. ll_row = sys_ds_maininfo.Find("funcid = "+String(ll_funcid), 1, sys_ds_maininfo.RowCount())
  1372. IF ll_row > 0 THEN
  1373. ll_mainid = sys_ds_maininfo.Object.mainid[ll_row]
  1374. IF ll_mainid > 0 THEN
  1375. il_dw_mainid = ll_mainid
  1376. ls_winname = s_sys_win_open[ll_mainid].Name
  1377. wf_check_modify(1,1)
  1378. dw_windw.Retrieve(ls_winname)
  1379. if dw_windw.rowcount() > 1 then
  1380. dw_windw.selectrow(0, false)
  1381. dw_windw.setrow(1)
  1382. dw_windw.selectrow(1, true)
  1383. wf_retrieve_dw_obj(1)
  1384. end if
  1385. lb_reset = false
  1386. END IF
  1387. END IF
  1388. if lb_reset then
  1389. dw_windw.reset()
  1390. wf_retrieve_dw_obj(0)
  1391. // dw_column.reset()
  1392. // dw_2.dataobject = ''
  1393. end if
  1394. END IF
  1395. end event
  1396. event itempopulate;
  1397. treeviewitem tvi
  1398. Long ll_funcid
  1399. IF Handle > 0 THEN
  1400. This.GetItem(Handle,tvi)
  1401. ll_funcid = Long(tvi.Data)
  1402. pf_treegrowth2(Handle,ll_funcid,1) //下级生成树
  1403. END IF
  1404. end event
  1405. type cb_edit from uo_imflatbutton within w_system_plan_development
  1406. integer x = 187
  1407. integer width = 187
  1408. integer height = 164
  1409. integer taborder = 30
  1410. boolean bringtotop = true
  1411. string text = "修改"
  1412. string normalpicname = "open.bmp"
  1413. integer picsize = 16
  1414. toolbaralignment pic_align = alignattop!
  1415. boolean border = false
  1416. end type
  1417. event clicked;call super::clicked;IF NOT sys_power_issuper THEN
  1418. MessageBox("系统提示","非管理员不可以操作")
  1419. RETURN
  1420. END IF
  1421. IF dw_edit_mode THEN
  1422. IF MessageBox ("IF","是否确定要放弃保存当前内容?",Question!,YesNo! ) = 2 THEN RETURN
  1423. cb_retrieve.triggerevent(clicked!)
  1424. END IF
  1425. dw_edit_mode = NOT dw_edit_mode
  1426. wf_face()
  1427. end event
  1428. type cb_save from uo_imflatbutton within w_system_plan_development
  1429. integer x = 375
  1430. integer width = 178
  1431. integer height = 164
  1432. integer taborder = 10
  1433. boolean bringtotop = true
  1434. boolean enabled = false
  1435. string text = "保存"
  1436. string normalpicname = "save.bmp"
  1437. integer picsize = 16
  1438. toolbaralignment pic_align = alignattop!
  1439. boolean border = false
  1440. end type
  1441. event clicked;call super::clicked;IF NOT sys_power_issuper THEN
  1442. MessageBox("系统提示","非管理员不可以操作")
  1443. RETURN
  1444. END IF
  1445. String ls_pwrstr,ls_optionstr
  1446. ls_pwrstr = wf_getright()
  1447. ls_optionstr = wf_getoption()
  1448. UPDATE sys_DB_version
  1449. SET sys_pwrstr = :ls_pwrstr,
  1450. sys_optionstr = :ls_optionstr;
  1451. IF sqlca.SQLCode <> 0 THEN
  1452. ROLLBACK;
  1453. MessageBox('Error','更新系统解决方案失败,'+sqlca.SQLErrText)
  1454. RETURN
  1455. END IF
  1456. IF tab_1.tabpage_2.dw_windw.Update() = -1 THEN
  1457. ROLLBACK;
  1458. MessageBox('Error','更新数据窗口内容失败,'+sqlca.SQLErrText)
  1459. RETURN
  1460. END IF
  1461. wf_save_dw_obj()
  1462. //IF tab_1.tabpage_2.dw_column.Update() = -1 THEN
  1463. // ROLLBACK;
  1464. // MessageBox('Error','更新数据窗口字段内容失败,'+sqlca.SQLErrText)
  1465. // RETURN
  1466. //END IF
  1467. COMMIT;
  1468. dw_edit_mode = NOT dw_edit_mode
  1469. wf_face()
  1470. wf_retrieve_dw_obj(tab_1.tabpage_2.dw_windw.getrow())
  1471. MessageBox('系统提示','保存成功!请重启系统使方案生效')
  1472. end event
  1473. type cb_select from uo_imflatbutton within w_system_plan_development
  1474. integer x = 553
  1475. integer width = 165
  1476. integer height = 164
  1477. integer taborder = 20
  1478. boolean bringtotop = true
  1479. boolean enabled = false
  1480. string text = "全选"
  1481. string normalpicname = "ok.bmp"
  1482. integer picsize = 16
  1483. toolbaralignment pic_align = alignattop!
  1484. boolean border = false
  1485. end type
  1486. event clicked;call super::clicked;IF NOT dw_edit_mode THEN RETURN
  1487. Long ll_handl
  1488. String ls_sys_pwrstr,ls_sys_optionstr
  1489. ls_sys_pwrstr = Fill('1',5000)
  1490. ls_sys_optionstr = Fill('1',1000)
  1491. IF tab_1.SelectedTab = 1 THEN
  1492. IF MessageBox('询问','是否确定要全选系统菜单?',question!,yesno!) = 2 THEN RETURN
  1493. ll_handl = tv_func.FindItem(RootTreeItem!,0)
  1494. IF ll_handl > 0 THEN wf_refresh_tvchild(ll_handl,ls_sys_pwrstr)
  1495. ELSEIF tab_1.SelectedTab = 2 THEN
  1496. IF MessageBox('询问','是否确定要全选系统选项?',question!,yesno!) = 2 THEN RETURN
  1497. wf_setvalue_option(ls_sys_optionstr)
  1498. ELSEIF tab_1.SelectedTab = 3 THEN
  1499. END IF
  1500. end event
  1501. type st_1 from statictext within w_system_plan_development
  1502. integer x = 5
  1503. integer y = 204
  1504. integer width = 261
  1505. integer height = 48
  1506. boolean bringtotop = true
  1507. integer textsize = -9
  1508. integer weight = 400
  1509. fontcharset fontcharset = gb2312charset!
  1510. fontpitch fontpitch = variable!
  1511. string facename = "宋体"
  1512. long textcolor = 33554432
  1513. long backcolor = 134217739
  1514. string text = "系统版本:"
  1515. boolean focusrectangle = false
  1516. end type
  1517. type ddlb_version from dropdownlistbox within w_system_plan_development
  1518. integer x = 274
  1519. integer y = 184
  1520. integer width = 480
  1521. integer height = 736
  1522. integer taborder = 30
  1523. boolean bringtotop = true
  1524. integer textsize = -9
  1525. integer weight = 400
  1526. fontcharset fontcharset = gb2312charset!
  1527. fontpitch fontpitch = variable!
  1528. string facename = "宋体"
  1529. long textcolor = 33554432
  1530. borderstyle borderstyle = stylelowered!
  1531. end type
  1532. event selectionchanged;
  1533. Long i
  1534. FOR i = 1 To UpperBound(sys_Version_arr)
  1535. IF This.Text = sys_Version_arr[i] THEN
  1536. ii_version_int = i
  1537. is_AllowVersion = Fill("0", i - 1) + "1" + Fill("0",20 - i)
  1538. EXIT
  1539. END IF
  1540. NEXT
  1541. end event
  1542. type cb_1 from uo_imflatbutton within w_system_plan_development
  1543. integer x = 1595
  1544. integer width = 329
  1545. integer height = 164
  1546. integer taborder = 20
  1547. boolean bringtotop = true
  1548. string text = "管理员模式"
  1549. string normalpicname = "ok.bmp"
  1550. integer picsize = 16
  1551. toolbaralignment pic_align = alignattop!
  1552. boolean border = false
  1553. end type
  1554. event clicked;call super::clicked;IF dw_edit_mode THEN RETURN
  1555. open(w_system_plan_super)
  1556. end event
  1557. type cb_out from uo_imflatbutton within w_system_plan_development
  1558. integer x = 718
  1559. integer width = 439
  1560. integer height = 164
  1561. integer taborder = 30
  1562. boolean bringtotop = true
  1563. string text = "导出解决方案"
  1564. string normalpicname = "mx1.BMP"
  1565. integer picsize = 16
  1566. toolbaralignment pic_align = alignattop!
  1567. boolean border = false
  1568. end type
  1569. event clicked;call super::clicked;
  1570. Openwithparm(w_system_plan_export, is_AllowVersion)
  1571. //wf_retrieve_value()
  1572. end event
  1573. type cb_in from uo_imflatbutton within w_system_plan_development
  1574. integer x = 1157
  1575. integer width = 439
  1576. integer height = 164
  1577. integer taborder = 20
  1578. boolean bringtotop = true
  1579. string text = "导入解决方案"
  1580. string normalpicname = "mx1.BMP"
  1581. integer picsize = 16
  1582. toolbaralignment pic_align = alignattop!
  1583. boolean border = false
  1584. end type
  1585. event clicked;call super::clicked;
  1586. Openwithparm(w_system_plan_import, is_AllowVersion)
  1587. cb_retrieve.triggerevent(clicked!)
  1588. end event
  1589. type cb_retrieve from uo_imflatbutton within w_system_plan_development
  1590. integer width = 187
  1591. integer height = 164
  1592. integer taborder = 30
  1593. boolean bringtotop = true
  1594. string text = "刷新"
  1595. string normalpicname = "refresh.bmp"
  1596. integer picsize = 16
  1597. toolbaralignment pic_align = alignattop!
  1598. boolean border = false
  1599. end type
  1600. event clicked;call super::clicked;
  1601. wf_refresh_option()
  1602. wf_retrieve_value()
  1603. end event
  1604. type ln_bar from line within w_system_plan_development
  1605. long linecolor = 268435456
  1606. integer linethickness = 4
  1607. integer beginy = 172
  1608. integer endx = 2007
  1609. integer endy = 172
  1610. end type
  1611. type ln_bar2 from line within w_system_plan_development
  1612. long linecolor = 16777215
  1613. integer linethickness = 4
  1614. integer beginy = 176
  1615. integer endx = 2039
  1616. integer endy = 176
  1617. end type
  1618. type r_bar from rectangle within w_system_plan_development
  1619. long linecolor = 16777215
  1620. integer linethickness = 4
  1621. long fillcolor = 1073741824
  1622. integer x = 2811
  1623. integer width = 146
  1624. integer height = 68
  1625. end type
  1626. event constructor;this.fillcolor = 14215660
  1627. this.linecolor = 14215660
  1628. this.x = -1
  1629. this.y = -1
  1630. this.height = ln_bar.beginy - 5
  1631. end event
  1632. type ln_1 from line within w_system_plan_development
  1633. long linecolor = 268435456
  1634. integer linethickness = 4
  1635. integer beginy = 288
  1636. integer endx = 2007
  1637. integer endy = 288
  1638. end type
  1639. type ln_2 from line within w_system_plan_development
  1640. long linecolor = 16777215
  1641. integer linethickness = 4
  1642. integer beginy = 292
  1643. integer endx = 2039
  1644. integer endy = 292
  1645. end type