w_sys_option_def.srw 32 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493
  1. $PBExportHeader$w_sys_option_def.srw
  2. forward
  3. global type w_sys_option_def from w_publ_base
  4. end type
  5. type ln_bar from line within w_sys_option_def
  6. end type
  7. type ln_bar2 from line within w_sys_option_def
  8. end type
  9. type r_bar from rectangle within w_sys_option_def
  10. end type
  11. type tab_1 from tab within w_sys_option_def
  12. end type
  13. type tabpage_7 from userobject within tab_1
  14. end type
  15. type dw_sys_option from u_dw_rbtnfilter within tabpage_7
  16. end type
  17. type tv_sys_option from treeview within tabpage_7
  18. end type
  19. type tabpage_7 from userobject within tab_1
  20. dw_sys_option dw_sys_option
  21. tv_sys_option tv_sys_option
  22. end type
  23. type tabpage_3 from userobject within tab_1
  24. end type
  25. type cbx_1 from checkbox within tabpage_3
  26. end type
  27. type cb_7 from uo_imflatbutton within tabpage_3
  28. end type
  29. type cb_6 from uo_imflatbutton within tabpage_3
  30. end type
  31. type cb_1 from uo_imflatbutton within tabpage_3
  32. end type
  33. type dw_4 from u_dw_rbtnfilter within tabpage_3
  34. end type
  35. type tabpage_3 from userobject within tab_1
  36. cbx_1 cbx_1
  37. cb_7 cb_7
  38. cb_6 cb_6
  39. cb_1 cb_1
  40. dw_4 dw_4
  41. end type
  42. type tabpage_1 from userobject within tab_1
  43. end type
  44. type cb_3 from uo_imflatbutton within tabpage_1
  45. end type
  46. type dw_3 from u_dw_rbtnfilter within tabpage_1
  47. end type
  48. type tabpage_1 from userobject within tab_1
  49. cb_3 cb_3
  50. dw_3 dw_3
  51. end type
  52. type tabpage_4 from userobject within tab_1
  53. end type
  54. type cbx_2 from checkbox within tabpage_4
  55. end type
  56. type cb_9 from uo_imflatbutton within tabpage_4
  57. end type
  58. type cb_8 from uo_imflatbutton within tabpage_4
  59. end type
  60. type cb_5 from uo_imflatbutton within tabpage_4
  61. end type
  62. type cb_4 from uo_imflatbutton within tabpage_4
  63. end type
  64. type dw_1 from datawindow within tabpage_4
  65. end type
  66. type tabpage_4 from userobject within tab_1
  67. cbx_2 cbx_2
  68. cb_9 cb_9
  69. cb_8 cb_8
  70. cb_5 cb_5
  71. cb_4 cb_4
  72. dw_1 dw_1
  73. end type
  74. type tabpage_2 from userobject within tab_1
  75. end type
  76. type cb_11 from uo_imflatbutton within tabpage_2
  77. end type
  78. type cb_10 from uo_imflatbutton within tabpage_2
  79. end type
  80. type cb_2 from uo_imflatbutton within tabpage_2
  81. end type
  82. type dw_5 from u_dw_rbtnfilter within tabpage_2
  83. end type
  84. type tabpage_2 from userobject within tab_1
  85. cb_11 cb_11
  86. cb_10 cb_10
  87. cb_2 cb_2
  88. dw_5 dw_5
  89. end type
  90. type tab_1 from tab within w_sys_option_def
  91. tabpage_7 tabpage_7
  92. tabpage_3 tabpage_3
  93. tabpage_1 tabpage_1
  94. tabpage_4 tabpage_4
  95. tabpage_2 tabpage_2
  96. end type
  97. end forward
  98. global type w_sys_option_def from w_publ_base
  99. integer width = 3611
  100. integer height = 2380
  101. string title = "系统选项设置"
  102. boolean maxbox = true
  103. windowstate windowstate = maximized!
  104. event retr_mx ( )
  105. event retr_zlmx ( )
  106. ln_bar ln_bar
  107. ln_bar2 ln_bar2
  108. r_bar r_bar
  109. tab_1 tab_1
  110. end type
  111. global w_sys_option_def w_sys_option_def
  112. type variables
  113. datawindow dw_1,dw_2,dw_3,dw_5
  114. datawindow dw_sys_option
  115. String ins_sqlerrtext
  116. Boolean ls_update_flag = TRUE
  117. Long modifyrow_no = 0
  118. string is_module
  119. boolean dw_edit_mode_hile = false
  120. end variables
  121. forward prototypes
  122. public function integer wf_dft_face ()
  123. public subroutine wf_refresh_option (string arg_module)
  124. public function integer wf_hidecol_face ()
  125. public subroutine wf_refresh_hilecol ()
  126. end prototypes
  127. public function integer wf_dft_face ();if dw_edit_mode then
  128. tab_1.tabpage_3.cb_6.text="放弃[&E]"
  129. tab_1.tabpage_3.cb_1.text="保存[&S]"
  130. else
  131. tab_1.tabpage_3.cb_6.text="修改[&E]"
  132. tab_1.tabpage_3.cb_1.text="新建[&S]"
  133. end if
  134. tab_1.tabpage_3.cbx_1.enabled = not dw_edit_mode
  135. tab_1.tabpage_3.cb_1.triggerevent('ue_textchange')
  136. tab_1.tabpage_3.cb_6.triggerevent('ue_textchange')
  137. return 1
  138. end function
  139. public subroutine wf_refresh_option (string arg_module);Long i
  140. Long ll_row
  141. uo_sys_option uo_opt
  142. uo_opt = CREATE uo_sys_option
  143. tab_1.tabpage_7.dw_sys_option.SetRedraw(FALSE)
  144. tab_1.tabpage_7.dw_sys_option.Reset()
  145. FOR i = 1 TO UpperBound(s_sys_opt)
  146. IF s_sys_opt[i].optionname = '' THEN CONTINUE
  147. if s_sys_opt[i].module_int = 100 THEN CONTINUE
  148. IF arg_module = '' OR &
  149. arg_module <> '' AND arg_module = s_sys_opt[i].module THEN
  150. IF Mid(sys_optionstr,Long(s_sys_opt[i].optionid),1) <> '1' THEN CONTINUE
  151. ll_row = tab_1.tabpage_7.dw_sys_option.InsertRow(0)
  152. tab_1.tabpage_7.dw_sys_option.Object.module[ll_row] = s_sys_opt[i].module
  153. tab_1.tabpage_7.dw_sys_option.Object.optionid[ll_row] = s_sys_opt[i].optionid
  154. tab_1.tabpage_7.dw_sys_option.Object.optionname[ll_row] = s_sys_opt[i].optionname
  155. tab_1.tabpage_7.dw_sys_option.Object.itype[ll_row] = s_sys_opt[i].itype
  156. String ls_value,arg_msg, ls_valuedisplay
  157. IF uo_opt.uof_get_sys_option_value(s_sys_opt[i].optionid,ls_value,arg_msg) = 0 THEN
  158. ls_value = s_sys_opt[i].dftvalue
  159. END IF
  160. tab_1.tabpage_7.dw_sys_option.Object.dftvalue[ll_row] = ls_value
  161. IF s_sys_opt[i].itype = 0 THEN
  162. IF ls_value = '0' THEN
  163. tab_1.tabpage_7.dw_sys_option.Object.valuedisplay[ll_row] = '否'
  164. ELSEIF ls_value = '1' THEN
  165. tab_1.tabpage_7.dw_sys_option.Object.valuedisplay[ll_row] = '是'
  166. ELSE
  167. tab_1.tabpage_7.dw_sys_option.Object.valuedisplay[ll_row] = ''
  168. END IF
  169. ELSEIF s_sys_opt[i].itype = 1 OR s_sys_opt[i].itype = 2 OR s_sys_opt[i].itype = 3 THEN
  170. tab_1.tabpage_7.dw_sys_option.Object.valuedisplay[ll_row] = ls_value
  171. ELSEIF s_sys_opt[i].itype = 4 THEN
  172. uo_opt.uof_get_sys_option_displayvalue(ls_value,s_sys_opt[i].dscrp,ls_valuedisplay,arg_msg)
  173. tab_1.tabpage_7.dw_sys_option.Object.valuedisplay[ll_row] = ls_valuedisplay
  174. ELSE
  175. tab_1.tabpage_7.dw_sys_option.Object.valuedisplay[ll_row] = ''
  176. END IF
  177. tab_1.tabpage_7.dw_sys_option.Object.module_int[ll_row] = s_sys_opt[i].module_int
  178. tab_1.tabpage_7.dw_sys_option.Object.dscrp[ll_row] = s_sys_opt[i].dscrp
  179. END IF
  180. NEXT
  181. tab_1.tabpage_7.dw_sys_option.SetSort('module_int asc,optionid asc')
  182. tab_1.tabpage_7.dw_sys_option.Sort()
  183. tab_1.tabpage_7.dw_sys_option.SetRedraw(TRUE)
  184. DESTROY uo_opt
  185. end subroutine
  186. public function integer wf_hidecol_face ();IF dw_edit_mode_hile THEN
  187. tab_1.tabpage_2.cb_10.Text = "放弃[&E]"
  188. tab_1.tabpage_2.cb_2.Enabled = TRUE
  189. ELSE
  190. tab_1.tabpage_2.cb_10.Text = "修改[&E]"
  191. tab_1.tabpage_2.cb_2.Enabled = FALSE
  192. END IF
  193. tab_1.tabpage_2.cb_10.TriggerEvent('ue_textchange')
  194. RETURN 1
  195. end function
  196. public subroutine wf_refresh_hilecol ();Long i
  197. Long ll_row
  198. String ls_value
  199. String arg_msg
  200. uo_sys_option uo_opt
  201. uo_opt = CREATE uo_sys_option
  202. dw_5.SetRedraw(FALSE)
  203. dw_5.Reset()
  204. FOR i = 200 TO UpperBound(s_sys_opt)
  205. IF s_sys_opt[i].module_int <> 100 then continue
  206. // IF s_sys_opt[i].optionname = 'status' &
  207. // OR s_sys_opt[i].optionname = 'woodcode' &
  208. // OR s_sys_opt[i].optionname = 'pcode' &
  209. // OR s_sys_opt[i].optionname = 'mtrlsectype' &
  210. // OR s_sys_opt[i].optionname = 'zxmtrlmode' &
  211. // OR s_sys_opt[i].optionname = 'addqty' THEN
  212. ll_row = dw_5.GetRow()
  213. IF dw_5.GetRow() > 0 THEN
  214. IF dw_5.Object.optionid[ll_row] <> 0 THEN
  215. ll_row = dw_5.InsertRow (0)
  216. ELSE
  217. ll_row = dw_5.GetRow()
  218. END IF
  219. ELSE
  220. ll_row = dw_5.InsertRow (0)
  221. END IF
  222. //ll_row = dw_5.InsertRow(0)
  223. CHOOSE CASE s_sys_opt[i].optionname
  224. CASE 'status'
  225. dw_5.Object.optionname[ll_row] = sys_option_change_status
  226. CASE 'woodcode'
  227. dw_5.Object.optionname[ll_row] = sys_option_change_woodcode
  228. CASE 'pcode'
  229. dw_5.Object.optionname[ll_row] = sys_option_change_pcode
  230. CASE 'mtrlsectype'
  231. dw_5.Object.optionname[ll_row] = sys_option_change_mtrlsectype
  232. CASE 'zxmtrlmode'
  233. dw_5.Object.optionname[ll_row] = sys_option_change_zxmtrlmode
  234. CASE 'addqty'
  235. dw_5.Object.optionname[ll_row] = sys_option_change_addqty
  236. CASE 'plancode'
  237. dw_5.Object.optionname[ll_row] = "批号"
  238. CASE ELSE
  239. CONTINUE
  240. //dw_5.Object.optionname[ll_row] = s_sys_opt[i].optionname
  241. END CHOOSE
  242. dw_5.Object.optionid[ll_row] = Long(s_sys_opt[i].optionid)
  243. IF uo_opt.uof_get_sys_option_value(s_sys_opt[i].optionid,ls_value,arg_msg) = 0 THEN
  244. ls_value = s_sys_opt[i].dftvalue
  245. END IF
  246. dw_5.Object.Value[ll_row] = Long(ls_value)
  247. // END IF
  248. NEXT
  249. dw_5.SetSort('optionid asc')
  250. dw_5.Sort()
  251. dw_5.SetRedraw(TRUE)
  252. DESTROY uo_opt
  253. end subroutine
  254. on w_sys_option_def.create
  255. int iCurrent
  256. call super::create
  257. this.ln_bar=create ln_bar
  258. this.ln_bar2=create ln_bar2
  259. this.r_bar=create r_bar
  260. this.tab_1=create tab_1
  261. iCurrent=UpperBound(this.Control)
  262. this.Control[iCurrent+1]=this.ln_bar
  263. this.Control[iCurrent+2]=this.ln_bar2
  264. this.Control[iCurrent+3]=this.r_bar
  265. this.Control[iCurrent+4]=this.tab_1
  266. end on
  267. on w_sys_option_def.destroy
  268. call super::destroy
  269. destroy(this.ln_bar)
  270. destroy(this.ln_bar2)
  271. destroy(this.r_bar)
  272. destroy(this.tab_1)
  273. end on
  274. event open;call super::open;
  275. wf_refresh_option('')
  276. dw_1 = tab_1.tabpage_1.dw_3
  277. dw_2 = tab_1.tabpage_3.dw_4
  278. dw_3 = tab_1.tabpage_4.dw_1
  279. dw_5 = tab_1.tabpage_2.dw_5
  280. dw_sys_option = tab_1.tabpage_7.dw_sys_option
  281. dw_1.SetTransObject(sqlca)
  282. dw_1.Retrieve()
  283. dw_2.SetTransObject(sqlca)
  284. dw_2.Retrieve(0)
  285. dw_3.SetTransObject(sqlca)
  286. dw_3.Retrieve()
  287. wf_refresh_hilecol()
  288. end event
  289. event resize;call super::resize;ln_bar.EndX = THIS.Width
  290. ln_bar2.EndX = THIS.Width
  291. r_bar.Width = THIS.Width
  292. tab_1.Width = THIS.Width - tab_1.X - 40
  293. tab_1.Height = THIS.Height - tab_1.Y - 150
  294. tab_1.tabpage_7.tv_sys_option.Height = tab_1.Height - 30
  295. dw_sys_option.Height = tab_1.Height - 30
  296. dw_sys_option.Width = THIS.Width - (3600 - 2231)
  297. dw_1.Width = THIS.Width - (3600 - 2898)
  298. dw_1.Height = THIS.Height - (2300 - 1852) - 50
  299. dw_3.Width = THIS.Width - (3600 - 2898)
  300. dw_3.Height = THIS.Height - (2300 - 1852) - 50
  301. tab_1.tabpage_3.dw_4.Width = THIS.Width - (3600 - 2898)
  302. tab_1.tabpage_3.dw_4.Height = THIS.Height - (2300 - 1852) - 50
  303. dw_5.Width = THIS.Width - (3600 - 2898)
  304. dw_5.Height = THIS.Height - (2300 - 1852) - 50
  305. end event
  306. type cb_func from w_publ_base`cb_func within w_sys_option_def
  307. boolean visible = false
  308. integer x = 165
  309. integer width = 306
  310. integer height = 164
  311. string text = "危险功能"
  312. end type
  313. event cb_func::clicked;open(w_dangus)
  314. //Long ll_i
  315. //Int rslt = 1
  316. //
  317. //Long ll_funcid,ll_parentid
  318. //Int li_functype
  319. //String ls_treename,ls_menuname
  320. //
  321. //INSERT INTO sys_func_pwr
  322. // (funcid,parentid,functype,treename,menuname)
  323. // Values(256,0,0,'销售管理','销售');
  324. //IF sqlca.SQLCode <> 0 THEN
  325. // rslt = 0
  326. // GOTO ext
  327. //END IF
  328. //
  329. //INSERT INTO sys_func_pwr
  330. // (funcid,parentid,functype,treename,menuname)
  331. // Values(257,0,0,'生产管理','生产');
  332. //IF sqlca.SQLCode <> 0 THEN
  333. // rslt = 0
  334. // GOTO ext
  335. //END IF
  336. //
  337. //INSERT INTO sys_func_pwr
  338. // (funcid,parentid,functype,treename,menuname)
  339. // Values(258,0,0,'仓库管理','仓库');
  340. //IF sqlca.SQLCode <> 0 THEN
  341. // rslt = 0
  342. // GOTO ext
  343. //END IF
  344. //
  345. //INSERT INTO sys_func_pwr
  346. // (funcid,parentid,functype,treename,menuname)
  347. // Values(259,0,0,'采购管理','采购');
  348. //IF sqlca.SQLCode <> 0 THEN
  349. // rslt = 0
  350. // GOTO ext
  351. //END IF
  352. //
  353. //INSERT INTO sys_func_pwr
  354. // (funcid,parentid,functype,treename,menuname)
  355. // Values(260,0,0,'人事工资','人事工资');
  356. //IF sqlca.SQLCode <> 0 THEN
  357. // rslt = 0
  358. // GOTO ext
  359. //END IF
  360. //
  361. //INSERT INTO sys_func_pwr
  362. // (funcid,parentid,functype,treename,menuname)
  363. // Values(261,0,0,'财务管理','财务');
  364. //
  365. //INSERT INTO sys_func_pwr
  366. // (funcid,parentid,functype,treename,menuname)
  367. // Values(262,0,0,'系统维护','系统');
  368. //IF sqlca.SQLCode <> 0 THEN
  369. // rslt = 0
  370. // GOTO ext
  371. //END IF
  372. //
  373. //INSERT INTO sys_func_pwr
  374. // (funcid,parentid,functype,treename,menuname)
  375. // Values(263,0,9,'特殊权限','特殊权限');
  376. //IF sqlca.SQLCode <> 0 THEN
  377. // rslt = 0
  378. // GOTO ext
  379. //END IF
  380. //
  381. //
  382. //
  383. //FOR ll_i = 1 TO 255
  384. // IF s_powerlinfo[ll_i].powerid = 0 THEN CONTINUE
  385. // ll_funcid = s_powerlinfo[ll_i].powerid
  386. // CHOOSE CASE s_powerlinfo[ll_i].powertype
  387. // CASE '销售管理'
  388. // ll_parentid = 256
  389. // CASE '生产管理'
  390. // ll_parentid = 257
  391. // CASE '仓库管理'
  392. // ll_parentid = 258
  393. // CASE '采购管理'
  394. // ll_parentid = 259
  395. // CASE '人事工资'
  396. // ll_parentid = 260
  397. // CASE '财务管理'
  398. // ll_parentid = 261
  399. // CASE '系统维护'
  400. // ll_parentid = 262
  401. // CASE '特殊权限'
  402. // ll_parentid = 263
  403. // END CHOOSE
  404. // ls_treename = s_powerlinfo[ll_i].powername
  405. // ls_menuname = s_powerlinfo[ll_i].powername
  406. //
  407. // INSERT INTO sys_func_pwr
  408. // (funcid,parentid,functype,treename,menuname)
  409. // Values(:ll_funcid,:ll_parentid,9,:ls_treename,:ls_menuname);
  410. //
  411. // IF sqlca.SQLCode <> 0 THEN
  412. // rslt = 0
  413. // GOTO ext
  414. // END IF
  415. //
  416. //NEXT
  417. //
  418. //ext :
  419. //IF rslt = 0 THEN
  420. // ROLLBACK;
  421. // MessageBox('','error')
  422. //ELSE
  423. // COMMIT;
  424. // MessageBox('','ok')
  425. //END IF
  426. //
  427. //
  428. //
  429. //
  430. end event
  431. type cb_exit from w_publ_base`cb_exit within w_sys_option_def
  432. integer x = 0
  433. integer width = 165
  434. integer height = 164
  435. integer picsize = 16
  436. toolbaralignment pic_align = alignattop!
  437. boolean border = false
  438. end type
  439. type ln_bar from line within w_sys_option_def
  440. long linecolor = 268435456
  441. integer linethickness = 4
  442. integer beginy = 172
  443. integer endx = 2007
  444. integer endy = 172
  445. end type
  446. type ln_bar2 from line within w_sys_option_def
  447. long linecolor = 16777215
  448. integer linethickness = 4
  449. integer beginy = 176
  450. integer endx = 2039
  451. integer endy = 176
  452. end type
  453. type r_bar from rectangle within w_sys_option_def
  454. long linecolor = 16777215
  455. integer linethickness = 4
  456. long fillcolor = 1073741824
  457. integer x = 2139
  458. integer width = 146
  459. integer height = 68
  460. end type
  461. event constructor;this.fillcolor = 14215660
  462. this.linecolor = 14215660
  463. this.x = -1
  464. this.y = -1
  465. this.height = ln_bar.beginy - 5
  466. end event
  467. type tab_1 from tab within w_sys_option_def
  468. integer y = 184
  469. integer width = 3529
  470. integer height = 1988
  471. integer taborder = 30
  472. integer textsize = -9
  473. integer weight = 400
  474. fontcharset fontcharset = gb2312charset!
  475. fontpitch fontpitch = variable!
  476. string facename = "宋体"
  477. long backcolor = 134217739
  478. boolean raggedright = true
  479. boolean boldselectedtext = true
  480. boolean perpendiculartext = true
  481. tabposition tabposition = tabsonleft!
  482. integer selectedtab = 1
  483. tabpage_7 tabpage_7
  484. tabpage_3 tabpage_3
  485. tabpage_1 tabpage_1
  486. tabpage_4 tabpage_4
  487. tabpage_2 tabpage_2
  488. end type
  489. on tab_1.create
  490. this.tabpage_7=create tabpage_7
  491. this.tabpage_3=create tabpage_3
  492. this.tabpage_1=create tabpage_1
  493. this.tabpage_4=create tabpage_4
  494. this.tabpage_2=create tabpage_2
  495. this.Control[]={this.tabpage_7,&
  496. this.tabpage_3,&
  497. this.tabpage_1,&
  498. this.tabpage_4,&
  499. this.tabpage_2}
  500. end on
  501. on tab_1.destroy
  502. destroy(this.tabpage_7)
  503. destroy(this.tabpage_3)
  504. destroy(this.tabpage_1)
  505. destroy(this.tabpage_4)
  506. destroy(this.tabpage_2)
  507. end on
  508. event doubleclicked;cb_func.Visible = NOT cb_func.Visible
  509. end event
  510. type tabpage_7 from userobject within tab_1
  511. integer x = 608
  512. integer y = 16
  513. integer width = 2903
  514. integer height = 1956
  515. long backcolor = 134217739
  516. string text = "系统选项"
  517. long tabtextcolor = 33554432
  518. long tabbackcolor = 134217739
  519. long picturemaskcolor = 536870912
  520. dw_sys_option dw_sys_option
  521. tv_sys_option tv_sys_option
  522. end type
  523. on tabpage_7.create
  524. this.dw_sys_option=create dw_sys_option
  525. this.tv_sys_option=create tv_sys_option
  526. this.Control[]={this.dw_sys_option,&
  527. this.tv_sys_option}
  528. end on
  529. on tabpage_7.destroy
  530. destroy(this.dw_sys_option)
  531. destroy(this.tv_sys_option)
  532. end on
  533. type dw_sys_option from u_dw_rbtnfilter within tabpage_7
  534. integer x = 667
  535. integer width = 2231
  536. integer height = 1952
  537. integer taborder = 20
  538. string dataobject = "dw_sys_option"
  539. boolean hscrollbar = true
  540. boolean vscrollbar = true
  541. boolean hsplitscroll = true
  542. boolean rbutton_filter_use = true
  543. boolean rbutton_setposition_use = true
  544. boolean titleclick_sort_use = true
  545. end type
  546. event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN
  547. THIS.SelectRow(0,FALSE)
  548. THIS.SelectRow(currentrow,TRUE)
  549. END IF
  550. end event
  551. event doubleclicked;call super::doubleclicked;IF row > 0 THEN
  552. s_sys_option ls_s_opt,ls_s_opt_ref
  553. ls_s_opt.optionid = THIS.Object.optionid[row]
  554. ls_s_opt.optionname = THIS.Object.optionname[row]
  555. ls_s_opt.dftvalue = THIS.Object.dftvalue[row]
  556. ls_s_opt.itype = THIS.Object.itype[row]
  557. ls_s_opt.dscrp = THIS.Object.dscrp[row]
  558. CHOOSE CASE ls_s_opt.itype
  559. CASE 0
  560. OpenWithParm(w_sys_option_def_itype0,ls_s_opt)
  561. CASE 1
  562. OpenWithParm(w_sys_option_def_itype1,ls_s_opt)
  563. CASE 2
  564. OpenWithParm(w_sys_option_def_itype2,ls_s_opt)
  565. CASE 3
  566. OpenWithParm(w_sys_option_def_itype3,ls_s_opt)
  567. CASE 4
  568. OpenWithParm(w_sys_option_def_itype4,ls_s_opt)
  569. END CHOOSE
  570. ls_s_opt_ref = Message.PowerObjectParm
  571. IF ls_s_opt_ref.ifset = 0 THEN RETURN
  572. String arg_msg
  573. uo_sys_option uo_opt
  574. uo_opt = CREATE uo_sys_option
  575. IF uo_opt.uof_add_sys_option(ls_s_opt.optionid,&
  576. ls_s_opt.optionname,ls_s_opt_ref.dftvalue,arg_msg,TRUE) = 0 THEN
  577. MessageBox('提示',arg_msg)
  578. DESTROY uo_opt
  579. RETURN
  580. END IF
  581. uo_opt.uof_sys_option()
  582. DESTROY uo_opt
  583. THIS.Object.dftvalue[row] = ls_s_opt_ref.dftvalue
  584. IF ls_s_opt_ref.valuedisplay <> '' THEN
  585. THIS.Object.valuedisplay[row] = ls_s_opt_ref.valuedisplay
  586. ELSE
  587. THIS.Object.valuedisplay[row] = ls_s_opt_ref.dftvalue
  588. END IF
  589. //wf_refresh_option(is_module)
  590. END IF
  591. end event
  592. type tv_sys_option from treeview within tabpage_7
  593. integer y = 4
  594. integer width = 663
  595. integer height = 1952
  596. integer taborder = 10
  597. integer textsize = -9
  598. integer weight = 400
  599. fontcharset fontcharset = gb2312charset!
  600. fontpitch fontpitch = variable!
  601. string facename = "宋体"
  602. long textcolor = 33554432
  603. borderstyle borderstyle = stylelowered!
  604. boolean linesatroot = true
  605. string picturename[] = {"graphics\content.BMP","graphics\Shell32 005.bmp"}
  606. long picturemaskcolor = 536870912
  607. long statepicturemaskcolor = 536870912
  608. end type
  609. event constructor;Long ll_handl
  610. ll_handl = THIS.InsertItemLast(0,sys_message_title,1)
  611. THIS.InsertItemLast(ll_handl,'系统',2)
  612. THIS.InsertItemLast(ll_handl,'应收,应付',2)
  613. //THIS.InsertItemLast(ll_handl,'应付',2)
  614. THIS.InsertItemLast(ll_handl,'销售',2)
  615. THIS.InsertItemLast(ll_handl,'采购,外协',2)
  616. THIS.InsertItemLast(ll_handl,'仓库',2)
  617. THIS.InsertItemLast(ll_handl,'生产辅助',2)
  618. THIS.InsertItemLast(ll_handl,'工资',2)
  619. THIS.ExpandItem(ll_handl)
  620. end event
  621. event selectionchanged;Long ll_hand
  622. treeviewitem tvi
  623. ll_hand = THIS.FindItem(CurrentTreeItem!,0)
  624. IF ll_hand = 1 THEN
  625. is_module = ''
  626. ELSE
  627. THIS.GetItem(ll_hand,tvi)
  628. is_module = tvi.Label
  629. END IF
  630. wf_refresh_option(is_module)
  631. end event
  632. type tabpage_3 from userobject within tab_1
  633. event create ( )
  634. event destroy ( )
  635. integer x = 608
  636. integer y = 16
  637. integer width = 2903
  638. integer height = 1956
  639. long backcolor = 134217739
  640. string text = "单据打印格式重定向"
  641. long tabtextcolor = 33554432
  642. long tabbackcolor = 134217739
  643. long picturemaskcolor = 536870912
  644. cbx_1 cbx_1
  645. cb_7 cb_7
  646. cb_6 cb_6
  647. cb_1 cb_1
  648. dw_4 dw_4
  649. end type
  650. on tabpage_3.create
  651. this.cbx_1=create cbx_1
  652. this.cb_7=create cb_7
  653. this.cb_6=create cb_6
  654. this.cb_1=create cb_1
  655. this.dw_4=create dw_4
  656. this.Control[]={this.cbx_1,&
  657. this.cb_7,&
  658. this.cb_6,&
  659. this.cb_1,&
  660. this.dw_4}
  661. end on
  662. on tabpage_3.destroy
  663. destroy(this.cbx_1)
  664. destroy(this.cb_7)
  665. destroy(this.cb_6)
  666. destroy(this.cb_1)
  667. destroy(this.dw_4)
  668. end on
  669. type cbx_1 from checkbox within tabpage_3
  670. integer x = 951
  671. integer y = 24
  672. integer width = 411
  673. integer height = 60
  674. integer textsize = -9
  675. integer weight = 400
  676. fontcharset fontcharset = gb2312charset!
  677. fontpitch fontpitch = variable!
  678. string facename = "宋体"
  679. long textcolor = 33554432
  680. long backcolor = 134217739
  681. string text = "显示默认格式"
  682. end type
  683. event clicked;int li_dft
  684. if this.checked then
  685. cb_1.enabled = false
  686. cb_6.enabled = false
  687. cb_7.enabled = false
  688. li_dft = -1
  689. else
  690. cb_1.enabled = true
  691. cb_6.enabled = true
  692. cb_7.enabled = true
  693. li_dft = 0
  694. end if
  695. dw_4.Retrieve(li_dft)
  696. end event
  697. type cb_7 from uo_imflatbutton within tabpage_3
  698. integer x = 603
  699. integer height = 96
  700. integer taborder = 60
  701. string text = "删除"
  702. string normalpicname = "delete.bmp"
  703. end type
  704. event clicked;call super::clicked;IF MessageBox (publ_operator,"是否确定要删除当前记录?(选择确定后记录将不可恢复)",Question!,YesNo! ) = 2 THEN
  705. RETURN
  706. END IF
  707. String arg_msg
  708. IF DW_2.GetRow() <= 0 THEN
  709. MessageBox('','没有操作目标记录!')
  710. RETURN
  711. END IF
  712. DW_2.SetRedraw (FALSE)
  713. DW_2.DeleteRow (0)
  714. DW_2.TriggerEvent (RowFocusChanged!)
  715. IF DW_2.Update() = -1 THEN
  716. ROLLBACK;
  717. MessageBox ('系统提示',"删除记录操作失败!",Exclamation!,OK!)
  718. ELSE
  719. COMMIT;
  720. END IF
  721. DW_2.SetRedraw (TRUE)
  722. end event
  723. type cb_6 from uo_imflatbutton within tabpage_3
  724. integer x = 302
  725. integer height = 96
  726. integer taborder = 50
  727. string text = "修改"
  728. string normalpicname = "open.bmp"
  729. end type
  730. event clicked;call super::clicked;Long i
  731. IF dw_edit_mode THEN
  732. IF dw_2.GetItemStatus(dw_2.GetRow(), 0, Primary!) = NewModified! OR dw_2.GetItemStatus(dw_2.GetRow(), 0, Primary!) = New! THEN
  733. dw_2.DeleteRow(dw_2.GetRow())
  734. ELSE
  735. dw_2.ReselectRow(dw_2.GetRow())
  736. END IF
  737. FOR i = 1 TO 12
  738. dw_2.SetTabOrder ( i, 0 )
  739. NEXT
  740. modifyrow_no = 0
  741. ELSE
  742. modifyrow_no = dw_2.GetRow()
  743. FOR i = 1 TO 12
  744. dw_2.SetTabOrder ( i, i*10 )
  745. NEXT
  746. dw_2.SetFocus()
  747. dw_2.SelectRow(0,FALSE)
  748. dw_2.ScrollToRow (modifyrow_no)
  749. dw_2.SelectRow(modifyrow_no,TRUE)
  750. END IF
  751. dw_edit_mode = NOT dw_edit_mode
  752. WF_dft_face()
  753. end event
  754. type cb_1 from uo_imflatbutton within tabpage_3
  755. integer height = 96
  756. integer taborder = 30
  757. string text = "增加"
  758. string normalpicname = "new.bmp"
  759. end type
  760. event clicked;call super::clicked;Long ll_newid,i
  761. String errmsg
  762. dw_2.AcceptText()
  763. IF dw_edit_mode THEN
  764. dw_2.AcceptText()
  765. IF dw_2.GetNextModified(0, Primary!) = 0 THEN
  766. MessageBox('提示','没有任何修改,不可以保存!', Information!, OK! )
  767. RETURN
  768. END IF
  769. IF Trim(dw_2.Object.dft_new_dwname[dw_2.GetRow()]) = '' THEN
  770. MessageBox('提示','请输入新打印dw', Information!, OK! )
  771. RETURN
  772. END IF
  773. IF Trim(dw_2.Object.chnname[dw_2.GetRow()]) = '' THEN
  774. MessageBox('提示','请输入中文名称', Information!, OK! )
  775. RETURN
  776. END IF
  777. IF Trim(dw_2.Object.dwtype[dw_2.GetRow()]) = '' THEN
  778. MessageBox('提示','请输入窗口名称', Information!, OK! )
  779. RETURN
  780. END IF
  781. IF Trim(dw_2.Object.pblname[dw_2.GetRow()]) = '' THEN
  782. MessageBox('提示','请输入所属格式库文件', Information!, OK! )
  783. RETURN
  784. END IF
  785. IF dw_2.Object.dwprintid[dw_2.GetRow()] = 0 THEN
  786. ll_newid = f_sys_scidentity(0,"sys_dft_dwprint_dynamic","dwprintid",errmsg,FALSE,sqlca)
  787. IF ll_newid <= 0 THEN
  788. MessageBox('错误',errmsg, StopSign!, OK! )
  789. RETURN
  790. ELSE
  791. dw_2.Object.dwprintid[dw_2.GetRow()] = ll_newid
  792. END IF
  793. END IF
  794. END IF
  795. IF dw_edit_mode THEN
  796. String ls_errmsg
  797. IF dw_2.Update() = -1 THEN
  798. IF Pos(ins_sqlerrtext,"Cannot insert duplicate key row") > 0 THEN
  799. ls_errmsg = "关键内容重复"
  800. ELSE
  801. ls_errmsg = "因为网络或其他原因>"+ins_sqlerrtext
  802. END IF
  803. ROLLBACK;
  804. MessageBox ('提示',ls_errmsg+",保存操作失败!",Exclamation!,OK!)
  805. LS_UPDATE_FLAG = FALSE
  806. RETURN
  807. ELSE
  808. COMMIT;
  809. FOR i = 1 TO 12
  810. dw_2.SetTabOrder ( i, 0 )
  811. NEXT
  812. LS_UPDATE_FLAG = TRUE
  813. END IF
  814. ins_sqlerrtext = ""
  815. ELSE
  816. Long li_row, li_cur_row
  817. li_cur_row = dw_2.GetRow()
  818. li_row = dw_2.InsertRow (0)
  819. FOR i = 1 TO 12
  820. dw_2.SetTabOrder ( i, i*10 )
  821. NEXT
  822. dw_2.SelectRow(0,FALSE)
  823. dw_2.ScrollToRow (li_row)
  824. dw_2.SelectRow(li_row,TRUE)
  825. dw_2.SetFocus()
  826. modifyrow_no = li_row
  827. END IF
  828. dw_edit_mode = NOT dw_edit_mode
  829. WF_dft_FACE()
  830. end event
  831. type dw_4 from u_dw_rbtnfilter within tabpage_3
  832. integer y = 100
  833. integer width = 2898
  834. integer height = 1852
  835. integer taborder = 20
  836. string dataobject = "dw_dft_dwprint_dynamic"
  837. boolean hscrollbar = true
  838. boolean vscrollbar = true
  839. boolean hsplitscroll = true
  840. boolean rbutton_setposition_use = true
  841. boolean titleclick_sort_use = true
  842. end type
  843. event rowfocuschanging;call super::rowfocuschanging;if dw_edit_mode then return 1
  844. end event
  845. event rowfocuschanged;call super::rowfocuschanged;IF modifyrow_no >0 AND dw_edit_mode THEN
  846. THIS.SETROW(modifyrow_no)
  847. THIS.ScrollToRow(modifyrow_no)
  848. else
  849. this.selectrow(0,false)
  850. this.selectrow(currentrow,true)
  851. END IF
  852. end event
  853. event doubleclicked;call super::doubleclicked;if dw_edit_mode then
  854. if dwo.name = "dwtype" then
  855. open(w_system_window_ch)
  856. long ll_mainid
  857. string ls_win
  858. ll_mainid = message.doubleparm
  859. if ll_mainid > 0 then
  860. if UpperBound(s_sys_win_open) >= ll_mainid then
  861. ls_win = s_sys_win_open[ll_mainid].Name
  862. this.object.dwtype[row] = ls_win
  863. end if
  864. end if
  865. end if
  866. end if
  867. end event
  868. type tabpage_1 from userobject within tab_1
  869. event create ( )
  870. event destroy ( )
  871. integer x = 608
  872. integer y = 16
  873. integer width = 2903
  874. integer height = 1956
  875. long backcolor = 134217739
  876. string text = "单据打印样式"
  877. long tabtextcolor = 33554432
  878. long tabbackcolor = 134217739
  879. long picturemaskcolor = 536870912
  880. cb_3 cb_3
  881. dw_3 dw_3
  882. end type
  883. on tabpage_1.create
  884. this.cb_3=create cb_3
  885. this.dw_3=create dw_3
  886. this.Control[]={this.cb_3,&
  887. this.dw_3}
  888. end on
  889. on tabpage_1.destroy
  890. destroy(this.cb_3)
  891. destroy(this.dw_3)
  892. end on
  893. type cb_3 from uo_imflatbutton within tabpage_1
  894. integer height = 96
  895. integer taborder = 30
  896. string text = "删除"
  897. string normalpicname = "delete.bmp"
  898. end type
  899. event clicked;call super::clicked;if dw_1.getrow()<=0 then
  900. messagebox("提示","请选择要删除的样式", Information!, OK! )
  901. return
  902. end if
  903. IF MessageBox ("询问","是否确定要删除当前打印样式吗?",Question!,YesNo! ) = 2 THEN RETURN
  904. string ls_dname,ls_dwname
  905. ls_dname = dw_1.object.dname[dw_1.getrow()]
  906. ls_dwname = dw_1.object.dwname [dw_1.getrow()]
  907. delete from sys_dwnSyntax where dname = :ls_dname and dwname = :ls_dwname;
  908. if sqlca.sqlcode <> 0 then
  909. messagebox("提示","删除的打印样式:"+ls_dwname+"/"+ls_dname+'失败 ~n'+sqlca.sqlerrtext, Information!, OK! )
  910. rollback;
  911. return
  912. end if
  913. commit;
  914. dw_1.retrieve()
  915. messagebox("提示","删除的打印样式:"+ls_dwname+"/"+ls_dname+'成功', Information!, OK! )
  916. end event
  917. type dw_3 from u_dw_rbtnfilter within tabpage_1
  918. integer y = 100
  919. integer width = 2898
  920. integer height = 1852
  921. integer taborder = 20
  922. string dataobject = "dw_sys_option_def_dwnsyntax"
  923. boolean hscrollbar = true
  924. boolean vscrollbar = true
  925. boolean hsplitscroll = true
  926. boolean rbutton_setposition_use = true
  927. boolean titleclick_sort_use = true
  928. end type
  929. event rowfocuschanged;call super::rowfocuschanged;IF currentrow <= 0 THEN RETURN
  930. THIS.SelectRow(0,FALSE)
  931. THIS.SelectRow(currentrow,TRUE)
  932. end event
  933. type tabpage_4 from userobject within tab_1
  934. integer x = 608
  935. integer y = 16
  936. integer width = 2903
  937. integer height = 1956
  938. long backcolor = 134217739
  939. string text = "附加文件"
  940. long tabtextcolor = 33554432
  941. long tabbackcolor = 134217739
  942. long picturemaskcolor = 536870912
  943. cbx_2 cbx_2
  944. cb_9 cb_9
  945. cb_8 cb_8
  946. cb_5 cb_5
  947. cb_4 cb_4
  948. dw_1 dw_1
  949. end type
  950. on tabpage_4.create
  951. this.cbx_2=create cbx_2
  952. this.cb_9=create cb_9
  953. this.cb_8=create cb_8
  954. this.cb_5=create cb_5
  955. this.cb_4=create cb_4
  956. this.dw_1=create dw_1
  957. this.Control[]={this.cbx_2,&
  958. this.cb_9,&
  959. this.cb_8,&
  960. this.cb_5,&
  961. this.cb_4,&
  962. this.dw_1}
  963. end on
  964. on tabpage_4.destroy
  965. destroy(this.cbx_2)
  966. destroy(this.cb_9)
  967. destroy(this.cb_8)
  968. destroy(this.cb_5)
  969. destroy(this.cb_4)
  970. destroy(this.dw_1)
  971. end on
  972. type cbx_2 from checkbox within tabpage_4
  973. integer x = 951
  974. integer y = 24
  975. integer width = 411
  976. integer height = 60
  977. integer textsize = -9
  978. integer weight = 400
  979. fontcharset fontcharset = gb2312charset!
  980. fontpitch fontpitch = variable!
  981. string facename = "宋体"
  982. long textcolor = 33554432
  983. long backcolor = 134217739
  984. string text = "显示系统文件"
  985. end type
  986. event clicked;
  987. String ls_list
  988. String ls_filename
  989. Long ll_pos, ll_row
  990. IF This.Checked THEN
  991. dw_1.Reset()
  992. ls_list = getlibrarylist ()
  993. ll_pos = Pos(ls_list, ',')
  994. DO WHILE ll_pos > 0
  995. ls_filename = Left(ls_list, ll_pos - 1)
  996. ls_list = Mid(ls_list, ll_pos + 1)
  997. ll_row = dw_1.Find("libname = '"+ls_filename+"'", 1, dw_1.RowCount())
  998. IF Not ll_row > 0 THEN
  999. ll_row = dw_1.InsertRow(0)
  1000. dw_1.Object.libname[ll_row] = ls_filename
  1001. END IF
  1002. ll_pos = Pos(ls_list, ',')
  1003. LOOP
  1004. ls_filename = ls_list
  1005. ll_row = dw_1.InsertRow(0)
  1006. dw_1.Object.libname[ll_row] = ls_filename
  1007. ELSE
  1008. dw_1.Retrieve()
  1009. END IF
  1010. //dw_4.Retrieve(li_dft)
  1011. end event
  1012. type cb_9 from uo_imflatbutton within tabpage_4
  1013. boolean visible = false
  1014. integer x = 905
  1015. integer height = 96
  1016. integer taborder = 70
  1017. string text = "测试连接"
  1018. string normalpicname = "update.bmp"
  1019. end type
  1020. event clicked;call super::clicked;
  1021. if f_setliblist()=1 then
  1022. messagebox('','ok')
  1023. else
  1024. messagebox('','no')
  1025. end if
  1026. end event
  1027. type cb_8 from uo_imflatbutton within tabpage_4
  1028. integer x = 603
  1029. integer height = 96
  1030. integer taborder = 70
  1031. string text = "删除"
  1032. string normalpicname = "delete.bmp"
  1033. end type
  1034. event clicked;call super::clicked;IF MessageBox ('询问',"是否确定要删除当前记录?(选择确定后记录将不可恢复)",Question!,YesNo! ) = 2 THEN
  1035. RETURN
  1036. END IF
  1037. String arg_msg
  1038. IF DW_3.GetRow() <= 0 THEN
  1039. MessageBox('提示','没有操作目标记录!', Information!, OK! )
  1040. RETURN
  1041. END IF
  1042. DW_3.SetRedraw (False)
  1043. DW_3.DeleteRow (0)
  1044. DW_3.TriggerEvent (RowFocusChanged!)
  1045. IF DW_3.Update() = -1 THEN
  1046. ROLLBACK;
  1047. MessageBox ('提示',"删除记录操作失败!",Exclamation!,OK!)
  1048. ELSE
  1049. COMMIT;
  1050. END IF
  1051. DW_3.SetRedraw (True)
  1052. end event
  1053. type cb_5 from uo_imflatbutton within tabpage_4
  1054. integer height = 96
  1055. integer taborder = 60
  1056. string text = "增加"
  1057. string normalpicname = "new.bmp"
  1058. end type
  1059. event clicked;call super::clicked;dw_3.insertrow(0)
  1060. end event
  1061. type cb_4 from uo_imflatbutton within tabpage_4
  1062. integer x = 302
  1063. integer height = 96
  1064. integer taborder = 40
  1065. string text = "保存"
  1066. string normalpicname = "save.bmp"
  1067. end type
  1068. event clicked;call super::clicked;Long ll_i
  1069. dw_3.AcceptText()
  1070. FOR ll_i = 1 TO dw_3.RowCount()
  1071. IF Trim(dw_3.Object.libname[ll_i]) = '' THEN
  1072. MessageBox('提示','请输入LIBRARY名称', Information!, OK! )
  1073. RETURN
  1074. END IF
  1075. NEXT
  1076. IF dw_3.Update(TRUE,FALSE) = -1 THEN
  1077. MessageBox('错误','保存资料出错!'+sqlca.SQLErrText, StopSign!, OK! )
  1078. ROLLBACK;
  1079. RETURN
  1080. END IF
  1081. COMMIT;
  1082. MessageBox('提示','保存资料成功!', Information!, OK! )
  1083. end event
  1084. type dw_1 from datawindow within tabpage_4
  1085. integer y = 100
  1086. integer width = 2898
  1087. integer height = 1852
  1088. integer taborder = 70
  1089. string title = "none"
  1090. string dataobject = "dw_setliblist"
  1091. boolean hscrollbar = true
  1092. boolean vscrollbar = true
  1093. boolean hsplitscroll = true
  1094. boolean livescroll = true
  1095. borderstyle borderstyle = stylelowered!
  1096. end type
  1097. type tabpage_2 from userobject within tab_1
  1098. integer x = 608
  1099. integer y = 16
  1100. integer width = 2903
  1101. integer height = 1956
  1102. long backcolor = 134217739
  1103. string text = "单据字段隐藏选项"
  1104. long tabtextcolor = 33554432
  1105. long tabbackcolor = 134217739
  1106. long picturemaskcolor = 536870912
  1107. cb_11 cb_11
  1108. cb_10 cb_10
  1109. cb_2 cb_2
  1110. dw_5 dw_5
  1111. end type
  1112. on tabpage_2.create
  1113. this.cb_11=create cb_11
  1114. this.cb_10=create cb_10
  1115. this.cb_2=create cb_2
  1116. this.dw_5=create dw_5
  1117. this.Control[]={this.cb_11,&
  1118. this.cb_10,&
  1119. this.cb_2,&
  1120. this.dw_5}
  1121. end on
  1122. on tabpage_2.destroy
  1123. destroy(this.cb_11)
  1124. destroy(this.cb_10)
  1125. destroy(this.cb_2)
  1126. destroy(this.dw_5)
  1127. end on
  1128. type cb_11 from uo_imflatbutton within tabpage_2
  1129. integer x = 603
  1130. integer width = 421
  1131. integer height = 96
  1132. integer taborder = 60
  1133. string text = "重置布局"
  1134. string normalpicname = "delete.BMP"
  1135. end type
  1136. event clicked;call super::clicked;IF MessageBox('提示','是否确定删除当前所有用户的单据布局?', Question!, YesNo! ) = 2 THEN RETURN
  1137. DELETE From sys_user_dwnSyntax;
  1138. IF sqlca.SQLCode <> 0 THEN
  1139. ROLLBACK;
  1140. MessageBox('错误','删除用户单据布局失败', StopSign!, OK! )
  1141. RETURN
  1142. ELSE
  1143. COMMIT;
  1144. MessageBox('提示','删除用户单据布局成功', Information!, OK! )
  1145. RETURN
  1146. END IF
  1147. end event
  1148. type cb_10 from uo_imflatbutton within tabpage_2
  1149. integer x = 302
  1150. integer height = 96
  1151. integer taborder = 30
  1152. string text = "修改"
  1153. string normalpicname = "open.bmp"
  1154. end type
  1155. event clicked;call super::clicked;Long i
  1156. IF dw_edit_mode_hile THEN
  1157. FOR i = 1 TO 1
  1158. dw_5.SetTabOrder ( i, 0 )
  1159. NEXT
  1160. modifyrow_no = 0
  1161. ELSE
  1162. modifyrow_no = dw_5.GetRow()
  1163. FOR i = 1 TO 1
  1164. dw_5.SetTabOrder ( i, i*10 )
  1165. NEXT
  1166. dw_5.SetFocus()
  1167. dw_5.SelectRow(0,FALSE)
  1168. dw_5.ScrollToRow (modifyrow_no)
  1169. dw_5.SelectRow(modifyrow_no,TRUE)
  1170. END IF
  1171. dw_edit_mode_hile = NOT dw_edit_mode_hile
  1172. WF_hidecol_face()
  1173. end event
  1174. type cb_2 from uo_imflatbutton within tabpage_2
  1175. integer height = 96
  1176. integer taborder = 10
  1177. boolean enabled = false
  1178. string text = "保存"
  1179. string normalpicname = "new.bmp"
  1180. end type
  1181. event clicked;call super::clicked;Long ll_newid,i
  1182. String ll_optionid,ll_value
  1183. String errmsg,ls_optionname,arg_msg
  1184. dw_5.AcceptText()
  1185. uo_sys_option uo_opt
  1186. uo_opt = CREATE uo_sys_option
  1187. FOR i = 1 TO dw_5.RowCount()
  1188. ll_value = String(dw_5.Object.Value[i])
  1189. ll_optionid = String(dw_5.Object.optionid[i])
  1190. ls_optionname = dw_5.Object.optionname[i]
  1191. IF uo_opt.uof_add_sys_option(ll_optionid,&
  1192. ls_optionname,ll_value,arg_msg,TRUE) = 0 THEN
  1193. MessageBox('提示',arg_msg)
  1194. DESTROY uo_opt
  1195. RETURN
  1196. END IF
  1197. NEXT
  1198. uo_opt.uof_sys_option()
  1199. DESTROY uo_opt
  1200. FOR i = 1 TO 1
  1201. dw_5.SetTabOrder ( i, 0 )
  1202. NEXT
  1203. dw_edit_mode_hile = NOT dw_edit_mode_hile
  1204. WF_hidecol_FACE()
  1205. end event
  1206. type dw_5 from u_dw_rbtnfilter within tabpage_2
  1207. integer x = 5
  1208. integer y = 100
  1209. integer width = 2231
  1210. integer height = 1820
  1211. integer taborder = 70
  1212. string dataobject = "dw_sys_option_hidecol"
  1213. boolean hscrollbar = true
  1214. boolean vscrollbar = true
  1215. boolean hsplitscroll = true
  1216. boolean rbutton_setposition_use = true
  1217. end type
  1218. event rowfocuschanged;call super::rowfocuschanged;IF currentrow > 0 THEN
  1219. THIS.SelectRow(0,FALSE)
  1220. THIS.SelectRow(currentrow,TRUE)
  1221. END IF
  1222. end event