w_dw_update.srw 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449
  1. $PBExportHeader$w_dw_update.srw
  2. forward
  3. global type w_dw_update from w_publ_base
  4. end type
  5. type lb_1 from listbox within w_dw_update
  6. end type
  7. type lb_2 from listbox within w_dw_update
  8. end type
  9. type dw_list from u_dw_rbtnfilter within w_dw_update
  10. end type
  11. type dw_lib from u_dw_rbtnfilter within w_dw_update
  12. end type
  13. type cb_add from uo_imflatbutton within w_dw_update
  14. end type
  15. type cb_retrieve from uo_imflatbutton within w_dw_update
  16. end type
  17. type dw_pb from u_dw_rbtnfilter within w_dw_update
  18. end type
  19. type cb_saveupload from uo_imflatbutton within w_dw_update
  20. end type
  21. type cbx_1 from checkbox within w_dw_update
  22. end type
  23. type cb_save from uo_imflatbutton within w_dw_update
  24. end type
  25. type cb_upload from uo_imflatbutton within w_dw_update
  26. end type
  27. type cb_2 from uo_imflatbutton within w_dw_update
  28. end type
  29. type cb_3 from uo_imflatbutton within w_dw_update
  30. end type
  31. type cbx_4 from checkbox within w_dw_update
  32. end type
  33. type cb_5 from uo_imflatbutton within w_dw_update
  34. end type
  35. type cb_7 from uo_imflatbutton within w_dw_update
  36. end type
  37. type p_resize from picture within w_dw_update
  38. end type
  39. type gb_1 from groupbox within w_dw_update
  40. end type
  41. type gb_2 from groupbox within w_dw_update
  42. end type
  43. type ln_bar2 from line within w_dw_update
  44. end type
  45. type ln_bar from line within w_dw_update
  46. end type
  47. type r_bar from rectangle within w_dw_update
  48. end type
  49. end forward
  50. global type w_dw_update from w_publ_base
  51. integer width = 3625
  52. integer height = 2388
  53. string title = "新打印格式上传"
  54. boolean maxbox = true
  55. boolean resizable = true
  56. windowstate windowstate = maximized!
  57. event ue_f7 ( )
  58. event ue_pset1 ( )
  59. event ue_import ( )
  60. event retrieve_list ( )
  61. lb_1 lb_1
  62. lb_2 lb_2
  63. dw_list dw_list
  64. dw_lib dw_lib
  65. cb_add cb_add
  66. cb_retrieve cb_retrieve
  67. dw_pb dw_pb
  68. cb_saveupload cb_saveupload
  69. cbx_1 cbx_1
  70. cb_save cb_save
  71. cb_upload cb_upload
  72. cb_2 cb_2
  73. cb_3 cb_3
  74. cbx_4 cbx_4
  75. cb_5 cb_5
  76. cb_7 cb_7
  77. p_resize p_resize
  78. gb_1 gb_1
  79. gb_2 gb_2
  80. ln_bar2 ln_bar2
  81. ln_bar ln_bar
  82. r_bar r_bar
  83. end type
  84. global w_dw_update w_dw_update
  85. type variables
  86. String ls_path,lib_path,lib_name
  87. long dw_lib_h,dw_list_h,dw_list_w
  88. long cur_type = 0
  89. long j
  90. DataWindowChild dw_child
  91. DataWindowChild dw_child2
  92. long if_update = 0
  93. end variables
  94. forward prototypes
  95. public subroutine wf_addexplore (long arg_type)
  96. public subroutine wf_retrdw (string arg_path)
  97. public subroutine wf_retrpb ()
  98. public function integer wf_check (ref string arg_msg)
  99. public function integer wf_init (ref string arg_msg)
  100. end prototypes
  101. event ue_f7();Long lib_row
  102. Long list_row
  103. str_rpt s_parm
  104. dw_lib.accepttext()
  105. dw_list.accepttext()
  106. lib_row = dw_lib.GetRow()
  107. list_row = dw_list.GetRow()
  108. IF lib_row <= 0 OR list_row <= 0 THEN RETURN
  109. dw_list.accepttext()
  110. s_parm.auto = "auto"
  111. s_parm.transation = sqlca//数据库连接
  112. s_parm.oname = dw_list.object.ctag[list_row]
  113. s_parm.otype = lib_path
  114. s_parm.rcname = dw_list.object.ctag[list_row]
  115. s_parm.retr_pram_falg = -1
  116. s_parm.retr_flag = true
  117. s_parm.import_flag = true
  118. s_parm.pblpath = dw_lib.object.lib_path[lib_row]
  119. OpenWithParm(w_rpt_main,s_parm)
  120. end event
  121. event ue_pset1();Long i
  122. if dw_list.RowCount() < 2 then return
  123. FOR i = 2 TO dw_list.RowCount()
  124. dw_list.Object.fromtype[i] = dw_list.Object.fromtype[1]
  125. NEXT
  126. end event
  127. event ue_import();Long i
  128. String ls_ctag,ls_dwname,ls_wname
  129. IF dw_list.RowCount() = 0 THEN RETURN
  130. FOR i = 1 TO dw_list.RowCount()
  131. ls_ctag = dw_list.Object.ctag[i]
  132. SELECT chnname,
  133. dwtype
  134. INTO :ls_dwname,
  135. :ls_wname
  136. FROM sys_dft_dwprint_dynamic
  137. WHERE dft_new_dwname = :ls_ctag and
  138. ifdefault = 0;
  139. IF sqlca.SQLCode = 0 THEN
  140. dw_list.Object.dwname[i] = ls_dwname
  141. dw_list.Object.wname[i] = ls_wname
  142. dw_list.Object.fromtype[i] = 0
  143. END IF
  144. NEXT
  145. end event
  146. event retrieve_list();
  147. long ll_row
  148. ll_row = dw_lib.getrow()
  149. dw_lib.AcceptText()
  150. IF ll_row > 0 THEN
  151. lib_name = dw_lib.Object.lib_name[ll_row]
  152. lib_path = dw_lib.Object.lib_path[ll_row]
  153. wf_retrdw(lib_path)
  154. ELSE
  155. dw_list.Reset()
  156. END IF
  157. end event
  158. public subroutine wf_addexplore (long arg_type);
  159. String ls_label
  160. Int li_count,i = 1
  161. Integer li_FileNum
  162. Blob ls_str
  163. j = 1
  164. LS_PATH = sys_cur_path + "*.pbl"
  165. lb_1.Reset()
  166. lb_1.DirList(LS_PATH, 0)
  167. li_count = lb_1.TotalItems()
  168. dw_lib.Reset()
  169. IF li_count > 0 THEN
  170. FOR i = li_count TO 1 STEP -1
  171. ls_label = lb_1.Text(i)
  172. li_FileNum = FileOpen(sys_cur_path + ls_label,StreamMode!)
  173. FileRead(li_FileNum,ls_str)
  174. ls_str = BlobMid(ls_str,29,100)
  175. FileClose(li_FileNum)
  176. IF Pos(sys_system_id,Trim(String(ls_str))) > 0 THEN //企精灵为ewiserp,L1为ljerp
  177. dw_lib.Object.lib_name[j] = ls_label
  178. dw_lib.Object.lib_path[j] = sys_cur_path + ls_label
  179. dw_lib.Object.flag[j] = 0
  180. if ls_label = sys_pblname then
  181. dw_lib.Object.ifdft[j] = 1
  182. else
  183. dw_lib.Object.ifdft[j] = 0
  184. end if
  185. j++
  186. END IF
  187. NEXT
  188. END IF
  189. IF dw_lib.RowCount() > 0 THEN
  190. lib_path = dw_lib.Object.lib_path[1]
  191. wf_retrdw(lib_path)
  192. ELSE
  193. dw_list.Reset()
  194. END IF
  195. end subroutine
  196. public subroutine wf_retrdw (string arg_path);if arg_path = '' then return
  197. ///////////////
  198. String ls_data,s[]
  199. Long ll_row,k
  200. String ls_msm[]
  201. s[4] = LibraryDirectory(arg_path,DirDataWindow!) //name ~t date/time modified ~t comments ~n
  202. dw_list.Reset()
  203. dw_list.SetRedraw(FALSE)
  204. DO WHILE TRUE
  205. k = Pos(s[4],'~t')
  206. IF k = 0 THEN EXIT
  207. s[1] = Left(s[4],k -1)
  208. s[4] = Mid(s[4],k+1)
  209. k = Pos(s[4],'~t')
  210. s[3] = Left(s[4],k -1)
  211. s[4] = Mid(s[4],k+1)
  212. k = Pos(s[4],'~n')
  213. s[2] = Left(s[4],k -1)
  214. s[4] = Mid(s[4],k+1)
  215. k = dw_list.InsertRow(0)
  216. dw_list.SetItem(k,1,s[1])
  217. dw_list.SetItem(k,3,s[3])
  218. IF Len(Trim(s[2])) > 1 THEN
  219. dw_list.object.comments[k] = left(s[2],len(s[2]) - 1 )
  220. ll_row = 0
  221. DO WHILE Pos(s[2],'&') > 0
  222. ll_row++
  223. ls_msm[ll_row] = Mid(s[2],1,Pos(s[2],'&') - 1)
  224. s[2] = Mid(s[2],Pos(s[2],'&') + 1)
  225. LOOP
  226. IF ll_row = 2 THEN
  227. dw_list.object.product[k] = long(ls_msm[1])
  228. dw_list.object.fromtype[k] = long(ls_msm[2] )
  229. end if
  230. if ll_row > 2 then
  231. dw_list.object.product[k] = long(ls_msm[1])
  232. dw_list.object.fromtype[k] = long(ls_msm[2] )
  233. dw_list.object.wname[k] = ls_msm[3]
  234. dw_list.object.dwname[k] = ls_msm[4]
  235. END IF
  236. END IF
  237. LOOP
  238. dw_list.SetRedraw(TRUE)
  239. datawindowchild childdw
  240. dw_list.SetTransObject (sqlca)
  241. childdw.SetTransObject (sqlca)
  242. childdw.Retrieve()
  243. end subroutine
  244. public subroutine wf_retrpb ();Long i,ll_row
  245. string ls_msm[]
  246. dw_pb.retrieve()
  247. IF dw_pb.RowCount() = 0 THEN RETURN
  248. string ls_comments
  249. FOR i = 1 TO dw_pb.RowCount()
  250. ls_comments = dw_pb.object.comments[i]
  251. IF Len(Trim(ls_comments)) > 1 THEN
  252. ll_row = 0
  253. DO WHILE Pos(ls_comments,'&') > 0
  254. ll_row++
  255. ls_msm[ll_row] = Mid(ls_comments,1,Pos(ls_comments,'&') - 1)
  256. ls_comments = Mid(ls_comments,Pos(ls_comments,'&') + 1)
  257. LOOP
  258. IF ll_row = 2 THEN
  259. dw_pb.object.product[i] = long(ls_msm[1])
  260. dw_pb.object.fromtype[i] = long(ls_msm[2] )
  261. end if
  262. if ll_row > 2 then
  263. dw_pb.object.product[i] = long(ls_msm[1])
  264. dw_pb.object.fromtype[i] = long(ls_msm[2] )
  265. dw_pb.object.wname[i] = ls_msm[3]
  266. dw_pb.object.dwname[i] = ls_msm[4]
  267. END IF
  268. END IF
  269. NEXT
  270. end subroutine
  271. public function integer wf_check (ref string arg_msg);Long rslt = 1,i
  272. dw_list.AcceptText()
  273. FOR i = 1 TO dw_list.RowCount()
  274. IF dw_list.Object.fromtype[i] = 0 AND dw_list.Object.ch[i] = 1 THEN
  275. IF dw_list.Object.wname[i] = '' THEN
  276. arg_msg = '第' + String(i) + '行,请填写所属窗口名称'
  277. rslt = 0
  278. GOTO ext
  279. END IF
  280. IF dw_list.Object.dwname[i] = '' THEN
  281. arg_msg = '第' + String(i) + '行,请填写打印格式名称'
  282. rslt = 0
  283. GOTO ext
  284. END IF
  285. END IF
  286. NEXT
  287. ext:
  288. RETURN rslt
  289. end function
  290. public function integer wf_init (ref string arg_msg);Long rslt = 1,i = 1,no_mxcheck
  291. String Filename[],comments[]
  292. DateTime buildtime[]
  293. String ls_dwsyn,ls_dwsyn2
  294. Blob lb_dwsyn
  295. DECLARE cur_inwaermx CURSOR FOR
  296. SELECT sys_autoudpb.filename,
  297. sys_autoudpb.buildtime,
  298. sys_autoudpb.comments
  299. FROM sys_autoudpb ;
  300. OPEN cur_inwaermx;
  301. FETCH cur_inwaermx INTO :Filename[i],
  302. :buildtime[i],
  303. :comments[i];
  304. DO WHILE sqlca.SQLCode = 0
  305. i++
  306. FETCH cur_inwaermx INTO :Filename[i],
  307. :buildtime[i],
  308. :comments[i];
  309. LOOP
  310. SELECT count(*) INTO :no_mxcheck
  311. FROM sys_autoudpb;
  312. IF sqlca.SQLCode <> 0 THEN
  313. rslt = 0
  314. arg_msg = "查询操作失败,数据窗口数量"
  315. GOTO ext
  316. END IF
  317. IF i <> (no_mxcheck+1) THEN
  318. rslt = 0
  319. arg_msg = "查询操作失败,数据窗口明细"
  320. GOTO ext
  321. END IF
  322. FOR i = 1 TO no_mxcheck
  323. ls_dwsyn = LibraryExport(sys_cur_path + sys_pblname, Filename[i], ExportDataWindow!)
  324. SELECTBLOB filedata
  325. INTO :lb_dwsyn
  326. FROM sys_autoudpb
  327. Where Filename = :Filename[i];
  328. IF sqlca.SQLCode <> 0 THEN
  329. rslt = 0
  330. arg_msg = "查询操作失败,数据窗口数据"
  331. GOTO ext
  332. ELSE
  333. ls_dwsyn2 = String(lb_dwsyn)
  334. END IF
  335. IF ls_dwsyn2 <> ls_dwsyn THEN
  336. IF LibraryImport(sys_cur_path + sys_pblname,Filename[i], ImportDataWindow!, ls_dwsyn2, arg_msg,comments[i] ) = -1 THEN
  337. rslt = 0
  338. arg_msg = "查询操作失败,数据窗口数据导入错误," + arg_msg
  339. GOTO ext
  340. END IF
  341. END IF
  342. NEXT
  343. ext:
  344. IF rslt = 0 THEN
  345. ROLLBACK;
  346. ELSE
  347. COMMIT;
  348. END IF
  349. RETURN rslt
  350. end function
  351. on w_dw_update.create
  352. int iCurrent
  353. call super::create
  354. this.lb_1=create lb_1
  355. this.lb_2=create lb_2
  356. this.dw_list=create dw_list
  357. this.dw_lib=create dw_lib
  358. this.cb_add=create cb_add
  359. this.cb_retrieve=create cb_retrieve
  360. this.dw_pb=create dw_pb
  361. this.cb_saveupload=create cb_saveupload
  362. this.cbx_1=create cbx_1
  363. this.cb_save=create cb_save
  364. this.cb_upload=create cb_upload
  365. this.cb_2=create cb_2
  366. this.cb_3=create cb_3
  367. this.cbx_4=create cbx_4
  368. this.cb_5=create cb_5
  369. this.cb_7=create cb_7
  370. this.p_resize=create p_resize
  371. this.gb_1=create gb_1
  372. this.gb_2=create gb_2
  373. this.ln_bar2=create ln_bar2
  374. this.ln_bar=create ln_bar
  375. this.r_bar=create r_bar
  376. iCurrent=UpperBound(this.Control)
  377. this.Control[iCurrent+1]=this.lb_1
  378. this.Control[iCurrent+2]=this.lb_2
  379. this.Control[iCurrent+3]=this.dw_list
  380. this.Control[iCurrent+4]=this.dw_lib
  381. this.Control[iCurrent+5]=this.cb_add
  382. this.Control[iCurrent+6]=this.cb_retrieve
  383. this.Control[iCurrent+7]=this.dw_pb
  384. this.Control[iCurrent+8]=this.cb_saveupload
  385. this.Control[iCurrent+9]=this.cbx_1
  386. this.Control[iCurrent+10]=this.cb_save
  387. this.Control[iCurrent+11]=this.cb_upload
  388. this.Control[iCurrent+12]=this.cb_2
  389. this.Control[iCurrent+13]=this.cb_3
  390. this.Control[iCurrent+14]=this.cbx_4
  391. this.Control[iCurrent+15]=this.cb_5
  392. this.Control[iCurrent+16]=this.cb_7
  393. this.Control[iCurrent+17]=this.p_resize
  394. this.Control[iCurrent+18]=this.gb_1
  395. this.Control[iCurrent+19]=this.gb_2
  396. this.Control[iCurrent+20]=this.ln_bar2
  397. this.Control[iCurrent+21]=this.ln_bar
  398. this.Control[iCurrent+22]=this.r_bar
  399. end on
  400. on w_dw_update.destroy
  401. call super::destroy
  402. destroy(this.lb_1)
  403. destroy(this.lb_2)
  404. destroy(this.dw_list)
  405. destroy(this.dw_lib)
  406. destroy(this.cb_add)
  407. destroy(this.cb_retrieve)
  408. destroy(this.dw_pb)
  409. destroy(this.cb_saveupload)
  410. destroy(this.cbx_1)
  411. destroy(this.cb_save)
  412. destroy(this.cb_upload)
  413. destroy(this.cb_2)
  414. destroy(this.cb_3)
  415. destroy(this.cbx_4)
  416. destroy(this.cb_5)
  417. destroy(this.cb_7)
  418. destroy(this.p_resize)
  419. destroy(this.gb_1)
  420. destroy(this.gb_2)
  421. destroy(this.ln_bar2)
  422. destroy(this.ln_bar)
  423. destroy(this.r_bar)
  424. end on
  425. event open;call super::open;
  426. Long i,ll_row,ll_row2
  427. dw_list.SetTransObject(sqlca)
  428. dw_list.GetChild('wname',dw_child)
  429. dw_pb.SetTransObject(sqlca)
  430. dw_pb.GetChild('wname',dw_child2)
  431. FOR i = 1 TO UpperBound(s_sys_bill)
  432. IF s_sys_bill[i].versiontype = sys_version_type OR s_sys_bill[i].versiontype = -1 THEN
  433. ll_row = dw_child.InsertRow(0)
  434. dw_child.SetItem(ll_row2,1,s_sys_bill[i].winname)
  435. dw_child.SetItem(ll_row2,2,s_sys_bill[i].billname)
  436. ll_row2 = dw_child2.InsertRow(0)
  437. dw_child2.SetItem(ll_row2,1,s_sys_bill[i].winname)
  438. dw_child2.SetItem(ll_row2,2,s_sys_bill[i].billname)
  439. END IF
  440. NEXT
  441. dw_pb.SetTransObject(sqlca)
  442. wf_addexplore(cur_type)
  443. wf_retrpb()
  444. end event
  445. event resize;call super::resize;ln_bar.EndX = THIS.Width
  446. ln_bar2.EndX = THIS.Width
  447. r_bar.Width = THIS.Width
  448. long w_width,w_height
  449. w_width = 3600
  450. w_height = 2350
  451. if newwidth < w_width then this.width = w_width
  452. if newheight < w_height then this.height = w_height
  453. gb_2.width = this.width - 50
  454. gb_1.width = this.width - 50
  455. dw_list.width = this.width - dw_list.x - 60
  456. dw_pb.width = this.width - dw_pb.x - 60
  457. gb_1.height = this.height - gb_1.y - 150
  458. dw_pb.height = this.height - dw_pb.y - 170
  459. //dw_lib.height = this.height - (w_height - dw_lib_h)
  460. //dw_list.width=this.width - (w_width - dw_list_w)
  461. //dw_pb.width=this.width - (w_width - dw_list_w)
  462. //
  463. //dw_list.height= dw_lib.height/2 - 50
  464. //dw_pb.height= dw_lib.height/2 - 50
  465. //cbx_2.y = dw_list.y+dw_list.height+10
  466. //cb_1.y = dw_list.y+dw_list.height+5
  467. //cb_del.y = dw_list.y+dw_list.height+5
  468. //cb_4.y = dw_list.y+dw_list.height+5
  469. //dw_pb.y = dw_list.y+dw_list.height + 100
  470. //cbx_4.y = dw_list.y+dw_list.height+10
  471. end event
  472. event ue_before_open;call super::ue_before_open;THIS.BackColor = 14215660
  473. String arg_msg
  474. IF f_init_dftpbl(sys_pblname,'',arg_msg) = 0 THEN
  475. MessageBox('错误',arg_msg,StopSign!, OK! )
  476. END IF
  477. long iflib
  478. iflib = long (f_ProfileString (sys_empid,dw_lib.DataObject, "iflib",'1') )
  479. IF iflib = 1 THEN
  480. p_resize.picturename = 'w_resize_2.bmp'
  481. p_resize.X = 1125
  482. dw_list.X = 1166
  483. dw_lib.Visible = TRUE
  484. ELSE
  485. p_resize.picturename = 'w_resize_1.bmp'
  486. p_resize.X = 0
  487. dw_list.X = p_resize.Width + 5
  488. dw_lib.Visible = FALSE
  489. END IF
  490. end event
  491. type cb_func from w_publ_base`cb_func within w_dw_update
  492. boolean visible = false
  493. end type
  494. type cb_exit from w_publ_base`cb_exit within w_dw_update
  495. integer x = 1422
  496. integer y = 1260
  497. integer width = 151
  498. integer height = 164
  499. integer picsize = 16
  500. toolbaralignment pic_align = alignattop!
  501. boolean border = false
  502. end type
  503. type lb_1 from listbox within w_dw_update
  504. boolean visible = false
  505. integer x = 3291
  506. integer y = 128
  507. integer width = 878
  508. integer height = 544
  509. integer taborder = 20
  510. boolean bringtotop = true
  511. integer textsize = -9
  512. integer weight = 400
  513. fontcharset fontcharset = gb2312charset!
  514. fontpitch fontpitch = variable!
  515. string facename = "宋体"
  516. long textcolor = 33554432
  517. borderstyle borderstyle = stylelowered!
  518. end type
  519. type lb_2 from listbox within w_dw_update
  520. boolean visible = false
  521. integer x = 3291
  522. integer y = 832
  523. integer width = 878
  524. integer height = 544
  525. integer taborder = 30
  526. boolean bringtotop = true
  527. integer textsize = -9
  528. integer weight = 400
  529. fontcharset fontcharset = gb2312charset!
  530. fontpitch fontpitch = variable!
  531. string facename = "宋体"
  532. long textcolor = 33554432
  533. borderstyle borderstyle = stylelowered!
  534. end type
  535. type dw_list from u_dw_rbtnfilter within w_dw_update
  536. integer x = 1166
  537. integer y = 60
  538. integer width = 2359
  539. integer height = 1188
  540. integer taborder = 20
  541. boolean bringtotop = true
  542. string dataobject = "dw_dw_list_update"
  543. boolean hscrollbar = true
  544. boolean vscrollbar = true
  545. boolean rbutton_filter_use = true
  546. boolean titleclick_sort_use = true
  547. end type
  548. event rowfocuschanged;call super::rowfocuschanged;THIS.SetRow(currentrow)
  549. THIS.SelectRow(0,FALSE)
  550. THIS.SelectRow(currentrow,TRUE)
  551. end event
  552. event constructor;call super::constructor;dw_list_h = this.height
  553. dw_list_w = this.width
  554. end event
  555. event doubleclicked;call super::doubleclicked;parent.triggerevent('ue_f7')
  556. end event
  557. event clicked;call super::clicked;IF row > 0 THEN THIS.SetRow(row)
  558. end event
  559. type dw_lib from u_dw_rbtnfilter within w_dw_update
  560. integer x = 27
  561. integer y = 60
  562. integer width = 1093
  563. integer height = 1188
  564. integer taborder = 20
  565. boolean bringtotop = true
  566. string dataobject = "dw_lib_list"
  567. boolean vscrollbar = true
  568. boolean rbutton_filter_use = true
  569. boolean titleclick_sort_use = true
  570. boolean setcolumn_visible_use = false
  571. boolean autosave_setlayout_use = false
  572. boolean autosave_columnvisible_use = false
  573. end type
  574. event constructor;call super::constructor;dw_lib_h = this.height
  575. end event
  576. event clicked;call super::clicked;IF row = 0 THEN RETURN
  577. THIS.SetRow(row)
  578. THIS.SelectRow(0,FALSE)
  579. THIS.SelectRow(row,TRUE)
  580. end event
  581. event rowfocuschanged;IF currentrow > 0 THEN
  582. THIS.SelectRow(0,FALSE)
  583. THIS.SelectRow(currentrow,TRUE)
  584. END IF
  585. parent.triggerevent('retrieve_list')
  586. end event
  587. type cb_add from uo_imflatbutton within w_dw_update
  588. integer x = 14
  589. integer y = 1260
  590. integer width = 233
  591. integer height = 164
  592. integer taborder = 50
  593. boolean bringtotop = true
  594. string text = "附加库"
  595. string normalpicname = "imexport.BMP"
  596. integer picsize = 16
  597. toolbaralignment pic_align = alignattop!
  598. boolean border = false
  599. end type
  600. event clicked;call super::clicked;Integer i
  601. String Pathname
  602. String Filename
  603. Integer li_FileNum
  604. Blob ls_str
  605. Boolean lb_find = FALSE
  606. i = GetFileOpenName("Select File",Pathname,Filename,"pbl","Pb Files,*.pbl")
  607. dw_lib.AcceptText()
  608. IF i = 1 AND Trim(Pathname) <> "" AND Trim(Filename) <> "" THEN
  609. FOR j = 1 TO dw_lib.RowCount()
  610. IF Filename = dw_lib.Object.lib_name[j] THEN RETURN
  611. NEXT
  612. // li_FileNum = FileOpen(Pathname,StreamMode!)
  613. // FileRead(li_FileNum,ls_str)
  614. // ls_str = BlobMid(ls_str,29,100)
  615. // FileClose(li_FileNum)
  616. // IF Pos(sys_system_id,Trim(String(ls_str))) > 0 THEN //企精灵为ewiserp,L1为ljerp
  617. dw_lib.Object.lib_name[j] = Filename
  618. dw_lib.Object.lib_path[j] = Pathname
  619. dw_lib.Object.flag[j] = 1
  620. dw_lib.Object.ifdft[j] = 0
  621. j++
  622. // ELSE
  623. // MessageBox('提示','所选PBL不是本产品格式库文件')
  624. // END IF
  625. END IF
  626. dw_lib.SetRow(j)
  627. lib_name = Filename
  628. lib_path = Pathname
  629. wf_retrdw(lib_path)
  630. RETURN
  631. end event
  632. type cb_retrieve from uo_imflatbutton within w_dw_update
  633. integer x = 247
  634. integer y = 1260
  635. integer width = 151
  636. integer height = 164
  637. integer taborder = 40
  638. boolean bringtotop = true
  639. string text = "刷新"
  640. string normalpicname = "refresh.bmp"
  641. integer picsize = 16
  642. toolbaralignment pic_align = alignattop!
  643. boolean border = false
  644. end type
  645. event clicked;call super::clicked;
  646. parent.triggerevent('retrieve_list')
  647. end event
  648. type dw_pb from u_dw_rbtnfilter within w_dw_update
  649. integer x = 18
  650. integer y = 1700
  651. integer width = 3511
  652. integer height = 552
  653. integer taborder = 30
  654. boolean bringtotop = true
  655. string dataobject = "dw_dw_list_pb"
  656. boolean hscrollbar = true
  657. boolean vscrollbar = true
  658. boolean rbutton_filter_use = true
  659. boolean titleclick_sort_use = true
  660. end type
  661. event clicked;call super::clicked;IF row > 0 THEN THIS.SetRow(row)
  662. end event
  663. event rowfocuschanged;call super::rowfocuschanged;THIS.SetRow(currentrow)
  664. THIS.SelectRow(0,FALSE)
  665. THIS.SelectRow(currentrow,TRUE)
  666. end event
  667. type cb_saveupload from uo_imflatbutton within w_dw_update
  668. integer x = 699
  669. integer y = 1260
  670. integer width = 311
  671. integer height = 164
  672. integer taborder = 30
  673. boolean bringtotop = true
  674. string text = "保存并上传"
  675. string normalpicname = "mx1.BMP"
  676. integer picsize = 16
  677. toolbaralignment pic_align = alignattop!
  678. boolean border = false
  679. end type
  680. event clicked;call super::clicked;String ls_temp ,ls_dwsyn,ls_msg
  681. DateTime ld_moddate
  682. Long k
  683. Long rslt = 1,i
  684. String ls_ctag,ls_ctype,ls_product,ls_fromtype,ls_dwname,ls_wname,ls_comments
  685. dw_list.AcceptText()
  686. dw_lib.AcceptText()
  687. IF wf_check(ls_msg) = 0 THEN
  688. rslt = 0
  689. GOTO ext
  690. END IF
  691. ls_temp = dw_lib.Object.lib_path[dw_lib.GetRow()]
  692. FOR i = 1 TO dw_list.RowCount()
  693. IF dw_list.Object.ch[i] = 1 THEN
  694. ls_ctag = dw_list.Object.ctag[i]
  695. ls_ctype = dw_list.Object.ctype[i]
  696. ls_product = String(dw_list.Object.product[i])
  697. ls_fromtype = String(dw_list.Object.fromtype[i])
  698. ls_dwname = dw_list.Object.dwname[i]
  699. ls_wname = dw_list.Object.wname[i]
  700. ls_dwsyn = LibraryExport(ls_temp, ls_ctag, ExportDataWindow!)
  701. ld_moddate = DateTime(Date(Left(ls_ctype,Pos(ls_ctype,' ',1))),Time(Right(ls_ctype,8)))
  702. ls_comments = ls_product + '&' + ls_fromtype + '&'
  703. IF ls_dwname <> '' THEN
  704. ls_comments = ls_comments + ls_wname + '&' + ls_dwname + '&'
  705. END IF
  706. IF LibraryImport(ls_temp, ls_ctag, ImportDataWindow!, ls_dwsyn, ls_msg,ls_comments ) = -1 THEN
  707. ls_msg = ls_ctag + '写入文件' + ls_temp + '失败'
  708. rslt = 0
  709. GOTO ext
  710. END IF
  711. Blob lb_dwsyn
  712. UPDATE sys_autoudpb
  713. SET buildtime = :ld_moddate,
  714. uploadtime = getdate(),
  715. comments = :ls_comments ,
  716. pblname = :sys_pblname
  717. Where Filename = :ls_ctag;
  718. IF sqlca.SQLCode = 0 THEN
  719. IF sqlca.SQLNRows = 0 THEN
  720. INSERT INTO sys_autoudpb
  721. ( filename,
  722. buildtime,
  723. uploadtime,
  724. comments,
  725. pblname)
  726. VALUES ( :ls_ctag,
  727. :ld_moddate,
  728. getdate(),
  729. :ls_comments ,
  730. :sys_pblname) ;
  731. IF sqlca.SQLCode <> 0 THEN
  732. ls_msg = '插入数据窗口列表失败' + sqlca.SQLErrText
  733. rslt = 0
  734. GOTO ext
  735. END IF
  736. END IF
  737. commit;
  738. lb_dwsyn = Blob(ls_dwsyn)
  739. UPDATEBLOB sys_autoudpb
  740. SET filedata = :lb_dwsyn
  741. Where Filename = :ls_ctag;
  742. IF sqlca.SQLCode <> 0 THEN
  743. ls_msg = '更新数据窗口列表失败(1)' + sqlca.SQLErrText
  744. rslt = 0
  745. GOTO ext
  746. END IF
  747. IF ls_fromtype = '0' THEN
  748. UPDATE sys_dft_dwprint_dynamic
  749. SET chnname = :ls_dwname,
  750. dwtype = :ls_wname ,
  751. pblname = :sys_pblname
  752. Where dft_new_dwname = :ls_ctag;
  753. IF sqlca.SQLCode = 0 THEN
  754. IF sqlca.SQLNRows = 0 THEN
  755. Long ll_newid
  756. ll_newid = f_sys_scidentity(0,"sys_dft_dwprint_dynamic","dwprintid",ls_msg,FALSE,sqlca)
  757. IF ll_newid <= 0 THEN
  758. rslt = 0
  759. GOTO ext
  760. END IF
  761. INSERT INTO sys_dft_dwprint_dynamic
  762. ( dwprintid,
  763. dft_new_dwname,
  764. chnname,
  765. dwtype,
  766. ifuse,
  767. ifdefault ,
  768. pblname)
  769. VALUES ( :ll_newid,
  770. :ls_ctag,
  771. :ls_dwname,
  772. :ls_wname,
  773. 1,
  774. 0 ,
  775. :sys_pblname) ;
  776. IF sqlca.SQLCode <> 0 THEN
  777. ls_msg = '插入单据格式重定向列表失败' + sqlca.SQLErrText
  778. rslt = 0
  779. GOTO ext
  780. END IF
  781. END IF
  782. ELSE
  783. ls_msg = '更新单据格式重定向列表失败' + sqlca.SQLErrText
  784. rslt = 0
  785. GOTO ext
  786. END IF
  787. END IF
  788. ELSE
  789. ls_msg = '更新数据窗口列表失败(2)' + sqlca.SQLErrText
  790. rslt = 0
  791. GOTO ext
  792. END IF
  793. END IF
  794. NEXT
  795. ext:
  796. IF rslt = 0 THEN
  797. ROLLBACK;
  798. MessageBox('错误',ls_msg, StopSign!, OK! )
  799. ELSE
  800. COMMIT;
  801. MessageBox('提示','保存并上传成功', Information!, OK! )
  802. wf_retrdw(ls_temp)
  803. dw_pb.Retrieve()
  804. wf_retrpb()
  805. END IF
  806. end event
  807. type cbx_1 from checkbox within w_dw_update
  808. integer x = 1627
  809. integer y = 1316
  810. integer width = 247
  811. integer height = 60
  812. boolean bringtotop = true
  813. integer textsize = -9
  814. integer weight = 400
  815. fontcharset fontcharset = gb2312charset!
  816. fontpitch fontpitch = variable!
  817. string facename = "宋体"
  818. long textcolor = 33554432
  819. long backcolor = 67108864
  820. string text = "全选"
  821. boolean checked = true
  822. end type
  823. event clicked;Long i
  824. dw_list.accepttext()
  825. IF THIS.Checked THEN
  826. FOR i = 1 TO dw_list.RowCount()
  827. dw_list.object.ch[i] = 1
  828. NEXT
  829. ELSE
  830. FOR i = 1 TO dw_list.RowCount()
  831. dw_list.object.ch[i] = 0
  832. NEXT
  833. END IF
  834. end event
  835. event constructor;this.backcolor = 14215660
  836. end event
  837. type cb_save from uo_imflatbutton within w_dw_update
  838. integer x = 398
  839. integer y = 1260
  840. integer width = 151
  841. integer height = 164
  842. integer taborder = 60
  843. boolean bringtotop = true
  844. string text = "保存"
  845. string normalpicname = "save.bmp"
  846. integer picsize = 16
  847. toolbaralignment pic_align = alignattop!
  848. boolean border = false
  849. end type
  850. event clicked;call super::clicked;String ls_temp ,ls_dwsyn,ls_msg
  851. DateTime ld_moddate
  852. Long k
  853. Long rslt = 1,i
  854. String ls_ctag,ls_ctype,ls_dwname,ls_wname,ls_comments,ls_dwsyn_old
  855. dw_list.AcceptText()
  856. dw_lib.AcceptText()
  857. Long ls_product,ls_fromtype
  858. ls_temp = dw_lib.Object.lib_path[dw_lib.GetRow()]
  859. FOR i = 1 TO dw_list.RowCount()
  860. IF dw_list.Object.ch[i] = 1 THEN
  861. ls_ctag = dw_list.Object.ctag[i]
  862. ls_ctype = dw_list.Object.ctype[i]
  863. ls_product = dw_list.Object.product[i]
  864. ls_fromtype = dw_list.Object.fromtype[i]
  865. ls_dwname = dw_list.Object.dwname[i]
  866. ls_wname = dw_list.Object.wname[i]
  867. ls_dwsyn = LibraryExport(ls_temp, ls_ctag, ExportDataWindow!)
  868. ld_moddate = DateTime(Date(Left(ls_ctype,Pos(ls_ctype,' ',1))),Time(Right(ls_ctype,8)))
  869. ls_comments = String(ls_product) + '&' + String(ls_fromtype) + '&'
  870. IF ls_dwname <> '' THEN
  871. ls_comments = ls_comments + ls_wname + '&' + ls_dwname + '&'
  872. END IF
  873. ls_dwsyn_old = LibraryExport(ls_temp, ls_ctag, ExportDataWindow!)
  874. IF ls_dwsyn_old <> ls_dwsyn or dw_list.Object.comments[i] <> ls_comments THEN
  875. IF LibraryImport(ls_temp, ls_ctag, ImportDataWindow!, ls_dwsyn, ls_msg,ls_comments ) = -1 THEN
  876. ls_msg = ls_ctag + '写入文件' + ls_temp + '失败'
  877. rslt = 0
  878. GOTO ext
  879. END IF
  880. END IF
  881. END IF
  882. NEXT
  883. ext:
  884. IF rslt = 0 THEN
  885. MessageBox('错误',ls_msg, StopSign!, OK! )
  886. ELSE
  887. MessageBox('提示','保存成功', Information!, OK! )
  888. wf_retrdw(ls_temp)
  889. END IF
  890. end event
  891. type cb_upload from uo_imflatbutton within w_dw_update
  892. integer x = 549
  893. integer y = 1260
  894. integer width = 151
  895. integer height = 164
  896. integer taborder = 50
  897. boolean bringtotop = true
  898. string text = "上传"
  899. string normalpicname = "mx.BMP"
  900. integer picsize = 16
  901. toolbaralignment pic_align = alignattop!
  902. boolean border = false
  903. end type
  904. event clicked;call super::clicked;String ls_temp ,ls_dwsyn,ls_msg
  905. DateTime ld_moddate
  906. Long k
  907. Long rslt = 1,i
  908. String ls_ctag,ls_ctype,ls_product,ls_fromtype,ls_dwname,ls_wname,ls_comments
  909. dw_list.AcceptText()
  910. dw_lib.AcceptText()
  911. IF wf_check(ls_msg) = 0 THEN
  912. rslt = 0
  913. GOTO ext
  914. END IF
  915. ls_temp = dw_lib.Object.lib_path[dw_lib.GetRow()]
  916. FOR i = 1 TO dw_list.RowCount()
  917. IF dw_list.Object.ch[i] = 1 THEN
  918. ls_ctag = dw_list.Object.ctag[i]
  919. ls_ctype = dw_list.Object.ctype[i]
  920. ls_product = String(dw_list.Object.product[i])
  921. ls_fromtype = String(dw_list.Object.fromtype[i])
  922. ls_dwname = dw_list.Object.dwname[i]
  923. ls_wname = dw_list.Object.wname[i]
  924. ls_dwsyn = LibraryExport(ls_temp, ls_ctag, ExportDataWindow!)
  925. ld_moddate = DateTime(Date(Left(ls_ctype,Pos(ls_ctype,' ',1))),Time(Right(ls_ctype,8)))
  926. ls_comments = ls_product + '&' + ls_fromtype + '&'
  927. IF ls_dwname <> '' THEN
  928. ls_comments = ls_comments + ls_wname + '&' + ls_dwname + '&'
  929. END IF
  930. Blob lb_dwsyn
  931. UPDATE sys_autoudpb
  932. SET buildtime = :ld_moddate,
  933. uploadtime = getdate(),
  934. comments = :ls_comments,
  935. pblname = :sys_pblname
  936. Where Filename = :ls_ctag;
  937. IF sqlca.SQLCode = 0 THEN
  938. IF sqlca.SQLNRows = 0 THEN
  939. INSERT INTO sys_autoudpb
  940. ( filename,
  941. buildtime,
  942. uploadtime,
  943. comments ,
  944. pblname)
  945. VALUES ( :ls_ctag,
  946. :ld_moddate,
  947. getdate(),
  948. :ls_comments,
  949. ::sys_pblname) ;
  950. IF sqlca.SQLCode <> 0 THEN
  951. ls_msg = '插入数据窗口列表失败' + sqlca.SQLErrText
  952. rslt = 0
  953. GOTO ext
  954. END IF
  955. END IF
  956. COMMIT;
  957. lb_dwsyn = Blob(ls_dwsyn)
  958. UPDATEBLOB sys_autoudpb
  959. Set filedata = :lb_dwsyn
  960. Where Filename = :ls_ctag;
  961. IF sqlca.SQLCode <> 0 THEN
  962. ls_msg = '更新数据窗口列表失败(1)' + sqlca.SQLErrText
  963. rslt = 0
  964. GOTO ext
  965. END IF
  966. IF ls_fromtype = '0' THEN
  967. UPDATE sys_dft_dwprint_dynamic
  968. SET chnname = :ls_dwname,
  969. dwtype = :ls_wname ,
  970. pblname = :sys_pblname
  971. Where dft_new_dwname = :ls_ctag;
  972. IF sqlca.SQLCode = 0 THEN
  973. IF sqlca.SQLNRows = 0 THEN
  974. Long ll_newid
  975. ll_newid = f_sys_scidentity(0,"sys_dft_dwprint_dynamic","dwprintid",ls_msg,FALSE,sqlca)
  976. IF ll_newid <= 0 THEN
  977. rslt = 0
  978. GOTO ext
  979. END IF
  980. INSERT INTO sys_dft_dwprint_dynamic
  981. ( dwprintid,
  982. dft_new_dwname,
  983. chnname,
  984. dwtype,
  985. ifuse,
  986. ifdefault ,
  987. pblname)
  988. VALUES ( :ll_newid,
  989. :ls_ctag,
  990. :ls_dwname,
  991. :ls_wname,
  992. 1,
  993. 0 ,
  994. :sys_pblname) ;
  995. IF sqlca.SQLCode <> 0 THEN
  996. ls_msg = '插入单据格式重定向列表失败' + sqlca.SQLErrText
  997. rslt = 0
  998. GOTO ext
  999. END IF
  1000. END IF
  1001. ELSE
  1002. ls_msg = '更新单据格式重定向列表失败' + sqlca.SQLErrText
  1003. rslt = 0
  1004. GOTO ext
  1005. END IF
  1006. END IF
  1007. ELSE
  1008. ls_msg = '更新数据窗口列表失败(2)' + sqlca.SQLErrText
  1009. rslt = 0
  1010. GOTO ext
  1011. END IF
  1012. END IF
  1013. NEXT
  1014. ext:
  1015. IF rslt = 0 THEN
  1016. ROLLBACK;
  1017. MessageBox('错误',ls_msg, StopSign!, OK! )
  1018. ELSE
  1019. COMMIT;
  1020. MessageBox('提示','上传成功', Information!, OK! )
  1021. wf_retrdw(ls_temp)
  1022. dw_pb.Retrieve()
  1023. wf_retrpb()
  1024. END IF
  1025. end event
  1026. type cb_2 from uo_imflatbutton within w_dw_update
  1027. integer x = 1271
  1028. integer y = 1260
  1029. integer width = 151
  1030. integer height = 164
  1031. integer taborder = 40
  1032. boolean bringtotop = true
  1033. string text = "删除"
  1034. string normalpicname = "DELETE.BMP"
  1035. integer picsize = 16
  1036. toolbaralignment pic_align = alignattop!
  1037. boolean border = false
  1038. end type
  1039. event clicked;call super::clicked;if messagebox ("询问","是否确定要删除当前数据窗口吗?删除后将不能恢复",question!,yesno! ) = 2 then return
  1040. String ls_temp ,ls_dwsyn,ls_msg
  1041. DateTime ld_moddate
  1042. Long k
  1043. Long rslt = 1,i
  1044. String ls_ctag
  1045. dw_list.AcceptText()
  1046. dw_lib.AcceptText()
  1047. Long ls_product,ls_fromtype
  1048. ls_temp = dw_lib.Object.lib_path[dw_lib.GetRow()]
  1049. FOR i = 1 TO dw_list.RowCount()
  1050. IF dw_list.Object.ch[i] = 1 THEN
  1051. ls_ctag = dw_list.Object.ctag[i]
  1052. IF LibraryDelete(ls_temp, ls_ctag, ImportDataWindow! ) = -1 THEN
  1053. ls_msg = '删除' + ls_ctag + '失败'
  1054. rslt = 0
  1055. GOTO ext
  1056. END IF
  1057. END IF
  1058. NEXT
  1059. ext:
  1060. IF rslt = 0 THEN
  1061. MessageBox('错误',ls_msg, StopSign!, OK! )
  1062. ELSE
  1063. MessageBox('提示','删除成功', Information!, OK! )
  1064. wf_retrdw(ls_temp)
  1065. END IF
  1066. end event
  1067. type cb_3 from uo_imflatbutton within w_dw_update
  1068. integer x = 1010
  1069. integer y = 1260
  1070. integer width = 261
  1071. integer height = 164
  1072. integer taborder = 40
  1073. boolean bringtotop = true
  1074. string text = "其他功能"
  1075. string normalpicname = "setting.BMP"
  1076. integer picsize = 16
  1077. toolbaralignment pic_align = alignattop!
  1078. boolean border = false
  1079. end type
  1080. event clicked;call super::clicked;m_Dfc_Control_PopupMenu dmPopupMenu
  1081. string menustr
  1082. menustr="Text=导入重定向设置~tEvent=ue_import"
  1083. if len(trim(menustr))<>0 then
  1084. dmPopupMenu = Create m_Dfc_Control_PopupMenu
  1085. dmPopupMenu.mf_BuildMenu(This, menustr)
  1086. dmPopupMenu.mf_PopMenu()
  1087. Destroy dmPopupMenu
  1088. end if
  1089. end event
  1090. type cbx_4 from checkbox within w_dw_update
  1091. integer x = 361
  1092. integer y = 1592
  1093. integer width = 224
  1094. integer height = 60
  1095. boolean bringtotop = true
  1096. integer textsize = -9
  1097. integer weight = 400
  1098. fontcharset fontcharset = gb2312charset!
  1099. fontpitch fontpitch = variable!
  1100. string facename = "宋体"
  1101. long textcolor = 33554432
  1102. long backcolor = 67108864
  1103. string text = "全选"
  1104. end type
  1105. event clicked;Long i
  1106. dw_pb.AcceptText()
  1107. IF THIS.Checked THEN
  1108. FOR i = 1 TO dw_pb.RowCount()
  1109. dw_pb.Object.ch[i] = 1
  1110. NEXT
  1111. ELSE
  1112. FOR i = 1 TO dw_pb.RowCount()
  1113. dw_pb.Object.ch[i] = 0
  1114. NEXT
  1115. END IF
  1116. end event
  1117. event constructor;this.backcolor = 14215660
  1118. end event
  1119. type cb_5 from uo_imflatbutton within w_dw_update
  1120. integer x = 9
  1121. integer y = 1528
  1122. integer width = 165
  1123. integer height = 164
  1124. integer taborder = 20
  1125. boolean bringtotop = true
  1126. string text = "刷新"
  1127. string normalpicname = "refresh.bmp"
  1128. integer picsize = 16
  1129. toolbaralignment pic_align = alignattop!
  1130. boolean border = false
  1131. end type
  1132. event clicked;call super::clicked;wf_retrpb()
  1133. end event
  1134. type cb_7 from uo_imflatbutton within w_dw_update
  1135. integer x = 174
  1136. integer y = 1528
  1137. integer width = 165
  1138. integer height = 164
  1139. integer taborder = 20
  1140. boolean bringtotop = true
  1141. string text = "删除"
  1142. string normalpicname = "DELETE.BMP"
  1143. integer picsize = 16
  1144. toolbaralignment pic_align = alignattop!
  1145. boolean border = false
  1146. end type
  1147. event clicked;call super::clicked;IF MessageBox ("询问","是否确定要删除当前数据窗口资料吗?删除后将不能恢复",question!,yesno! ) = 2 THEN RETURN
  1148. String ls_msg,ls_filename
  1149. Int i,rslt = 1
  1150. dw_pb.AcceptText()
  1151. FOR i = 1 TO dw_pb.RowCount()
  1152. IF dw_pb.Object.ch[i] = 1 THEN
  1153. ls_filename = dw_pb.Object.Filename[i]
  1154. DELETE FROM sys_autoudpb
  1155. Where Filename = :ls_filename;
  1156. IF sqlca.SQLCode <> 0 THEN
  1157. ls_msg = '删除失败' + sqlca.SQLErrText
  1158. rslt = 0
  1159. GOTO ext
  1160. END IF
  1161. END IF
  1162. NEXT
  1163. ext:
  1164. IF rslt = 0 THEN
  1165. MessageBox('错误',ls_msg, StopSign!, OK! )
  1166. ROLLBACK;
  1167. ELSE
  1168. MessageBox('提示','删除成功', Information!, OK! )
  1169. COMMIT;
  1170. dw_pb.Retrieve()
  1171. wf_retrpb()
  1172. END IF
  1173. end event
  1174. type p_resize from picture within w_dw_update
  1175. integer x = 1125
  1176. integer y = 60
  1177. integer width = 32
  1178. integer height = 1188
  1179. boolean bringtotop = true
  1180. string picturename = "w_resize_2.bmp"
  1181. boolean focusrectangle = false
  1182. end type
  1183. event clicked;IF THIS.picturename = 'w_resize_1.bmp' THEN
  1184. THIS.picturename = 'w_resize_2.bmp'
  1185. THIS.X = 1125
  1186. dw_list.X = 1166
  1187. dw_lib.Visible = TRUE
  1188. f_SetProfileString (sys_empid,dw_lib.DataObject, "iflib",'1')
  1189. ELSE
  1190. THIS.picturename = 'w_resize_1.bmp'
  1191. THIS.X = 0
  1192. dw_list.X = p_resize.Width + 5
  1193. dw_lib.Visible = FALSE
  1194. f_SetProfileString (sys_empid,dw_lib.DataObject, "iflib",'0')
  1195. END IF
  1196. PARENT.TriggerEvent(Resize!)
  1197. end event
  1198. type gb_1 from groupbox within w_dw_update
  1199. integer y = 1464
  1200. integer width = 3547
  1201. integer height = 804
  1202. integer taborder = 30
  1203. integer textsize = -9
  1204. integer weight = 400
  1205. fontcharset fontcharset = gb2312charset!
  1206. fontpitch fontpitch = variable!
  1207. string facename = "宋体"
  1208. long textcolor = 33554432
  1209. long backcolor = 67108864
  1210. string text = "数据库数据窗口"
  1211. end type
  1212. event constructor;this.backcolor = 14215660
  1213. end event
  1214. type gb_2 from groupbox within w_dw_update
  1215. integer width = 3547
  1216. integer height = 1444
  1217. integer taborder = 10
  1218. integer textsize = -9
  1219. integer weight = 400
  1220. fontcharset fontcharset = gb2312charset!
  1221. fontpitch fontpitch = variable!
  1222. string facename = "宋体"
  1223. long textcolor = 33554432
  1224. long backcolor = 67108864
  1225. string text = "格式库文件数据窗口"
  1226. end type
  1227. event constructor;
  1228. this.backcolor = 14215660
  1229. end event
  1230. type ln_bar2 from line within w_dw_update
  1231. boolean visible = false
  1232. long linecolor = 16777215
  1233. integer linethickness = 4
  1234. integer beginx = 9
  1235. integer beginy = 172
  1236. integer endx = 3273
  1237. integer endy = 172
  1238. end type
  1239. type ln_bar from line within w_dw_update
  1240. boolean visible = false
  1241. long linecolor = 268435456
  1242. integer linethickness = 4
  1243. integer beginy = 168
  1244. integer endx = 3200
  1245. integer endy = 168
  1246. end type
  1247. type r_bar from rectangle within w_dw_update
  1248. long linecolor = 16777215
  1249. integer linethickness = 4
  1250. long fillcolor = 1073741824
  1251. integer x = 3351
  1252. integer width = 87
  1253. integer height = 68
  1254. end type
  1255. event constructor;this.fillcolor = 14215660
  1256. this.linecolor = 14215660
  1257. this.x = -1
  1258. this.y = -1
  1259. this.height = ln_bar.beginy - 5
  1260. end event