123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462 |
- $PBExportHeader$w_ljnc_preview.srw
- forward
- global type w_ljnc_preview from w_publ_easyq
- end type
- type ole_1 from olecustomcontrol within w_ljnc_preview
- end type
- type st_1 from statictext within w_ljnc_preview
- end type
- type sle_1 from singlelineedit within w_ljnc_preview
- end type
- type lb_1 from listbox within w_ljnc_preview
- end type
- end forward
- global type w_ljnc_preview from w_publ_easyq
- integer width = 5038
- string title = "龙嘉知识"
- windowstate windowstate = normal!
- ole_1 ole_1
- st_1 st_1
- sle_1 sle_1
- lb_1 lb_1
- end type
- global w_ljnc_preview w_ljnc_preview
- type variables
- int is_select_flag = 0 //用来标记是否根据时间查询过
- boolean is_click =false
- boolean is_first=true
- int is_hasDirectory
- end variables
- forward prototypes
- public subroutine get_mht (string arg_lnc_title)
- public subroutine change_readflag (integer arg_noticeid, integer arg_flag)
- public subroutine set_position ()
- public subroutine save_position ()
- end prototypes
- public subroutine get_mht (string arg_lnc_title);blob mht
- string msg
- int result
- UPDATE lnc_notice SET read_time=read_time+1 WHERE lnc_title = :arg_lnc_title;
- SELECT lnc_content INTO :mht FROM lnc_notice WHERE lnc_title= :arg_lnc_title;
- result=f_blobtofile('fjtemp\'+arg_lnc_title+'.mhtml',mht,msg)
- IF result =1 THEN
- ole_1.object.navigate(f_ljnc_get_path()+'fjtemp\'+arg_lnc_title+'.mhtml')
- END IF
- end subroutine
- public subroutine change_readflag (integer arg_noticeid, integer arg_flag);Int readflag
- DateTime Now
- Now = DateTime(Today(),Now())
- long row
- IF is_click =true THEN
- row=dw_1.getclickedrow( )
- ELSE
- row=dw_1.getrow( )
- END IF
- readflag = dw_1.GetItemDecimal(row, 'lnc_noticemx_readflag')
- IF readflag = 0 Then
- readflag = 1
- Else
- IF readflag = 1 Then readflag = 0
- End IF
- IF arg_flag =1 Then readflag = 1
- Update lnc_noticemx
- Set lnc_noticemx.readflag = :readflag ,
- lnc_noticemx.readdt = :Now
- Where dbo.lnc_noticemx.noticeid = :arg_noticeid And
- dbo.lnc_noticemx.UserID = :publ_userid;
-
- If sqlca.SQLCode = 0 Then
- Commit;
- dw_1.SetItem(row, 'lnc_noticemx_readflag',readflag)
- End If
- end subroutine
- public subroutine set_position ();This.X = Integer(ProfileString('ljnc_position.ini','w_ljnc_notice_detail','x','608'))
- This.Y = Integer(ProfileString('ljnc_position.ini','w_ljnc_notice_detail','y','320'))
- This.Width = Integer(ProfileString('ljnc_position.ini','w_ljnc_notice_detail','width','5000'))
- This.Height = Integer(ProfileString('ljnc_position.ini','w_ljnc_notice_detail','height','2300'))
- If This.Width < 658 Or This.Height < 156 Then
- This.Width = 5000
- This.Height = 2300
- End If
- end subroutine
- public subroutine save_position ();int fileno
- IF FileExists('ljnc_position.ini') =false THEN
- fileno=FileOpen('ljnc_position.ini',StreamMode!, Write!, LockWrite!, Replace!)
- FileClose(fileno)
- END IF
-
- SetProfileString('ljnc_position.ini','w_ljnc_notice_detail','x',string(this.x))
- SetProfileString('ljnc_position.ini','w_ljnc_notice_detail','y',string(this.y))
- SetProfileString('ljnc_position.ini','w_ljnc_notice_detail','width',string(this.width))
- SetProfileString('ljnc_position.ini','w_ljnc_notice_detail','height',string(this.height))
- end subroutine
- on w_ljnc_preview.create
- int iCurrent
- call super::create
- this.ole_1=create ole_1
- this.st_1=create st_1
- this.sle_1=create sle_1
- this.lb_1=create lb_1
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.ole_1
- this.Control[iCurrent+2]=this.st_1
- this.Control[iCurrent+3]=this.sle_1
- this.Control[iCurrent+4]=this.lb_1
- end on
- on w_ljnc_preview.destroy
- call super::destroy
- destroy(this.ole_1)
- destroy(this.st_1)
- destroy(this.sle_1)
- destroy(this.lb_1)
- end on
- event open;call super::open;set_position( ) //设置初始位置
- f_create_directory(f_ljnc_get_path()+'fjtemp\') //判断是否有改目录,无则创建
- em_1.text=String(year(today()) - 1) + '-' + String(month(today())) + '-' +String(day(today()))
- cb_1.triggerevent(clicked!)
- s_edit_index_tran ss_edit_index_tran
- ss_edit_index_tran = Message.powerobjectparm
- String arg_lnc_title
- arg_lnc_title = left(ss_edit_index_tran.arg_string_code,pos(ss_edit_index_tran.arg_string_code,'[') -1)
- IF IsNull(ss_edit_index_tran.arg_string_code) OR ss_edit_index_tran.arg_string_code='' THEN
- IF dw_1.getrow( ) > 0 THEN
- get_mht(dw_1.getitemstring( 1, 'lnc_notice_lnc_title'))
- END IF
- ELSE
- get_mht(arg_lnc_title)
- int i= 1
- DO WHILE dw_1.rowcount()>=i
- IF dw_1.getitemstring(i, 'lnc_notice_lnc_title') = arg_lnc_title THEN
- IF i=1 THEN
- change_readflag(dw_1.getitemdecimal(1, 'lnc_notice_noticeid'),1)
- END IF
- dw_1.setrow(i)
- i=dw_1.rowcount()
- END IF
- i ++
- LOOP
- END IF
- end event
- event resize;call super::resize;dw_1.width= this.width * 0.2
- ole_1.width=this.width * 0.8 - 120
- ole_1.x=dw_1.x + dw_1.width + 30
- ole_1.height=dw_1.height -20
- end event
- event close;call super::close;save_position( ) //保存位置
- end event
- type cb_func from w_publ_easyq`cb_func within w_ljnc_preview
- boolean visible = false
- boolean enabled = false
- end type
- type cb_exit from w_publ_easyq`cb_exit within w_ljnc_preview
- boolean visible = false
- integer x = 430
- boolean enabled = false
- end type
- type cb_2 from w_publ_easyq`cb_2 within w_ljnc_preview
- boolean visible = false
- boolean enabled = false
- end type
- type cb_psetup from w_publ_easyq`cb_psetup within w_ljnc_preview
- boolean visible = false
- boolean enabled = false
- end type
- type cb_1 from w_publ_easyq`cb_1 within w_ljnc_preview
- integer x = 256
- integer width = 165
- string text = "查询"
- end type
- event cb_1::clicked;call super::clicked;DateTime firstdate,enddate
- firstdate = DateTime(Date(EM_1.Text),Time(0))
- enddate = DateTime(Date(EM_2.Text),Time('23:59:59'))
- dw_1.retrieve(publ_userid,firstdate,enddate,sle_1.text)
- is_select_flag =1
- end event
- type st_3 from w_publ_easyq`st_3 within w_ljnc_preview
- integer x = 1705
- integer y = 68
- long backcolor = 134217738
- end type
- event st_3::constructor;call super::constructor;this.backcolor=rgb(236,233,216)
- end event
- type st_4 from w_publ_easyq`st_4 within w_ljnc_preview
- integer x = 2414
- integer y = 68
- end type
- event st_4::constructor;call super::constructor;this.backcolor=rgb(236,233,216)
- end event
- type em_1 from w_publ_easyq`em_1 within w_ljnc_preview
- integer x = 1906
- integer y = 52
- end type
- type em_2 from w_publ_easyq`em_2 within w_ljnc_preview
- integer x = 2519
- integer y = 52
- end type
- type ddlb_yl from w_publ_easyq`ddlb_yl within w_ljnc_preview
- boolean visible = false
- end type
- type cbx_yl from w_publ_easyq`cbx_yl within w_ljnc_preview
- boolean visible = false
- boolean enabled = false
- end type
- type dw_1 from w_publ_easyq`dw_1 within w_ljnc_preview
- integer y = 180
- integer width = 1518
- integer height = 1944
- string dataobject = "dw_ljnc_notice_list"
- end type
- event dw_1::clicked;call super::clicked;IF dwo.name='lnc_noticemx_readflag' and row > 0 THEN
- is_click=true
- change_readflag(getitemdecimal( getclickedrow( ), 'lnc_notice_noticeid'),0)
- END IF
- modify("DataWindow.Selected.Mouse=No")
- end event
- event dw_1::rowfocuschanged;call super::rowfocuschanged;IF is_first=true THEN
- is_first=false
- return
- END IF
-
- IF is_click = false THEN
- change_readflag(getitemdecimal( getrow( ), 'lnc_notice_noticeid'),1)
- ELSE
- is_click=false
- END IF
- get_mht(getitemstring(getrow( ), 'lnc_notice_lnc_title'))
- end event
- type sle_mtrl from w_publ_easyq`sle_mtrl within w_ljnc_preview
- end type
- type sle_cust from w_publ_easyq`sle_cust within w_ljnc_preview
- end type
- type st_mtrl from w_publ_easyq`st_mtrl within w_ljnc_preview
- end type
- type st_cust from w_publ_easyq`st_cust within w_ljnc_preview
- end type
- type cbx_loginretr from w_publ_easyq`cbx_loginretr within w_ljnc_preview
- end type
- type pb_em1 from w_publ_easyq`pb_em1 within w_ljnc_preview
- integer x = 2322
- integer y = 52
- end type
- type pb_em2 from w_publ_easyq`pb_em2 within w_ljnc_preview
- integer x = 2935
- integer y = 52
- end type
- type pb_2 from w_publ_easyq`pb_2 within w_ljnc_preview
- integer x = 3045
- integer y = 52
- end type
- type cb_help from w_publ_easyq`cb_help within w_ljnc_preview
- boolean visible = false
- integer x = 425
- boolean enabled = false
- end type
- type cb_copyself from w_publ_easyq`cb_copyself within w_ljnc_preview
- integer x = 0
- end type
- type gb_1 from w_publ_easyq`gb_1 within w_ljnc_preview
- end type
- type ln_bar from w_publ_easyq`ln_bar within w_ljnc_preview
- end type
- type ln_bar2 from w_publ_easyq`ln_bar2 within w_ljnc_preview
- end type
- type r_bar from w_publ_easyq`r_bar within w_ljnc_preview
- end type
- type ln_1 from w_publ_easyq`ln_1 within w_ljnc_preview
- boolean visible = false
- end type
- type ln_2 from w_publ_easyq`ln_2 within w_ljnc_preview
- boolean visible = false
- end type
- type ln_3 from w_publ_easyq`ln_3 within w_ljnc_preview
- boolean visible = false
- end type
- type ln_4 from w_publ_easyq`ln_4 within w_ljnc_preview
- boolean visible = false
- end type
- type ole_1 from olecustomcontrol within w_ljnc_preview
- event statustextchange ( string text )
- event progresschange ( long progress, long progressmax )
- event commandstatechange ( long command, boolean enable )
- event downloadbegin ( )
- event downloadcomplete ( )
- event titlechange ( string text )
- event propertychange ( string szproperty )
- event beforenavigate2 ( oleobject pdisp, any url, any flags, any targetframename, any postdata, any headers, ref boolean cancel )
- event newwindow2 ( ref oleobject ppdisp, ref boolean cancel )
- event navigatecomplete2 ( oleobject pdisp, any url )
- event documentcomplete ( oleobject pdisp, any url )
- event onquit ( )
- event onvisible ( boolean ocx_visible )
- event ontoolbar ( boolean toolbar )
- event onmenubar ( boolean menubar )
- event onstatusbar ( boolean statusbar )
- event onfullscreen ( boolean fullscreen )
- event ontheatermode ( boolean theatermode )
- event windowsetresizable ( boolean resizable )
- event windowsetleft ( long left )
- event windowsettop ( long top )
- event windowsetwidth ( long ocx_width )
- event windowsetheight ( long ocx_height )
- event windowclosing ( boolean ischildwindow, ref boolean cancel )
- event clienttohostwindow ( ref long cx, ref long cy )
- event setsecurelockicon ( long securelockicon )
- event filedownload ( ref boolean cancel )
- event navigateerror ( oleobject pdisp, any url, any frame, any statuscode, ref boolean cancel )
- event printtemplateinstantiation ( oleobject pdisp )
- event printtemplateteardown ( oleobject pdisp )
- event updatepagestatus ( oleobject pdisp, any npage, any fdone )
- event privacyimpactedstatechange ( boolean bimpacted )
- integer x = 1541
- integer y = 180
- integer width = 1678
- integer height = 1356
- integer taborder = 70
- boolean bringtotop = true
- borderstyle borderstyle = stylelowered!
- boolean focusrectangle = false
- string binarykey = "w_ljnc_preview.win"
- integer textsize = -12
- integer weight = 400
- fontcharset fontcharset = ansi!
- fontpitch fontpitch = variable!
- fontfamily fontfamily = swiss!
- string facename = "Tahoma"
- long textcolor = 33554432
- end type
- type st_1 from statictext within w_ljnc_preview
- integer x = 462
- integer y = 68
- integer width = 480
- integer height = 48
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "标题或关键字包含:"
- alignment alignment = right!
- boolean focusrectangle = false
- end type
- event constructor;this.backcolor=rgb(236,233,216)
- end event
- type sle_1 from singlelineedit within w_ljnc_preview
- integer x = 942
- integer y = 52
- integer width = 741
- integer height = 84
- integer taborder = 110
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- borderstyle borderstyle = stylelowered!
- end type
- type lb_1 from listbox within w_ljnc_preview
- boolean visible = false
- integer x = 2135
- integer y = 1784
- integer width = 361
- integer height = 108
- integer taborder = 90
- boolean bringtotop = true
- integer textsize = -12
- integer weight = 400
- fontcharset fontcharset = ansi!
- fontpitch fontpitch = variable!
- fontfamily fontfamily = swiss!
- string facename = "Tahoma"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- end type
- Start of PowerBuilder Binary Data Section : Do NOT Edit
- 05w_ljnc_preview.bin
- 2600000a00e011cfd0e11ab1a1000000000000000000000000000000000003003e0009fffe000000060000000000000000000000010000000100000000000010000000000200000001fffffffe0000000000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdfffffffefffffffefffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff006f00520074006f004500200074006e00790072000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050016ffffffffffffffff00000001000000000000000000000000000000000000000000000000000000007034d1f001cfd88a00000003000001800000000000500003004f0042005800430054005300450052004d0041000000000000000000000000000000000000000000000000000000000000000000000000000000000102001affffffff00000002ffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000000000009c00000000004200500043004f00530058004f00540041005200450047000000000000000000000000000000000000000000000000000000000000000000000000000000000001001affffffffffffffff000000038856f96111d0340ac0006ba9a205d74f000000007034d1f001cfd88a7034d1f001cfd88a000000000000000000000000004f00430054004e004e00450053005400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001020012ffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000000000000000030000009c000000000000000100000002fffffffe0000000400000005fffffffeffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
- 26ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000004c000025ee000023090000000000000000000000000000000000000000000000000000004c0000000000000000000000010057d0e011cf3573000869ae62122e2b00000008000000000000004c0002140100000000000000c0460000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c000025ee000023090000000000000000000000000000000000000000000000000000004c0000000000000000000000010057d0e011cf3573000869ae62122e2b00000008000000000000004c0002140100000000000000c0460000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
- 15w_ljnc_preview.bin
- End of PowerBuilder Binary Data Section : No Source Expected After This Point
|