w_credport_edit.srw 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. $PBExportHeader$w_credport_edit.srw
  2. forward
  3. global type w_credport_edit from window
  4. end type
  5. type cb_3 from commandbutton within w_credport_edit
  6. end type
  7. type cb_1 from commandbutton within w_credport_edit
  8. end type
  9. type dw_2 from datawindow within w_credport_edit
  10. end type
  11. type gb_2 from groupbox within w_credport_edit
  12. end type
  13. end forward
  14. global type w_credport_edit from window
  15. integer width = 2377
  16. integer height = 1152
  17. boolean titlebar = true
  18. string title = "自动凭证设置"
  19. boolean controlmenu = true
  20. windowtype windowtype = response!
  21. long backcolor = 67108864
  22. string icon = "AppIcon!"
  23. boolean center = true
  24. cb_3 cb_3
  25. cb_1 cb_1
  26. dw_2 dw_2
  27. gb_2 gb_2
  28. end type
  29. global w_credport_edit w_credport_edit
  30. type variables
  31. string ins_sqlerrtext2,ins_sqlerrtext3
  32. end variables
  33. on w_credport_edit.create
  34. this.cb_3=create cb_3
  35. this.cb_1=create cb_1
  36. this.dw_2=create dw_2
  37. this.gb_2=create gb_2
  38. this.Control[]={this.cb_3,&
  39. this.cb_1,&
  40. this.dw_2,&
  41. this.gb_2}
  42. end on
  43. on w_credport_edit.destroy
  44. destroy(this.cb_3)
  45. destroy(this.cb_1)
  46. destroy(this.dw_2)
  47. destroy(this.gb_2)
  48. end on
  49. event open;dw_2.settransobject(sqlca)
  50. //2.凭证字
  51. datawindowchild childdw_credword
  52. dw_2.GetChild("credtype",childdw_credword)
  53. childdw_credword.SetTransObject (sqlca)
  54. childdw_credword.Retrieve(sys_accsetid)
  55. IF childdw_credword.RowCount() <= 0 THEN
  56. childdw_credword.InsertRow(0)
  57. END IF
  58. long ll_credid
  59. ll_credid = message.doubleparm
  60. if ll_credid > 0 then
  61. dw_2.retrieve(ll_credid)
  62. else
  63. dw_2.reset()
  64. end if
  65. end event
  66. type cb_3 from commandbutton within w_credport_edit
  67. integer x = 1166
  68. integer y = 924
  69. integer width = 311
  70. integer height = 96
  71. integer taborder = 30
  72. integer textsize = -9
  73. integer weight = 400
  74. fontcharset fontcharset = gb2312charset!
  75. fontpitch fontpitch = variable!
  76. string facename = "宋体"
  77. string text = "取消"
  78. end type
  79. event clicked;close(parent)
  80. end event
  81. type cb_1 from commandbutton within w_credport_edit
  82. integer x = 731
  83. integer y = 924
  84. integer width = 311
  85. integer height = 96
  86. integer taborder = 20
  87. integer textsize = -9
  88. integer weight = 400
  89. fontcharset fontcharset = gb2312charset!
  90. fontpitch fontpitch = variable!
  91. string facename = "宋体"
  92. string text = "保存"
  93. end type
  94. event clicked;Long cnt,i
  95. dw_2.AcceptText()
  96. cnt = 0
  97. SELECT count(*) Into :cnt From cw_Credenceword Where accsetid = :sys_accsetid;
  98. IF sqlca.SQLCode <> 0 THEN
  99. MessageBox(publ_operator,'查询帐套是否有设置凭证字失败,'+sqlca.SQLErrText)
  100. RETURN
  101. END IF
  102. IF cnt > 0 THEN
  103. MessageBox(publ_operator,'请选择凭证字')
  104. RETURN
  105. END IF
  106. IF dw_2.Update() = -1 THEN
  107. ROLLBACK;
  108. MessageBox (publ_operator,"保存凭证参数设置失败! ~n"+ins_sqlerrtext2)
  109. RETURN
  110. END IF
  111. COMMIT;
  112. MessageBox (publ_operator,"保存成功!")
  113. Close(Parent)
  114. end event
  115. type dw_2 from datawindow within w_credport_edit
  116. integer x = 101
  117. integer y = 84
  118. integer width = 2167
  119. integer height = 700
  120. integer taborder = 20
  121. string title = "none"
  122. string dataobject = "dw_credport_edit"
  123. boolean livescroll = true
  124. borderstyle borderstyle = stylelowered!
  125. end type
  126. event dberror;ins_sqlerrtext2 = SQLErrText
  127. RETURN 1
  128. end event
  129. type gb_2 from groupbox within w_credport_edit
  130. integer x = 59
  131. integer y = 20
  132. integer width = 2258
  133. integer height = 848
  134. integer taborder = 10
  135. integer textsize = -9
  136. integer weight = 400
  137. fontcharset fontcharset = gb2312charset!
  138. fontpitch fontpitch = variable!
  139. string facename = "宋体"
  140. long textcolor = 33554432
  141. long backcolor = 67108864
  142. string text = "凭证参数设置"
  143. end type