w_xls_update_templates_ifpic.srw 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. $PBExportHeader$w_xls_update_templates_ifpic.srw
  2. forward
  3. global type w_xls_update_templates_ifpic from w_xls_publ_base
  4. end type
  5. type sle_2 from u_xls_sleedit within w_xls_update_templates_ifpic
  6. end type
  7. type st_1 from statictext within w_xls_update_templates_ifpic
  8. end type
  9. type cb_save from uo_xls_imflatbutton within w_xls_update_templates_ifpic
  10. end type
  11. type cbx_ifpic from checkbox within w_xls_update_templates_ifpic
  12. end type
  13. end forward
  14. global type w_xls_update_templates_ifpic from w_xls_publ_base
  15. integer width = 2034
  16. integer height = 508
  17. string title = "修改模版属性"
  18. boolean minbox = false
  19. windowtype windowtype = response!
  20. boolean toolbarvisible = false
  21. sle_2 sle_2
  22. st_1 st_1
  23. cb_save cb_save
  24. cbx_ifpic cbx_ifpic
  25. end type
  26. global w_xls_update_templates_ifpic w_xls_update_templates_ifpic
  27. type variables
  28. Long cur_tid,flag = 0,cur_templatesid
  29. uo_sendtoexcel obj_xls
  30. end variables
  31. on w_xls_update_templates_ifpic.create
  32. int iCurrent
  33. call super::create
  34. this.sle_2=create sle_2
  35. this.st_1=create st_1
  36. this.cb_save=create cb_save
  37. this.cbx_ifpic=create cbx_ifpic
  38. iCurrent=UpperBound(this.Control)
  39. this.Control[iCurrent+1]=this.sle_2
  40. this.Control[iCurrent+2]=this.st_1
  41. this.Control[iCurrent+3]=this.cb_save
  42. this.Control[iCurrent+4]=this.cbx_ifpic
  43. end on
  44. on w_xls_update_templates_ifpic.destroy
  45. call super::destroy
  46. destroy(this.sle_2)
  47. destroy(this.st_1)
  48. destroy(this.cb_save)
  49. destroy(this.cbx_ifpic)
  50. end on
  51. event open;
  52. CALL SUPER::OPEN;
  53. s_xls_templates s_xls
  54. s_xls = Message.PowerObjectParm
  55. cur_tid = s_xls.tid
  56. cur_templatesid =s_xls.templatesid
  57. IF IsNull(cur_tid) OR cur_tid = 0 THEN Close(THIS)
  58. IF IsNull(cur_templatesid) OR cur_templatesid = 0 THEN Close(THIS)
  59. sle_2.text = s_xls.templatesname
  60. if s_xls.ifpic = 1 then
  61. cbx_ifpic.checked = true
  62. else
  63. cbx_ifpic.checked = false
  64. end if
  65. obj_xls = CREATE uo_sendtoexcel
  66. obj_xls.commit_transaction = sqlca
  67. end event
  68. event close;
  69. CALL SUPER::CLOSE;
  70. CloseWithReturn(THIS,flag)
  71. end event
  72. type cb_func from w_xls_publ_base`cb_func within w_xls_update_templates_ifpic
  73. boolean visible = false
  74. integer x = 2158
  75. integer y = 768
  76. end type
  77. type cb_exit from w_xls_publ_base`cb_exit within w_xls_update_templates_ifpic
  78. integer x = 1248
  79. integer y = 288
  80. integer width = 320
  81. string text = "取消"
  82. integer picsize = 16
  83. end type
  84. type sle_2 from u_xls_sleedit within w_xls_update_templates_ifpic
  85. integer x = 338
  86. integer y = 44
  87. integer width = 1623
  88. integer height = 96
  89. integer taborder = 20
  90. boolean bringtotop = true
  91. end type
  92. type st_1 from statictext within w_xls_update_templates_ifpic
  93. integer x = 73
  94. integer y = 68
  95. integer width = 233
  96. integer height = 48
  97. boolean bringtotop = true
  98. integer textsize = -9
  99. integer weight = 400
  100. fontcharset fontcharset = gb2312charset!
  101. fontpitch fontpitch = variable!
  102. string facename = "宋体"
  103. long textcolor = 33554432
  104. long backcolor = 134217739
  105. string text = "模版名称"
  106. boolean focusrectangle = false
  107. end type
  108. type cb_save from uo_xls_imflatbutton within w_xls_update_templates_ifpic
  109. integer x = 384
  110. integer y = 280
  111. integer width = 320
  112. integer taborder = 40
  113. boolean bringtotop = true
  114. string normalpicname = "save.bmp"
  115. integer picsize = 16
  116. end type
  117. event clicked;
  118. CALL SUPER::Clicked;
  119. sle_2.Text = Trim(sle_2.Text)
  120. String errmsg
  121. IF sle_2.Text = '' THEN
  122. MessageBox('系统提示','请输入模版名称!')
  123. RETURN
  124. END IF
  125. String TemplatesName
  126. TemplatesName = sle_2.Text
  127. Int li_ifpic
  128. IF cbx_ifpic.Checked THEN
  129. li_ifpic = 1
  130. ELSE
  131. li_ifpic = 0
  132. END IF
  133. IF obj_xls.of_updatetemp_ifpic(cur_tid, cur_templatesid, TemplatesName, li_ifpic,errmsg,TRUE) <> 1 THEN
  134. flag = 0
  135. MessageBox('失败',errmsg)
  136. RETURN
  137. END IF
  138. MessageBox("成功","修改模版属性成功")
  139. flag = 1
  140. Close(PARENT)
  141. end event
  142. type cbx_ifpic from checkbox within w_xls_update_templates_ifpic
  143. integer x = 59
  144. integer y = 184
  145. integer width = 338
  146. integer height = 60
  147. boolean bringtotop = true
  148. integer textsize = -9
  149. integer weight = 400
  150. fontcharset fontcharset = gb2312charset!
  151. fontpitch fontpitch = variable!
  152. string facename = "宋体"
  153. long textcolor = 33554432
  154. long backcolor = 134217739
  155. string text = "含有图片"
  156. boolean lefttext = true
  157. end type