w_rp_multibar.srw 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. $PBExportHeader$w_rp_multibar.srw
  2. forward
  3. global type w_rp_multibar from w_publ_base
  4. end type
  5. type gb_2 from groupbox within w_rp_multibar
  6. end type
  7. type gb_1 from groupbox within w_rp_multibar
  8. end type
  9. type dw_multibar from datawindow within w_rp_multibar
  10. end type
  11. type cb_1 from uo_imflatbutton within w_rp_multibar
  12. end type
  13. type cb_2 from uo_imflatbutton within w_rp_multibar
  14. end type
  15. type cb_3 from uo_imflatbutton within w_rp_multibar
  16. end type
  17. type st_3 from statictext within w_rp_multibar
  18. end type
  19. type ddlb_firstmon from dropdownlistbox within w_rp_multibar
  20. end type
  21. type st_4 from statictext within w_rp_multibar
  22. end type
  23. type ddlb_lastmon from dropdownlistbox within w_rp_multibar
  24. end type
  25. type cbx_1 from checkbox within w_rp_multibar
  26. end type
  27. type cb_5 from uo_imflatbutton within w_rp_multibar
  28. end type
  29. type cb_12 from uo_imflatbutton within w_rp_multibar
  30. end type
  31. type st_1 from statictext within w_rp_multibar
  32. end type
  33. type em_yearmon from editmask within w_rp_multibar
  34. end type
  35. end forward
  36. global type w_rp_multibar from w_publ_base
  37. integer width = 1829
  38. integer height = 1632
  39. string title = "多栏帐分类明细帐"
  40. boolean minbox = false
  41. windowtype windowtype = response!
  42. long backcolor = 83162356
  43. gb_2 gb_2
  44. gb_1 gb_1
  45. dw_multibar dw_multibar
  46. cb_1 cb_1
  47. cb_2 cb_2
  48. cb_3 cb_3
  49. st_3 st_3
  50. ddlb_firstmon ddlb_firstmon
  51. st_4 st_4
  52. ddlb_lastmon ddlb_lastmon
  53. cbx_1 cbx_1
  54. cb_5 cb_5
  55. cb_12 cb_12
  56. st_1 st_1
  57. em_yearmon em_yearmon
  58. end type
  59. global w_rp_multibar w_rp_multibar
  60. type variables
  61. s_rp_multibar s_rp_multibar
  62. end variables
  63. forward prototypes
  64. public subroutine wf_retrieve ()
  65. end prototypes
  66. public subroutine wf_retrieve ();dw_multibar.retrieve(sys_accsetid)
  67. end subroutine
  68. on w_rp_multibar.create
  69. int iCurrent
  70. call super::create
  71. this.gb_2=create gb_2
  72. this.gb_1=create gb_1
  73. this.dw_multibar=create dw_multibar
  74. this.cb_1=create cb_1
  75. this.cb_2=create cb_2
  76. this.cb_3=create cb_3
  77. this.st_3=create st_3
  78. this.ddlb_firstmon=create ddlb_firstmon
  79. this.st_4=create st_4
  80. this.ddlb_lastmon=create ddlb_lastmon
  81. this.cbx_1=create cbx_1
  82. this.cb_5=create cb_5
  83. this.cb_12=create cb_12
  84. this.st_1=create st_1
  85. this.em_yearmon=create em_yearmon
  86. iCurrent=UpperBound(this.Control)
  87. this.Control[iCurrent+1]=this.gb_2
  88. this.Control[iCurrent+2]=this.gb_1
  89. this.Control[iCurrent+3]=this.dw_multibar
  90. this.Control[iCurrent+4]=this.cb_1
  91. this.Control[iCurrent+5]=this.cb_2
  92. this.Control[iCurrent+6]=this.cb_3
  93. this.Control[iCurrent+7]=this.st_3
  94. this.Control[iCurrent+8]=this.ddlb_firstmon
  95. this.Control[iCurrent+9]=this.st_4
  96. this.Control[iCurrent+10]=this.ddlb_lastmon
  97. this.Control[iCurrent+11]=this.cbx_1
  98. this.Control[iCurrent+12]=this.cb_5
  99. this.Control[iCurrent+13]=this.cb_12
  100. this.Control[iCurrent+14]=this.st_1
  101. this.Control[iCurrent+15]=this.em_yearmon
  102. end on
  103. on w_rp_multibar.destroy
  104. call super::destroy
  105. destroy(this.gb_2)
  106. destroy(this.gb_1)
  107. destroy(this.dw_multibar)
  108. destroy(this.cb_1)
  109. destroy(this.cb_2)
  110. destroy(this.cb_3)
  111. destroy(this.st_3)
  112. destroy(this.ddlb_firstmon)
  113. destroy(this.st_4)
  114. destroy(this.ddlb_lastmon)
  115. destroy(this.cbx_1)
  116. destroy(this.cb_5)
  117. destroy(this.cb_12)
  118. destroy(this.st_1)
  119. destroy(this.em_yearmon)
  120. end on
  121. event open;call super::open;dw_multibar.settransobject(sqlca)
  122. wf_retrieve()
  123. end event
  124. event close;CloseWithReturn ( this, s_rp_multibar )
  125. end event
  126. type cb_func from w_publ_base`cb_func within w_rp_multibar
  127. boolean visible = false
  128. integer x = 1335
  129. integer y = 620
  130. boolean enabled = false
  131. end type
  132. type cb_exit from w_publ_base`cb_exit within w_rp_multibar
  133. integer x = 1399
  134. integer y = 1372
  135. string text = "取消"
  136. end type
  137. event cb_exit::clicked;s_rp_multibar.relid=0
  138. close(parent)
  139. end event
  140. type gb_2 from groupbox within w_rp_multibar
  141. integer x = 151
  142. integer y = 784
  143. integer width = 1477
  144. integer height = 492
  145. integer taborder = 110
  146. integer textsize = -9
  147. integer weight = 400
  148. fontcharset fontcharset = gb2312charset!
  149. fontpitch fontpitch = variable!
  150. string facename = "宋体"
  151. long textcolor = 33554432
  152. long backcolor = 67108864
  153. string text = "查询范围"
  154. end type
  155. type gb_1 from groupbox within w_rp_multibar
  156. integer x = 82
  157. integer y = 60
  158. integer width = 1646
  159. integer height = 1280
  160. integer taborder = 30
  161. integer textsize = -9
  162. integer weight = 400
  163. fontcharset fontcharset = gb2312charset!
  164. fontpitch fontpitch = variable!
  165. string facename = "宋体"
  166. long textcolor = 33554432
  167. long backcolor = 67108864
  168. string text = "多栏式明细帐项目"
  169. end type
  170. type dw_multibar from datawindow within w_rp_multibar
  171. integer x = 151
  172. integer y = 120
  173. integer width = 1143
  174. integer height = 616
  175. integer taborder = 40
  176. boolean bringtotop = true
  177. string dataobject = "dw_multibar"
  178. boolean hscrollbar = true
  179. boolean vscrollbar = true
  180. boolean livescroll = true
  181. borderstyle borderstyle = stylelowered!
  182. end type
  183. event rowfocuschanged;if currentrow<=0 then return
  184. this.selectrow(0,false)
  185. this.selectrow(currentrow,true)
  186. end event
  187. type cb_1 from uo_imflatbutton within w_rp_multibar
  188. integer x = 1339
  189. integer y = 132
  190. integer width = 288
  191. integer height = 96
  192. integer taborder = 50
  193. boolean bringtotop = true
  194. string text = "增加"
  195. string normalpicname = "new.bmp"
  196. end type
  197. event clicked;openwithparm(w_rp_multibarmx,0)
  198. end event
  199. type cb_2 from uo_imflatbutton within w_rp_multibar
  200. integer x = 1339
  201. integer y = 260
  202. integer width = 288
  203. integer height = 96
  204. integer taborder = 80
  205. boolean bringtotop = true
  206. string text = "修改"
  207. string normalpicname = "open.bmp"
  208. end type
  209. event clicked;long li_row,li_multibarid
  210. li_row=dw_multibar.getrow()
  211. if li_row<=0 then
  212. messagebox(publ_operator,'请选择要修改的多栏帐')
  213. return
  214. end if
  215. li_multibarid=dw_multibar.object.multibarid[dw_multibar.getrow()]
  216. openwithparm(w_rp_multibarmx,li_multibarid)
  217. end event
  218. type cb_3 from uo_imflatbutton within w_rp_multibar
  219. integer x = 1339
  220. integer y = 388
  221. integer width = 288
  222. integer height = 96
  223. integer taborder = 90
  224. boolean bringtotop = true
  225. string text = "删除"
  226. string normalpicname = "delete.bmp"
  227. end type
  228. event clicked;IF MessageBox ("IF","是否确定要删除当前多栏帐?",Question!,YesNo! ) = 2 THEN RETURN
  229. long li_row,li_multibarid
  230. li_row=dw_multibar.getrow()
  231. if li_row<=0 then
  232. messagebox(publ_operator,'请选择要删除的多栏帐')
  233. return
  234. end if
  235. li_multibarid=dw_multibar.object.multibarid[li_row]
  236. delete from cw_multibarmx where accsetid=:sys_accsetid and multibarid=:li_multibarid;
  237. if sqlca.sqlcode<>0 then
  238. rollback;
  239. messagebox(publ_operator,'删除多栏帐明细项目失败')
  240. return
  241. end if
  242. delete from cw_multibar where accsetid=:sys_accsetid and multibarid=:li_multibarid;
  243. if sqlca.sqlcode<>0 then
  244. rollback;
  245. messagebox(publ_operator,'删除多栏帐失败')
  246. return
  247. end if
  248. commit;
  249. wf_retrieve()
  250. end event
  251. type st_3 from statictext within w_rp_multibar
  252. integer x = 224
  253. integer y = 1008
  254. integer width = 288
  255. integer height = 60
  256. boolean bringtotop = true
  257. integer textsize = -9
  258. integer weight = 400
  259. fontcharset fontcharset = gb2312charset!
  260. fontpitch fontpitch = variable!
  261. string facename = "宋体"
  262. long textcolor = 33554432
  263. long backcolor = 67108864
  264. boolean enabled = false
  265. string text = "会计期间:"
  266. boolean focusrectangle = false
  267. end type
  268. type ddlb_firstmon from dropdownlistbox within w_rp_multibar
  269. integer x = 498
  270. integer y = 996
  271. integer width = 274
  272. integer height = 908
  273. integer taborder = 60
  274. boolean bringtotop = true
  275. integer textsize = -9
  276. integer weight = 400
  277. fontcharset fontcharset = gb2312charset!
  278. fontpitch fontpitch = variable!
  279. string facename = "宋体"
  280. long textcolor = 33554432
  281. boolean sorted = false
  282. boolean vscrollbar = true
  283. string item[] = {"1","2","3","4","5","6","7","8","9","10","11","12"}
  284. borderstyle borderstyle = stylelowered!
  285. end type
  286. event constructor;this.text=string(s_sys_accset.currmon)
  287. end event
  288. type st_4 from statictext within w_rp_multibar
  289. integer x = 809
  290. integer y = 1008
  291. integer width = 69
  292. integer height = 60
  293. boolean bringtotop = true
  294. integer textsize = -9
  295. integer weight = 400
  296. fontcharset fontcharset = gb2312charset!
  297. fontpitch fontpitch = variable!
  298. string facename = "宋体"
  299. long textcolor = 33554432
  300. long backcolor = 67108864
  301. boolean enabled = false
  302. string text = "至"
  303. boolean focusrectangle = false
  304. end type
  305. type ddlb_lastmon from dropdownlistbox within w_rp_multibar
  306. integer x = 914
  307. integer y = 996
  308. integer width = 274
  309. integer height = 908
  310. integer taborder = 70
  311. boolean bringtotop = true
  312. integer textsize = -9
  313. integer weight = 400
  314. fontcharset fontcharset = gb2312charset!
  315. fontpitch fontpitch = variable!
  316. string facename = "宋体"
  317. long textcolor = 33554432
  318. boolean sorted = false
  319. boolean vscrollbar = true
  320. string item[] = {"1","2","3","4","5","6","7","8","9","10","11","12"}
  321. borderstyle borderstyle = stylelowered!
  322. end type
  323. event constructor;this.text=string(s_sys_accset.currmon)
  324. end event
  325. event selectionchanged;if long(ddlb_lastmon.text)<long(ddlb_firstmon.text) then
  326. ddlb_firstmon.text=ddlb_lastmon.text
  327. end if
  328. end event
  329. type cbx_1 from checkbox within w_rp_multibar
  330. integer x = 224
  331. integer y = 1140
  332. integer width = 466
  333. integer height = 76
  334. boolean bringtotop = true
  335. integer textsize = -9
  336. integer weight = 400
  337. fontcharset fontcharset = gb2312charset!
  338. fontpitch fontpitch = variable!
  339. string facename = "宋体"
  340. long textcolor = 33554432
  341. long backcolor = 67108864
  342. string text = "包括未登帐凭证"
  343. end type
  344. type cb_5 from uo_imflatbutton within w_rp_multibar
  345. integer x = 978
  346. integer y = 1372
  347. integer width = 311
  348. integer height = 96
  349. integer taborder = 100
  350. boolean bringtotop = true
  351. string normalpicname = "ok.bmp"
  352. end type
  353. event clicked;long li_row
  354. li_row=dw_multibar.getrow()
  355. if li_row<=0 then
  356. messagebox(publ_operator,'请选择多栏帐')
  357. return
  358. end if
  359. s_rp_multibar.relid=dw_multibar.object.multibarid[li_row]
  360. s_rp_multibar.relname=dw_multibar.object.multibarname[li_row]
  361. s_rp_multibar.subid=dw_multibar.object.subid[li_row]
  362. s_rp_multibar.year=long(em_yearmon.text)
  363. s_rp_multibar.firstmon=long(ddlb_firstmon.text)
  364. s_rp_multibar.lastmon=long(ddlb_lastmon.text)
  365. if cbx_1.checked then
  366. s_rp_multibar.no_post=-1
  367. else
  368. s_rp_multibar.no_post=1
  369. end if
  370. close(parent)
  371. end event
  372. type cb_12 from uo_imflatbutton within w_rp_multibar
  373. integer x = 521
  374. integer y = 1372
  375. integer width = 370
  376. integer height = 96
  377. integer taborder = 10
  378. boolean bringtotop = true
  379. string text = "打印封面"
  380. string normalpicname = "print.bmp"
  381. end type
  382. event clicked;S_print_MSG LS_PRMSG
  383. LS_PRMSG.obj_dwNAME = 'dw_rp_fm_multibar'
  384. LS_PRMSG.TAG_TEXT = '封面'
  385. LS_PRMSG.FILTER_STRING = ''
  386. LS_PRMSG.retr_pram_falg = -1
  387. LS_PRMSG.PAGECH_FLAG = 0
  388. OpenWithParm(w_publ_preview,LS_PRMSG)
  389. end event
  390. type st_1 from statictext within w_rp_multibar
  391. integer x = 224
  392. integer y = 884
  393. integer width = 288
  394. integer height = 48
  395. boolean bringtotop = true
  396. integer textsize = -9
  397. integer weight = 400
  398. fontcharset fontcharset = gb2312charset!
  399. fontpitch fontpitch = variable!
  400. string facename = "宋体"
  401. long textcolor = 33554432
  402. long backcolor = 67108864
  403. string text = "会计年度:"
  404. boolean focusrectangle = false
  405. end type
  406. type em_yearmon from editmask within w_rp_multibar
  407. integer x = 498
  408. integer y = 864
  409. integer width = 247
  410. integer height = 88
  411. integer taborder = 20
  412. boolean bringtotop = true
  413. integer textsize = -9
  414. integer weight = 400
  415. fontcharset fontcharset = gb2312charset!
  416. fontpitch fontpitch = variable!
  417. string facename = "宋体"
  418. long textcolor = 33554432
  419. borderstyle borderstyle = stylelowered!
  420. maskdatatype maskdatatype = datemask!
  421. string mask = "yyyy"
  422. boolean spin = true
  423. string minmax = "1900~~"
  424. end type
  425. event constructor;this.text=left(string(sys_curyearmon),4)
  426. end event