w_userinfo_def.srw 98 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053
  1. $PBExportHeader$w_userinfo_def.srw
  2. forward
  3. global type w_userinfo_def from window
  4. end type
  5. type cbx_tree from checkbox within w_userinfo_def
  6. end type
  7. type cbx_ifphone from checkbox within w_userinfo_def
  8. end type
  9. type ddlb_dlflag from dropdownlistbox within w_userinfo_def
  10. end type
  11. type st_5 from statictext within w_userinfo_def
  12. end type
  13. type cb_other_func from uo_imflatbutton within w_userinfo_def
  14. end type
  15. type cbx_ifnotin from checkbox within w_userinfo_def
  16. end type
  17. type cbx_usecard from checkbox within w_userinfo_def
  18. end type
  19. type cb_help from uo_imflatbutton within w_userinfo_def
  20. end type
  21. type sle_cardno from singlelineedit within w_userinfo_def
  22. end type
  23. type st_4 from statictext within w_userinfo_def
  24. end type
  25. type tab_1 from tab within w_userinfo_def
  26. end type
  27. type tabpage_1 from userobject within tab_1
  28. end type
  29. type tv_2 from treeview within tabpage_1
  30. end type
  31. type tabpage_1 from userobject within tab_1
  32. tv_2 tv_2
  33. end type
  34. type tabpage_2 from userobject within tab_1
  35. end type
  36. type tv_1 from treeview within tabpage_2
  37. end type
  38. type tabpage_2 from userobject within tab_1
  39. tv_1 tv_1
  40. end type
  41. type tabpage_3 from userobject within tab_1
  42. end type
  43. type cbx_inuse_storage from checkbox within tabpage_3
  44. end type
  45. type dw_6 from datawindow within tabpage_3
  46. end type
  47. type dw_2 from datawindow within tabpage_3
  48. end type
  49. type dw_3 from datawindow within tabpage_3
  50. end type
  51. type tabpage_3 from userobject within tab_1
  52. cbx_inuse_storage cbx_inuse_storage
  53. dw_6 dw_6
  54. dw_2 dw_2
  55. dw_3 dw_3
  56. end type
  57. type tabpage_7 from userobject within tab_1
  58. end type
  59. type dw_9 from u_dw_rbtnfilter within tabpage_7
  60. end type
  61. type tabpage_7 from userobject within tab_1
  62. dw_9 dw_9
  63. end type
  64. type tabpage_8 from userobject within tab_1
  65. end type
  66. type dw_10 from datawindow within tabpage_8
  67. end type
  68. type tabpage_8 from userobject within tab_1
  69. dw_10 dw_10
  70. end type
  71. type tabpage_4 from userobject within tab_1
  72. end type
  73. type dw_4 from u_dw_rbtnfilter within tabpage_4
  74. end type
  75. type dw_7 from u_dw_rbtnfilter within tabpage_4
  76. end type
  77. type tabpage_4 from userobject within tab_1
  78. dw_4 dw_4
  79. dw_7 dw_7
  80. end type
  81. type tabpage_5 from userobject within tab_1
  82. end type
  83. type dw_5 from datawindow within tabpage_5
  84. end type
  85. type tabpage_5 from userobject within tab_1
  86. dw_5 dw_5
  87. end type
  88. type tabpage_6 from userobject within tab_1
  89. end type
  90. type dw_8 from u_dw_rbtnfilter within tabpage_6
  91. end type
  92. type tabpage_6 from userobject within tab_1
  93. dw_8 dw_8
  94. end type
  95. type tab_1 from tab within w_userinfo_def
  96. tabpage_1 tabpage_1
  97. tabpage_2 tabpage_2
  98. tabpage_3 tabpage_3
  99. tabpage_7 tabpage_7
  100. tabpage_8 tabpage_8
  101. tabpage_4 tabpage_4
  102. tabpage_5 tabpage_5
  103. tabpage_6 tabpage_6
  104. end type
  105. type cb_superpsw from uo_imflatbutton within w_userinfo_def
  106. end type
  107. type cb_undo from uo_imflatbutton within w_userinfo_def
  108. end type
  109. type cb_paste from uo_imflatbutton within w_userinfo_def
  110. end type
  111. type cb_copy from uo_imflatbutton within w_userinfo_def
  112. end type
  113. type cb_setpws from uo_imflatbutton within w_userinfo_def
  114. end type
  115. type cb_select_emp from uo_imflatbutton within w_userinfo_def
  116. end type
  117. type dw_1 from u_dw_rbtnfilter within w_userinfo_def
  118. end type
  119. type sle_dscrp from singlelineedit within w_userinfo_def
  120. end type
  121. type st_3 from statictext within w_userinfo_def
  122. end type
  123. type sle_xm from singlelineedit within w_userinfo_def
  124. end type
  125. type sle_id from singlelineedit within w_userinfo_def
  126. end type
  127. type st_2 from statictext within w_userinfo_def
  128. end type
  129. type st_1 from statictext within w_userinfo_def
  130. end type
  131. type cb_end from uo_imflatbutton within w_userinfo_def
  132. end type
  133. type cb_del from uo_imflatbutton within w_userinfo_def
  134. end type
  135. type cb_mod from uo_imflatbutton within w_userinfo_def
  136. end type
  137. type cb_add from uo_imflatbutton within w_userinfo_def
  138. end type
  139. type ln_bar from line within w_userinfo_def
  140. end type
  141. type ln_bar2 from line within w_userinfo_def
  142. end type
  143. type r_bar from rectangle within w_userinfo_def
  144. end type
  145. end forward
  146. global type w_userinfo_def from window
  147. integer x = 5
  148. integer y = 4
  149. integer width = 3918
  150. integer height = 2284
  151. boolean titlebar = true
  152. string title = "用户权限设置"
  153. boolean controlmenu = true
  154. boolean minbox = true
  155. boolean maxbox = true
  156. windowtype windowtype = popup!
  157. windowstate windowstate = maximized!
  158. long backcolor = 134217739
  159. boolean center = true
  160. event ue_print_report ( )
  161. event ue_print_report_cancle ( )
  162. event ue_sendout ( )
  163. event ue_sendout_cancle ( )
  164. event ue_save ( )
  165. event ue_undo ( )
  166. event ue_edit ( )
  167. event ue_select_allson ( )
  168. event ue_select_allson_all ( )
  169. cbx_tree cbx_tree
  170. cbx_ifphone cbx_ifphone
  171. ddlb_dlflag ddlb_dlflag
  172. st_5 st_5
  173. cb_other_func cb_other_func
  174. cbx_ifnotin cbx_ifnotin
  175. cbx_usecard cbx_usecard
  176. cb_help cb_help
  177. sle_cardno sle_cardno
  178. st_4 st_4
  179. tab_1 tab_1
  180. cb_superpsw cb_superpsw
  181. cb_undo cb_undo
  182. cb_paste cb_paste
  183. cb_copy cb_copy
  184. cb_setpws cb_setpws
  185. cb_select_emp cb_select_emp
  186. dw_1 dw_1
  187. sle_dscrp sle_dscrp
  188. st_3 st_3
  189. sle_xm sle_xm
  190. sle_id sle_id
  191. st_2 st_2
  192. st_1 st_1
  193. cb_end cb_end
  194. cb_del cb_del
  195. cb_mod cb_mod
  196. cb_add cb_add
  197. ln_bar ln_bar
  198. ln_bar2 ln_bar2
  199. r_bar r_bar
  200. end type
  201. global w_userinfo_def w_userinfo_def
  202. type prototypes
  203. subroutine keybd_event(uint bVk,uint bScan,long dwFlags,long dwExtraInfo ) library 'user32.dll'
  204. Function long GetCursor () Library "user32.dll" Alias for "GetCursor"
  205. Function long LoadCursor (long hInstance, long lpCursorName) Library "user32.dll" Alias for "LoadCursorW"
  206. end prototypes
  207. type variables
  208. boolean modisign=false //编辑、增加标志
  209. boolean dw_edit_mode=false //可编辑状态标志
  210. long deep=0,deep_area = 0
  211. string is_id //当前操作员id
  212. string copy_rightstring=''
  213. long ins_empid=0
  214. uo_usergroup uo_user
  215. treeview tv_func,tv_cusarea
  216. datawindow dw_5,dw_4,dw_3,dw_2,dw_6,dw_7,dw_8,dw_9,dw_10
  217. long il_handle_arr[], il_state_arr[]
  218. long il_max = 0
  219. s_sys_user s_user_copy
  220. long tv_func_cur_handle
  221. long tmp_chflag = 1
  222. end variables
  223. forward prototypes
  224. public function integer wf_lockface ()
  225. public function string wf_getright ()
  226. public subroutine wf_refresh ()
  227. public subroutine wf_copyright ()
  228. public subroutine wf_pasteright ()
  229. public function string wf_get_storage ()
  230. public function string wf_get_sc ()
  231. public function integer wf_build_functree ()
  232. public function integer pf_treegrowth (long arg_handl, long arg_funcid, integer arg_lp)
  233. public subroutine wf_refresh_tvchild (long arg_handl, string arg_rightstr)
  234. public subroutine wf_refresh_tvnext (long arg_handl, string arg_rightstr)
  235. public subroutine wf_getright_tvchild (long arg_handl, ref string arg_rightstr)
  236. public subroutine wf_getright_tvnext (long arg_handl, ref string arg_rightstr)
  237. public subroutine wf_set_tvparent (long arg_handl)
  238. public subroutine wf_set_tvchild (long arg_handl)
  239. public subroutine wf_set_tvnext (long arg_handl)
  240. public subroutine wf_clear_tvnext (long arg_handl)
  241. public subroutine wf_clear_tvchild (long arg_handl)
  242. public function integer wf_build_areatree ()
  243. public function integer pf_treegrowth_area (long arg_handl, long arg_parentid, integer arg_lp)
  244. public subroutine wf_refresh_tvchild_area (long arg_handl, string arg_areastr)
  245. public subroutine wf_refresh_tvnext_area (long arg_handl, string arg_areastr)
  246. public subroutine wf_getarea_tvchild (long arg_handl, ref string arg_areastr)
  247. public subroutine wf_getarea_tvnext (long arg_handl, ref string arg_areastr)
  248. public function string wf_getarea ()
  249. public subroutine wf_set_tvchild_area (long arg_handl, integer arg_index)
  250. public subroutine wf_set_tvnext_area (long arg_handl, integer arg_index)
  251. public subroutine wf_set_tvparent_area (long arg_handl)
  252. public subroutine wf_clear_tvchild_area (long arg_handl)
  253. public subroutine wf_clear_tvnext_area (long arg_handl)
  254. public subroutine wf_get_class (ref string arg_classedit, ref string arg_classview)
  255. public subroutine wf_get_xlspowerstr (ref string arg_xls_printstr, ref string arg_xls_sendstr)
  256. public function string wf_get_spttype ()
  257. public subroutine wf_get_plugins (ref string arg_str)
  258. public subroutine wf_get_report (ref string arg_str)
  259. public subroutine wf_set_sendout_tvnext (long arg_handl, integer arg_flag, integer arg_type)
  260. public subroutine wf_set_sendout_tvchild (long arg_handl, integer arg_flag, integer arg_type)
  261. public subroutine wf_set_sendout (integer arg_flag, integer arg_type)
  262. public function long wf_gethandlestate (long arg_handle)
  263. public subroutine wf_sethandlestate (long arg_handle, long arg_state)
  264. public subroutine wf_get_account (ref string arg_str)
  265. public subroutine wf_get_outrep (ref string arg_str)
  266. public subroutine wf_refresh_mx (s_sys_user arg_s_user)
  267. public subroutine wf_set_tvchild_son (long arg_handl, integer arg_index)
  268. public subroutine wf_set_tvchild_son_all (long arg_handl, integer arg_index)
  269. public subroutine wf_select_all (datawindow arg_dw, dwobject dwo)
  270. end prototypes
  271. event ue_print_report();wf_set_sendout(1,1)
  272. end event
  273. event ue_print_report_cancle();wf_set_sendout(0,1)
  274. end event
  275. event ue_sendout();wf_set_sendout(1,0)
  276. end event
  277. event ue_sendout_cancle();wf_set_sendout(0,0)
  278. end event
  279. event ue_save();String ls_str,ls_storage_str,ls_sc_str,ls_areastr
  280. String ls_id,ls_name,ls_pass,ls_dscrp,ls_cardno,ls_showdate
  281. Long ll_row,i,ll_findrow
  282. String arg_msg
  283. String ls_classeditstr,ls_classviewstr
  284. String ls_xls_printstr,ls_xls_sendstr
  285. String ls_spttypestr
  286. String ls_plugins_str
  287. String ls_reportstr
  288. String ls_accountstr
  289. string ls_outrepstr
  290. Int li_ifnotin = 0
  291. Int li_dlflag = 0
  292. Int li_ifphone = 0
  293. ls_id = Trim(sle_id.Text)
  294. IF ls_id = "" THEN
  295. MessageBox("提示","必须填写用户代码!", Information!, OK! )
  296. sle_id.SetFocus()
  297. RETURN
  298. END IF
  299. ls_name = Trim(sle_xm.Text)
  300. IF ls_name = "" THEN
  301. MessageBox("提示","必须填写用户姓名!", Information!, OK! )
  302. sle_xm.SetFocus()
  303. RETURN
  304. END IF
  305. ls_dscrp = Trim(sle_dscrp.Text)
  306. ls_cardno = Trim(sle_cardno.Text)
  307. CHOOSE CASE ddlb_dlflag.Text
  308. CASE '单口令'
  309. li_dlflag = 0
  310. CASE '单指纹'
  311. li_dlflag = 1
  312. CASE '口令+指纹'
  313. li_dlflag = 2
  314. END CHOOSE
  315. ls_str = wf_getright() //get the user-right string
  316. ls_areastr = wf_getarea() //get the user-area string
  317. IF sys_option_cusarea = 0 THEN ls_areastr = '0'
  318. IF cbx_ifnotin.Checked THEN li_ifnotin = 1
  319. IF cbx_ifphone.Checked THEN li_ifphone = 1
  320. ls_storage_str = wf_get_storage() //get the user-storage string
  321. ls_sc_str = wf_get_sc()//get the user-sc string
  322. ls_spttypestr = wf_get_spttype() //get the user-spttype string
  323. wf_get_class(ls_classeditstr,ls_classviewstr)
  324. wf_get_xlspowerstr(ls_xls_printstr,ls_xls_sendstr)
  325. wf_get_plugins(ls_plugins_str)
  326. wf_get_report(ls_reportstr)
  327. wf_get_account(ls_accountstr)
  328. wf_get_outrep(ls_outrepstr)
  329. IF uo_user.saveuser(modisign,sys_scid,ins_empid,ls_id,ls_name,&
  330. ls_cardno,ls_dscrp,ls_str,ls_storage_str,ls_sc_str,ls_areastr,&
  331. ls_classeditstr,ls_classviewstr,ls_xls_printstr,ls_xls_sendstr,&
  332. ls_spttypestr,ls_plugins_str,ls_reportstr,li_ifnotin,li_dlflag,&
  333. arg_msg,TRUE,ls_accountstr,ls_outrepstr,li_ifphone) = 0 THEN
  334. MessageBox(publ_operator,arg_msg)
  335. RETURN
  336. END IF
  337. dw_1.Retrieve(sys_scid)
  338. ll_findrow = dw_1.Find("empid="+String(ins_empid),1,dw_1.RowCount())
  339. IF ll_findrow > 0 THEN
  340. dw_1.SelectRow(0,FALSE)
  341. dw_1.SetRow(ll_findrow)
  342. dw_1.SelectRow(ll_findrow,TRUE)
  343. END IF
  344. MessageBox("提示",'用户资料已经成功更新!', Information!, OK! )
  345. modisign = FALSE
  346. dw_edit_mode = FALSE
  347. WF_LOCKFACE()
  348. end event
  349. event ue_undo();Long currentrow
  350. currentrow = dw_1.GetRow()
  351. IF currentrow >= 1 THEN
  352. sle_id.Text = dw_1.Object.u_user_userid[currentrow]
  353. sle_xm.Text = dw_1.Object.username[currentrow]
  354. sle_dscrp.Text = dw_1.Object.descrp[currentrow]
  355. WF_REFRESH()
  356. END IF
  357. dw_edit_mode = FALSE
  358. WF_LOCKFACE()
  359. modisign = FALSE
  360. end event
  361. event ue_edit();IF Trim(sle_id.Text) = sys_super_id THEN
  362. MessageBox("提示",'超级用户记录不能修改!', Information!, OK! )
  363. RETURN
  364. END IF
  365. IF dw_1.GetRow() <= 0 THEN
  366. MessageBox("提示",'没有修改对象!', Information!, OK! )
  367. RETURN
  368. END IF
  369. dw_edit_mode = TRUE
  370. modisign = TRUE
  371. wf_lockface()
  372. is_id = dw_1.Object.u_user_userid[dw_1.GetRow()]
  373. sle_id.SetFocus()
  374. end event
  375. event ue_select_allson();Long Handle
  376. IF tv_func_cur_handle > 0 THEN
  377. Handle = tv_func_cur_handle
  378. ELSE
  379. Handle = tab_1.tabpage_1.tv_2.FindItem(CurrentTreeItem!, 0)
  380. END IF
  381. IF Handle > 0 THEN
  382. wf_set_tvchild_son(Handle, 2)
  383. END IF
  384. RETURN
  385. end event
  386. event ue_select_allson_all();Long Handle
  387. IF tv_func_cur_handle > 0 THEN
  388. Handle = tv_func_cur_handle
  389. ELSE
  390. Handle = tab_1.tabpage_1.tv_2.FindItem(CurrentTreeItem!, 0)
  391. END IF
  392. IF Handle > 0 THEN
  393. wf_set_tvchild_son_all(Handle, 2)
  394. END IF
  395. RETURN
  396. end event
  397. public function integer wf_lockface ();//wf_lockface
  398. Int cnt,i,j
  399. tab_1.tabpage_3.cbx_inuse_storage.Enabled = Not dw_edit_mode
  400. IF dw_edit_mode THEN
  401. sle_id.DisplayOnly = False
  402. sle_xm.DisplayOnly = False
  403. sle_dscrp.DisplayOnly = False
  404. sle_cardno.DisplayOnly = False
  405. cbx_usecard.Enabled = True
  406. cb_add.Enabled = False
  407. cb_del.Enabled = False
  408. // cb_mod.Enabled = FALSE
  409. // cb_yes.Enabled = TRUE
  410. cb_undo.Enabled = True
  411. cb_superpsw.Enabled = False
  412. cbx_ifnotin.Enabled = True
  413. cbx_ifphone.Enabled = True
  414. IF modisign THEN
  415. cb_select_emp.Enabled = False
  416. ELSE
  417. cb_select_emp.Enabled = True
  418. END IF
  419. dw_2.SetTabOrder('choice',10)
  420. dw_3.SetTabOrder('choice',10)
  421. dw_4.SetTabOrder('allow_edit',20)
  422. dw_4.SetTabOrder('allow_view',10)
  423. dw_6.SetTabOrder('ch',10)
  424. dw_7.SetTabOrder('ch',10)
  425. dw_10.SetTabOrder('choice', 10)
  426. cb_paste.Enabled = True
  427. cb_copy.Enabled = False
  428. cb_other_func.Enabled = True
  429. cb_mod.Text = "保存"
  430. cb_mod.normalpicname = 'Save.bmp'
  431. ELSE
  432. cbx_usecard.Enabled = False
  433. sle_id.DisplayOnly = True
  434. sle_xm.DisplayOnly = True
  435. sle_cardno.DisplayOnly = cbx_usecard.Checked
  436. sle_dscrp.DisplayOnly = True
  437. cb_add.Enabled = True
  438. cb_del.Enabled = True
  439. // cb_mod.Enabled = TRUE
  440. // cb_yes.Enabled = FALSE
  441. cb_undo.Enabled = False
  442. cb_superpsw.Enabled = True
  443. cb_select_emp.Enabled = False
  444. cbx_ifnotin.Enabled = False
  445. cbx_ifphone.Enabled = False
  446. dw_2.SetTabOrder('choice',0)
  447. dw_3.SetTabOrder('choice',0)
  448. dw_4.SetTabOrder('allow_edit',0)
  449. dw_4.SetTabOrder('allow_view',0)
  450. dw_6.SetTabOrder('ch',0)
  451. dw_7.SetTabOrder('ch',0)
  452. dw_10.SetTabOrder('choice', 0)
  453. cb_paste.Enabled = False
  454. cb_copy.Enabled = True
  455. cb_other_func.Enabled = False
  456. cb_mod.Text = "修改"
  457. cb_mod.normalpicname = 'open.bmp'
  458. END IF
  459. cb_mod.of_init_draw()
  460. cb_mod.of_paint()
  461. cb_mod.TriggerEvent('ue_textchange')
  462. RETURN 0
  463. end function
  464. public function string wf_getright ();string ls_ret
  465. ls_ret=fill("0",5000)
  466. long ll_handl
  467. ll_handl = tv_func.finditem(RootTreeItem!,0)
  468. if ll_handl > 0 then wf_getright_tvchild(ll_handl,ls_ret)
  469. return ls_ret
  470. end function
  471. public subroutine wf_refresh ();//wf_refresh
  472. Long ll_row
  473. Long ll_storageid,ll_scid,ll_ClassID,ll_xls_templates_id,ll_spttypeid,ll_fileid
  474. Long i,li_no,cnt
  475. String ls_str,ls_storage_str,ls_scstr,ls_areastr, ls_outrepstr
  476. String ls_classedit_str,ls_classview_str,ls_xls_printstr,ls_xls_sendstr,ls_spttype_str
  477. String ls_plugins_str
  478. String ls_reportstr
  479. Long ll_reportid
  480. String ls_accountstr
  481. Long ll_accountsid
  482. String ls_outrepname
  483. ll_row = dw_1.GetRow()
  484. IF ll_row > 0 THEN
  485. IF is_id = sys_super_id THEN
  486. ls_str = Fill('1',5000)
  487. ls_storage_str = '0'
  488. ls_scstr = '0'
  489. ls_areastr = '0'
  490. ls_classedit_str = '0'
  491. ls_classview_str = '0'
  492. ls_xls_printstr = '0'
  493. ls_xls_sendstr = '0'
  494. ls_spttype_str = '0'
  495. ls_plugins_str = '0'
  496. ls_reportstr = '0'
  497. ls_accountstr = '0'
  498. ls_outrepstr = '0'
  499. ELSE
  500. SELECT rightstring,areastr,classeditstr,classviewstr,
  501. xls_printstr,xls_sendstr,spttypestr,pluginsstr ,
  502. reportstr,accountstr, outrepstr,storagestr,scstr
  503. INTO :ls_str,:ls_areastr,:ls_classedit_str,:ls_classview_str,
  504. :ls_xls_printstr,:ls_xls_sendstr,:ls_spttype_str,:ls_plugins_str,
  505. :ls_reportstr,:ls_accountstr, :ls_outrepstr,:ls_storage_str,:ls_scstr
  506. FROM u_user
  507. WHERE empid = :ins_empid
  508. AND scid = :sys_scid;
  509. IF sqlca.SQLCode <> 0 THEN
  510. MessageBox('提示','查询复制对象信息失败!', Information!, OK! )
  511. RETURN
  512. END IF
  513. // if sqlca.sqlcode <> 0 or isnull(ls_str) then
  514. // ls_str = ''
  515. // end if
  516. // if sqlca.sqlcode <> 0 or isnull(ls_areastr) then
  517. // ls_areastr = ''
  518. // end if
  519. // ls_str=f_psw_zh(ls_str,1,sys_power_key) //解密
  520. // ls_storage_str = dw_1.Object.storagestr[ll_row]
  521. // ls_scstr = dw_1.Object.scstr[ll_row]
  522. END IF
  523. END IF
  524. //**storage_checkbox
  525. FOR i = 1 TO dw_2.RowCount()
  526. IF ls_storage_str = '0' THEN
  527. dw_2.Object.choice[i] = 1
  528. ELSE
  529. ll_storageid = dw_2.Object.storageid[i]
  530. IF Pos(ls_storage_str,','+String(ll_storageid)+',',1) > 0 THEN
  531. dw_2.Object.choice[i] = 1
  532. ELSE
  533. dw_2.Object.choice[i] = 0
  534. END IF
  535. END IF
  536. NEXT
  537. //**sc_checkbox
  538. FOR i = 1 TO dw_3.RowCount()
  539. IF ls_scstr = '0' THEN
  540. dw_3.Object.choice[i] = 1
  541. ELSE
  542. ll_scid = dw_3.Object.scid[i]
  543. IF Pos(ls_scstr,','+String(ll_scid)+',',1) > 0 THEN
  544. dw_3.Object.choice[i] = 1
  545. ELSE
  546. dw_3.Object.choice[i] = 0
  547. END IF
  548. END IF
  549. NEXT
  550. // //** classedit _checkbox
  551. FOR i = 1 TO dw_4.RowCount()
  552. IF ls_classedit_str = '0' THEN
  553. dw_4.Object.allow_edit[i] = 1
  554. ELSE
  555. ll_ClassID = dw_4.Object.classid[i]
  556. IF Pos(ls_classedit_str,','+String(ll_ClassID)+',',1) > 0 THEN
  557. dw_4.Object.allow_edit[i] = 1
  558. ELSE
  559. dw_4.Object.allow_edit[i] = 0
  560. END IF
  561. END IF
  562. NEXT
  563. //** classview _checkbox
  564. FOR i = 1 TO dw_4.RowCount()
  565. IF ls_classview_str = '0' THEN
  566. dw_4.Object.allow_view[i] = 1
  567. ELSE
  568. ll_ClassID = dw_4.Object.classid[i]
  569. IF Pos(ls_classview_str,','+String(ll_ClassID)+',',1) > 0 THEN
  570. dw_4.Object.allow_view[i] = 1
  571. ELSE
  572. dw_4.Object.allow_view[i] = 0
  573. END IF
  574. END IF
  575. NEXT
  576. //** xls_printstr _checkbox
  577. FOR i = 1 TO dw_5.RowCount()
  578. IF ls_xls_printstr = '0' THEN
  579. dw_5.Object.allow_print[i] = 1
  580. ELSE
  581. ll_xls_templates_id = dw_5.Object.u_xls_templates_id[i]
  582. IF Pos(ls_xls_printstr,','+String(ll_xls_templates_id)+',',1) > 0 THEN
  583. dw_5.Object.allow_print[i] = 1
  584. ELSE
  585. dw_5.Object.allow_print[i] = 0
  586. END IF
  587. END IF
  588. NEXT
  589. //** xls_sendstr _checkbox
  590. FOR i = 1 TO dw_5.RowCount()
  591. IF ls_xls_sendstr = '0' THEN
  592. dw_5.Object.allow_send[i] = 1
  593. ELSE
  594. ll_xls_templates_id = dw_5.Object.u_xls_templates_id[i]
  595. IF Pos(ls_xls_sendstr,','+String(ll_xls_templates_id)+',',1) > 0 THEN
  596. dw_5.Object.allow_send[i] = 1
  597. ELSE
  598. dw_5.Object.allow_send[i] = 0
  599. END IF
  600. END IF
  601. NEXT
  602. //** ls_spttype_str _checkbox
  603. FOR i = 1 TO dw_6.RowCount()
  604. IF ls_spttype_str = '0' THEN
  605. dw_6.Object.ch[i] = 1
  606. ELSE
  607. ll_spttypeid = dw_6.Object.spttypeid[i]
  608. IF Pos(ls_spttype_str,','+String(ll_spttypeid)+',',1) > 0 THEN
  609. dw_6.Object.ch[i] = 1
  610. ELSE
  611. dw_6.Object.ch[i] = 0
  612. END IF
  613. END IF
  614. NEXT
  615. //** plugins_str _checkbox
  616. FOR i = 1 TO dw_7.RowCount()
  617. IF ls_plugins_str = '0' THEN
  618. dw_7.Object.ch[i] = 1
  619. ELSE
  620. ll_fileid = dw_7.Object.fileid[i]
  621. IF Pos(ls_plugins_str,','+String(ll_fileid)+',',1) > 0 THEN
  622. dw_7.Object.ch[i] = 1
  623. ELSE
  624. dw_7.Object.ch[i] = 0
  625. END IF
  626. END IF
  627. NEXT
  628. //自定义报表
  629. dw_8.SetRedraw(FALSE)
  630. FOR i = 1 TO dw_8.RowCount()
  631. IF ls_reportstr = '0' THEN
  632. dw_8.Object.ch[i] = 1
  633. ELSE
  634. ll_reportid = dw_8.Object.reportid[i]
  635. IF Pos(ls_reportstr,','+String(ll_reportid)+',',1) > 0 THEN
  636. dw_8.Object.ch[i] = 1
  637. ELSE
  638. dw_8.Object.ch[i] = 0
  639. END IF
  640. END IF
  641. NEXT
  642. dw_8.SetRedraw(TRUE)
  643. dw_9.SetRedraw(FALSE)
  644. FOR i = 1 TO dw_9.RowCount()
  645. IF ls_accountstr = '0' THEN
  646. dw_9.Object.ch[i] = 1
  647. ELSE
  648. ll_accountsid = dw_9.Object.accountsid[i]
  649. IF Pos(ls_accountstr,','+String(ll_accountsid)+',',1) > 0 THEN
  650. dw_9.Object.ch[i] = 1
  651. ELSE
  652. dw_9.Object.ch[i] = 0
  653. END IF
  654. END IF
  655. NEXT
  656. dw_9.SetRedraw(TRUE)
  657. dw_10.SetRedraw(FALSE)
  658. FOR i = 1 TO dw_10.RowCount()
  659. IF ls_outrepstr = '0' THEN
  660. dw_10.Object.choice[i] = 1
  661. ELSE
  662. ls_outrepname = dw_10.Object.outrepname[i]
  663. IF Pos(ls_outrepstr,','+String(ls_outrepname)+',',1) > 0 THEN
  664. dw_10.Object.choice[i] = 1
  665. ELSE
  666. dw_10.Object.choice[i] = 0
  667. END IF
  668. END IF
  669. NEXT
  670. dw_10.SetRedraw(TRUE)
  671. //**tv_checkbox
  672. //if ls_str = '' then return
  673. Long ll_handl
  674. ll_handl = tv_func.FindItem(RootTreeItem!,0)
  675. IF ll_handl > 0 THEN wf_refresh_tvchild(ll_handl,ls_str)
  676. //**tv_checkbox
  677. //if ls_areastr = '' then return
  678. Long ll_handl_area
  679. ll_handl_area = tv_cusarea.FindItem(RootTreeItem!,0)
  680. IF ll_handl_area > 0 THEN wf_refresh_tvchild_area(ll_handl_area,ls_areastr)
  681. RETURN
  682. end subroutine
  683. public subroutine wf_copyright ();Long ll_row
  684. String ls_str,ls_storage_str,ls_scstr,ls_areastr, ls_outrepstr
  685. String ls_classedit_str,ls_classview_str,ls_xls_printstr,ls_xls_sendstr,ls_spttype_str
  686. String ls_plugins_str
  687. String ls_reportstr
  688. String ls_accountstr
  689. String ls_outrepname
  690. ll_row = dw_1.GetRow()
  691. IF ll_row <= 0 THEN
  692. MessageBox('提示','没有复制对象!', Information!, OK! )
  693. RETURN
  694. END IF
  695. Open(w_user_copyright_ch)
  696. s_user_copy = Message.PowerObjectParm
  697. IF s_user_copy.copyflag = 0 THEN RETURN
  698. IF is_id = sys_super_id THEN
  699. ls_str = Fill('1',5000)
  700. ls_storage_str = '0'
  701. ls_scstr = '0'
  702. ls_areastr = '0'
  703. ls_classedit_str = '0'
  704. ls_classview_str = '0'
  705. ls_xls_printstr = '0'
  706. ls_xls_sendstr = '0'
  707. ls_spttype_str = '0'
  708. ls_plugins_str = '0'
  709. ls_reportstr = '0'
  710. ls_accountstr = '0'
  711. ls_outrepstr = '0'
  712. ELSE
  713. SELECT rightstring,areastr,classeditstr,classviewstr,
  714. xls_printstr,xls_sendstr,spttypestr,pluginsstr ,
  715. reportstr,accountstr, outrepstr,storagestr,scstr
  716. INTO :ls_str,:ls_areastr,:ls_classedit_str,:ls_classview_str,
  717. :ls_xls_printstr,:ls_xls_sendstr,:ls_spttype_str,:ls_plugins_str,
  718. :ls_reportstr,:ls_accountstr, :ls_outrepstr, :ls_storage_str, :ls_scstr
  719. FROM u_user
  720. WHERE empid = :ins_empid
  721. AND scid = :sys_scid;
  722. IF sqlca.SQLCode <> 0 THEN
  723. MessageBox('提示','查询复制对象信息失败!', Information!, OK! )
  724. RETURN
  725. END IF
  726. END IF
  727. s_user_copy.rightstring = ls_str
  728. s_user_copy.areastr = ls_areastr
  729. s_user_copy.scstr = ls_scstr
  730. s_user_copy.storagestr = ls_storage_str
  731. s_user_copy.spttypestr = ls_spttype_str
  732. s_user_copy.classeditstr = ls_classedit_str
  733. s_user_copy.classviewstr = ls_classview_str
  734. s_user_copy.pluginsstr = ls_plugins_str
  735. s_user_copy.xls_printstr = ls_xls_printstr
  736. s_user_copy.xls_sendstr = ls_xls_sendstr
  737. s_user_copy.reportstr = ls_reportstr
  738. s_user_copy.accountstr = ls_accountstr
  739. s_user_copy.outrepstr = ls_outrepstr
  740. MessageBox('提示','复制用户:'+String(dw_1.Object.username[dw_1.GetRow()])+'的权限成功', Information!, OK! )
  741. ////wf_copyright
  742. //Long ll_row
  743. //ll_row = dw_1.GetRow()
  744. //IF ll_row <= 0 THEN
  745. // MessageBox('提示','没有复制对象!', Information!, OK! )
  746. // RETURN
  747. //END IF
  748. //
  749. //IF ll_row > 0 THEN
  750. // IF is_id = sys_super_id THEN
  751. // copy_rightstring = Fill('1',2000)
  752. // ELSE
  753. // SELECT rightstring INTO :copy_rightstring
  754. // FROM u_user
  755. // WHERE empid = :ins_empid
  756. // AND scid = :sys_scid;
  757. // IF sqlca.SQLCode <> 0 OR IsNull(copy_rightstring) THEN
  758. // copy_rightstring = ''
  759. // END IF
  760. // // copy_rightstring=copy_rightstring,1,sys_power_key) //解密
  761. // END IF
  762. //END IF
  763. //
  764. //MessageBox('提示','复制用户:'+String(dw_1.Object.username[dw_1.GetRow()])+'的权限成功', Information!, OK! )
  765. end subroutine
  766. public subroutine wf_pasteright ();IF s_user_copy.copyflag = 0 THEN
  767. MessageBox("提示",'没有可粘贴的权限,请先复制权限', Information!, OK! )
  768. RETURN
  769. END IF
  770. Long i
  771. Long ll_storageid
  772. Long ll_scid
  773. Long ll_ClassID
  774. Long ll_xls_templates_id
  775. Long ll_spttypeid
  776. Long ll_fileid
  777. Long ll_reportid
  778. Long ll_accountsid
  779. String ls_outrepname
  780. //**storage_checkbox
  781. IF s_user_copy.storage_flag = 1 THEN
  782. FOR i = 1 TO dw_2.RowCount()
  783. IF s_user_copy.storagestr = '0' THEN
  784. dw_2.Object.choice[i] = 1
  785. ELSE
  786. ll_storageid = dw_2.Object.storageid[i]
  787. IF Pos(s_user_copy.storagestr,','+String(ll_storageid)+',',1) > 0 THEN
  788. dw_2.Object.choice[i] = 1
  789. ELSE
  790. dw_2.Object.choice[i] = 0
  791. END IF
  792. END IF
  793. NEXT
  794. END IF
  795. //**sc_checkbox
  796. IF s_user_copy.sc_flag = 1 THEN
  797. FOR i = 1 TO dw_3.RowCount()
  798. IF s_user_copy.scstr = '0' THEN
  799. dw_3.Object.choice[i] = 1
  800. ELSE
  801. ll_scid = dw_3.Object.scid[i]
  802. IF Pos(s_user_copy.scstr,','+String(ll_scid)+',',1) > 0 THEN
  803. dw_3.Object.choice[i] = 1
  804. ELSE
  805. dw_3.Object.choice[i] = 0
  806. END IF
  807. END IF
  808. NEXT
  809. END IF
  810. // //** classedit _checkbox
  811. IF s_user_copy.classedit_flag = 1 THEN
  812. FOR i = 1 TO dw_4.RowCount()
  813. IF s_user_copy.classeditstr = '0' THEN
  814. dw_4.Object.allow_edit[i] = 1
  815. ELSE
  816. ll_ClassID = dw_4.Object.classid[i]
  817. IF Pos(s_user_copy.classeditstr,','+String(ll_ClassID)+',',1) > 0 THEN
  818. dw_4.Object.allow_edit[i] = 1
  819. ELSE
  820. dw_4.Object.allow_edit[i] = 0
  821. END IF
  822. END IF
  823. NEXT
  824. END IF
  825. //** classview _checkbox
  826. IF s_user_copy.classview_flag = 1 THEN
  827. FOR i = 1 TO dw_4.RowCount()
  828. IF s_user_copy.classviewstr = '0' THEN
  829. dw_4.Object.allow_view[i] = 1
  830. ELSE
  831. ll_ClassID = dw_4.Object.classid[i]
  832. IF Pos(s_user_copy.classviewstr,','+String(ll_ClassID)+',',1) > 0 THEN
  833. dw_4.Object.allow_view[i] = 1
  834. ELSE
  835. dw_4.Object.allow_view[i] = 0
  836. END IF
  837. END IF
  838. NEXT
  839. END IF
  840. //** xls_printstr _checkbox
  841. IF s_user_copy.xls_print_flag = 1 THEN
  842. FOR i = 1 TO dw_5.RowCount()
  843. IF s_user_copy.xls_printstr = '0' THEN
  844. dw_5.Object.allow_print[i] = 1
  845. ELSE
  846. ll_xls_templates_id = dw_5.Object.u_xls_templates_id[i]
  847. IF Pos(s_user_copy.xls_printstr,','+String(ll_xls_templates_id)+',',1) > 0 THEN
  848. dw_5.Object.allow_print[i] = 1
  849. ELSE
  850. dw_5.Object.allow_print[i] = 0
  851. END IF
  852. END IF
  853. NEXT
  854. END IF
  855. //** xls_sendstr _checkbox
  856. IF s_user_copy.xls_send_flag = 1 THEN
  857. FOR i = 1 TO dw_5.RowCount()
  858. IF s_user_copy.xls_sendstr = '0' THEN
  859. dw_5.Object.allow_send[i] = 1
  860. ELSE
  861. ll_xls_templates_id = dw_5.Object.u_xls_templates_id[i]
  862. IF Pos(s_user_copy.xls_sendstr,','+String(ll_xls_templates_id)+',',1) > 0 THEN
  863. dw_5.Object.allow_send[i] = 1
  864. ELSE
  865. dw_5.Object.allow_send[i] = 0
  866. END IF
  867. END IF
  868. NEXT
  869. END IF
  870. //** s_user_copy.spttypestr _checkbox
  871. IF s_user_copy.spttype_flag = 1 THEN
  872. FOR i = 1 TO dw_6.RowCount()
  873. IF s_user_copy.spttypestr = '0' THEN
  874. dw_6.Object.ch[i] = 1
  875. ELSE
  876. ll_spttypeid = dw_6.Object.spttypeid[i]
  877. IF Pos(s_user_copy.spttypestr,','+String(ll_spttypeid)+',',1) > 0 THEN
  878. dw_6.Object.ch[i] = 1
  879. ELSE
  880. dw_6.Object.ch[i] = 0
  881. END IF
  882. END IF
  883. NEXT
  884. END IF
  885. //** plugins_str _checkbox
  886. IF s_user_copy.plugins_flag = 1 THEN
  887. FOR i = 1 TO dw_7.RowCount()
  888. IF s_user_copy.pluginsstr = '0' THEN
  889. dw_7.Object.ch[i] = 1
  890. ELSE
  891. ll_fileid = dw_7.Object.fileid[i]
  892. IF Pos(s_user_copy.pluginsstr,','+String(ll_fileid)+',',1) > 0 THEN
  893. dw_7.Object.ch[i] = 1
  894. ELSE
  895. dw_7.Object.ch[i] = 0
  896. END IF
  897. END IF
  898. NEXT
  899. END IF
  900. //自定义报表
  901. IF s_user_copy.report_flag = 1 THEN
  902. dw_8.SetRedraw(FALSE)
  903. FOR i = 1 TO dw_8.RowCount()
  904. IF s_user_copy.reportstr = '0' THEN
  905. dw_8.Object.ch[i] = 1
  906. ELSE
  907. ll_reportid = dw_8.Object.reportid[i]
  908. IF Pos(s_user_copy.reportstr,','+String(ll_reportid)+',',1) > 0 THEN
  909. dw_8.Object.ch[i] = 1
  910. ELSE
  911. dw_8.Object.ch[i] = 0
  912. END IF
  913. END IF
  914. NEXT
  915. dw_8.SetRedraw(TRUE)
  916. END IF
  917. IF s_user_copy.account_flag = 1 THEN
  918. dw_9.SetRedraw(FALSE)
  919. FOR i = 1 TO dw_9.RowCount()
  920. IF s_user_copy.accountstr = '0' THEN
  921. dw_9.Object.ch[i] = 1
  922. ELSE
  923. ll_accountsid = dw_9.Object.accountsid[i]
  924. IF Pos(s_user_copy.accountstr,','+String(ll_accountsid)+',',1) > 0 THEN
  925. dw_9.Object.ch[i] = 1
  926. ELSE
  927. dw_9.Object.ch[i] = 0
  928. END IF
  929. END IF
  930. NEXT
  931. dw_9.SetRedraw(TRUE)
  932. END IF
  933. IF s_user_copy.outrep_flag = 1 THEN
  934. dw_10.SetRedraw(FALSE)
  935. FOR i = 1 TO dw_10.RowCount()
  936. IF s_user_copy.outrepstr = '0' THEN
  937. dw_10.Object.choice[i] = 1
  938. ELSE
  939. ls_outrepname = dw_10.Object.outrepname[i]
  940. IF Pos(s_user_copy.outrepstr,','+String(ls_outrepname)+',',1) > 0 THEN
  941. dw_10.Object.choice[i] = 1
  942. ELSE
  943. dw_10.Object.choice[i] = 0
  944. END IF
  945. END IF
  946. NEXT
  947. dw_10.SetRedraw(TRUE)
  948. END IF
  949. //**tv_checkbox
  950. IF s_user_copy.right_flag = 1 THEN
  951. Long ll_handl
  952. ll_handl = tv_func.FindItem(RootTreeItem!,0)
  953. IF ll_handl > 0 THEN wf_refresh_tvchild(ll_handl,s_user_copy.rightstring)
  954. END IF
  955. //**tv_checkbox
  956. IF s_user_copy.area_flag = 1 THEN
  957. Long ll_handl_area
  958. ll_handl_area = tv_cusarea.FindItem(RootTreeItem!,0)
  959. IF ll_handl_area > 0 THEN wf_refresh_tvchild_area(ll_handl_area,s_user_copy.areastr)
  960. END IF
  961. ////wf_pasteright()
  962. //
  963. //IF copy_rightstring = '' THEN
  964. // MessageBox("提示",'没有可粘贴的权限,请先复制权限', Information!, OK! )
  965. // RETURN
  966. //END IF
  967. //
  968. //Long ll_handl
  969. //ll_handl = tv_func.FindItem(RootTreeItem!,0)
  970. //IF ll_handl > 0 THEN wf_refresh_tvchild(ll_handl,copy_rightstring)
  971. //RETURN
  972. end subroutine
  973. public function string wf_get_storage ();String ls_ret = ''
  974. Long cnt,i,choicecnt = 0
  975. cnt = dw_2.RowCount()
  976. FOR i = 1 TO cnt
  977. IF dw_2.Object.choice[i] = 1 THEN
  978. choicecnt++
  979. ls_ret = ls_ret+','+String(dw_2.Object.storageid[i])
  980. END IF
  981. NEXT
  982. IF choicecnt = cnt THEN
  983. ls_ret = '0' //全部
  984. ELSEIF choicecnt <> cnt AND choicecnt > 0 THEN
  985. ls_ret = ls_ret + ','
  986. ELSEIF choicecnt = 0 THEN
  987. ls_ret = '-1' //无
  988. END IF
  989. RETURN ls_ret
  990. end function
  991. public function string wf_get_sc ();String ls_ret = ''
  992. Long cnt,i,choicecnt = 0
  993. cnt = dw_3.RowCount()
  994. FOR i = 1 TO cnt
  995. IF dw_3.Object.choice[i] = 1 THEN
  996. choicecnt++
  997. ls_ret = ls_ret+','+String(dw_3.Object.scid[i])
  998. END IF
  999. NEXT
  1000. IF choicecnt = cnt THEN
  1001. ls_ret = '0' //全部
  1002. ELSEIF choicecnt <> cnt AND choicecnt > 0 THEN
  1003. ls_ret = ls_ret + ','
  1004. ELSEIF choicecnt = 0 THEN
  1005. ls_ret = '-1' //无
  1006. END IF
  1007. RETURN ls_ret
  1008. end function
  1009. public function integer wf_build_functree ();//====================================================================
  1010. // Function: wf_build_functree()
  1011. //--------------------------------------------------------------------
  1012. // Description:
  1013. //--------------------------------------------------------------------
  1014. // Arguments:(None)
  1015. //--------------------------------------------------------------------
  1016. // Returns: integer
  1017. //--------------------------------------------------------------------
  1018. // Author: yyx Date: 2004.11.16
  1019. //--------------------------------------------------------------------
  1020. // Modify History:
  1021. //
  1022. //====================================================================
  1023. Long hand
  1024. deep = 1
  1025. Long tvi_hdl = 0
  1026. DO UNTIL tv_func.FindItem(roottreeitem!, 0) = -1
  1027. tv_func.DeleteItem(tvi_hdl)
  1028. LOOP
  1029. hand = tv_func.InsertItemLast(0,sys_message_title,1)
  1030. pf_treegrowth(hand,0,2)
  1031. //tv_func.ExpandItem(hand)
  1032. tv_func.ExpandItem(1)
  1033. RETURN 1
  1034. end function
  1035. public function integer pf_treegrowth (long arg_handl, long arg_funcid, integer arg_lp);//====================================================================
  1036. // function: pf_treegrowth()
  1037. //--------------------------------------------------------------------
  1038. // description:
  1039. //--------------------------------------------------------------------
  1040. // arguments:
  1041. // value long arg_handl
  1042. // value long arg_funcid
  1043. // value integer arg_lp
  1044. //--------------------------------------------------------------------
  1045. // returns: integer
  1046. //--------------------------------------------------------------------
  1047. // author: yyx date: 2004.11.16
  1048. //--------------------------------------------------------------------
  1049. // modify history:
  1050. //
  1051. //====================================================================
  1052. Int rslt = 1
  1053. s_sys_func ls_s_func[]
  1054. Long count = 0,ls_i
  1055. Long handl
  1056. Long ll_funcid
  1057. String ls_funcid_str
  1058. treeviewitem tvi
  1059. deep++
  1060. IF deep > 4000 THEN //防止死递归
  1061. RETURN 0
  1062. END IF
  1063. String ls_filter
  1064. //Long ll_p_functype
  1065. //String ls_p_name
  1066. //
  1067. //IF arg_funcid = 0 THEN
  1068. // ll_p_functype = 0
  1069. // ls_p_name = ''
  1070. //ELSE
  1071. // ls_filter = ' funcid= '+String(arg_funcid)
  1072. // sys_ds_userinfo.SetFilter(ls_filter)
  1073. // sys_ds_userinfo.Filter()
  1074. // IF sys_ds_userinfo.RowCount() >= 1 THEN
  1075. // ll_p_functype = sys_ds_userinfo.Object.functype[1]
  1076. // ls_p_name = sys_ds_userinfo.Object.treename[1]
  1077. // END IF
  1078. //END IF
  1079. IF sys_if_network = 1 THEN
  1080. ls_filter = ' parentid= '+String(arg_funcid) + ' and worktype <> 1 '
  1081. ELSE
  1082. ls_filter = ' parentid= '+String(arg_funcid) + ' and worktype <> 2 '
  1083. END IF
  1084. IF sys_version_type = 0 THEN
  1085. ls_filter = ls_filter + 'and ( Versiontype = 0 or Versiontype = -1 )'
  1086. ELSEIF sys_version_type = 1 THEN
  1087. ls_filter = ls_filter + 'and ( Versiontype = 1 or Versiontype = -1 )'
  1088. ELSEIF sys_version_type = 2 THEN
  1089. ls_filter = ls_filter + 'and ( Versiontype = 0 or Versiontype = -1 or Versiontype = 2 )'
  1090. END IF
  1091. sys_ds_userinfo.SetFilter(ls_filter)
  1092. sys_ds_userinfo.Filter()
  1093. sys_ds_userinfo.SetSort('sortflag')
  1094. sys_ds_userinfo.Sort()
  1095. ls_funcid_str = ",521,1495,522,1574,1585," // 特殊权限,不做解决方案考虑
  1096. FOR ls_i = 1 To sys_ds_userinfo.RowCount( )
  1097. IF sys_ds_userinfo.Object.if_use[ls_i] = 0 THEN CONTINUE
  1098. IF sys_ds_userinfo.Object.parentid[ls_i] = arg_funcid THEN
  1099. ll_funcid = sys_ds_userinfo.Object.funcid[ls_i]
  1100. IF sys_ds_userinfo.Object.functype[ls_i] < 9 THEN
  1101. IF Not Pos(ls_funcid_str,","+String(ll_funcid)+",") > 0 THEN
  1102. IF Mid(sys_pwrstr,ll_funcid,1) <> '1' THEN
  1103. CONTINUE
  1104. END IF
  1105. END IF
  1106. END IF
  1107. //
  1108. count++
  1109. ls_s_func[count].funcid = ll_funcid //sys_ds_userinfo.Object.funcid[ls_i]
  1110. ls_s_func[count].treename = sys_ds_userinfo.Object.treename[ls_i]
  1111. ls_s_func[count].MenuName = sys_ds_userinfo.Object.MenuName[ls_i]
  1112. ls_s_func[count].parentid = sys_ds_userinfo.Object.parentid[ls_i]
  1113. ls_s_func[count].sortflag = sys_ds_userinfo.Object.sortflag[ls_i]
  1114. ls_s_func[count].functype = sys_ds_userinfo.Object.functype[ls_i]
  1115. ls_s_func[count].mainid = sys_ds_userinfo.Object.mainid[ls_i]
  1116. ls_s_func[count].if_use = sys_ds_userinfo.Object.if_use[ls_i]
  1117. END IF
  1118. NEXT
  1119. FOR ls_i = 1 To count
  1120. IF ls_s_func[ls_i].functype = 0 THEN
  1121. arg_lp = 2
  1122. ELSEIF ls_s_func[ls_i].functype = 8 THEN
  1123. arg_lp = 3
  1124. ELSEIF ls_s_func[ls_i].functype = 9 THEN
  1125. arg_lp = 4
  1126. END IF
  1127. handl = tv_func.InsertItemLast(arg_handl,ls_s_func[ls_i].treename,arg_lp) //生成树
  1128. // tv_func.ExpandItem(arg_handl)
  1129. tv_func.GetItem(handl,tvi)
  1130. tvi.StatePictureIndex = 2
  1131. tvi.Data = ls_s_func[ls_i].funcid
  1132. tv_func.SetItem(handl,tvi)
  1133. pf_treegrowth(handl,ls_s_func[ls_i].funcid,arg_lp+1) //下级生成树
  1134. NEXT
  1135. //IF ll_p_functype = 0 Or ll_p_functype = 1 THEN
  1136. IF cbx_tree.Checked THEN
  1137. tv_func.ExpandItem(arg_handl)
  1138. END IF
  1139. //ELSE
  1140. // tv_func.CollapseItem(arg_handl)
  1141. //END IF
  1142. RETURN rslt
  1143. end function
  1144. public subroutine wf_refresh_tvchild (long arg_handl, string arg_rightstr);long ll_handl
  1145. long ll_funcid
  1146. treeviewitem tvi
  1147. ll_handl = arg_handl
  1148. ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
  1149. do while ll_handl > 0
  1150. tv_func.getitem(ll_handl,tvi)
  1151. ll_funcid = tvi.data
  1152. // messagebox("0",ll_funcid)
  1153. if not ll_funcid = 0 then
  1154. if mid(arg_rightstr,ll_funcid,1)='0' then
  1155. tvi.statepictureindex = 1
  1156. else
  1157. tvi.statepictureindex = 2
  1158. end if
  1159. end if
  1160. tv_func.setitem(ll_handl,tvi)
  1161. wf_refresh_tvnext(ll_handl,arg_rightstr)
  1162. ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
  1163. loop
  1164. end subroutine
  1165. public subroutine wf_refresh_tvnext (long arg_handl, string arg_rightstr);long ll_handl
  1166. long ll_funcid
  1167. treeviewitem tvi
  1168. ll_handl = arg_handl
  1169. ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
  1170. do while ll_handl > 0
  1171. tv_func.getitem(ll_handl,tvi)
  1172. ll_funcid = tvi.data
  1173. // messagebox("1",ll_funcid)
  1174. if not ll_funcid = 0 then
  1175. if mid(arg_rightstr,ll_funcid,1)='1' then
  1176. tvi.statepictureindex = 2
  1177. else
  1178. tvi.statepictureindex = 1
  1179. end if
  1180. end if
  1181. tv_func.setitem(ll_handl,tvi)
  1182. wf_refresh_tvchild(ll_handl,arg_rightstr)
  1183. ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
  1184. loop
  1185. end subroutine
  1186. public subroutine wf_getright_tvchild (long arg_handl, ref string arg_rightstr);long ll_handl
  1187. long ll_funcid
  1188. treeviewitem tvi
  1189. ll_handl = arg_handl
  1190. ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
  1191. do while ll_handl > 0
  1192. tv_func.getitem(ll_handl,tvi)
  1193. ll_funcid = tvi.data
  1194. // messagebox("0",ll_funcid)
  1195. if not ll_funcid = 0 then
  1196. if tvi.statepictureindex = 2 then
  1197. arg_rightstr=replace(arg_rightstr,ll_funcid,1,"1")
  1198. end if
  1199. end if
  1200. wf_getright_tvnext(ll_handl,arg_rightstr)
  1201. ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
  1202. loop
  1203. end subroutine
  1204. public subroutine wf_getright_tvnext (long arg_handl, ref string arg_rightstr);long ll_handl
  1205. long ll_funcid
  1206. treeviewitem tvi
  1207. ll_handl = arg_handl
  1208. ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
  1209. do while ll_handl > 0
  1210. tv_func.getitem(ll_handl,tvi)
  1211. ll_funcid = tvi.data
  1212. // messagebox("1",ll_funcid)
  1213. if not ll_funcid = 0 then
  1214. if tvi.statepictureindex = 2 then
  1215. arg_rightstr=replace(arg_rightstr,ll_funcid,1,"1")
  1216. end if
  1217. end if
  1218. // tv_func.setitem(ll_handl,tvi)
  1219. wf_getright_tvchild(ll_handl,arg_rightstr)
  1220. ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
  1221. loop
  1222. end subroutine
  1223. public subroutine wf_set_tvparent (long arg_handl);//====================================================================
  1224. // Function: wf_find_parenttree()
  1225. //--------------------------------------------------------------------
  1226. // Description:
  1227. //--------------------------------------------------------------------
  1228. // Arguments:
  1229. // value long arg_handl
  1230. // value long arg_state
  1231. //--------------------------------------------------------------------
  1232. // Returns: (none)
  1233. //--------------------------------------------------------------------
  1234. // Author: yyx Date: 2004.11.18
  1235. //--------------------------------------------------------------------
  1236. // Modify History:
  1237. //
  1238. //====================================================================
  1239. long ll_handl
  1240. treeviewitem tvi
  1241. ll_handl = arg_handl
  1242. tv_func.getitem(ll_handl,tvi)
  1243. tvi.StatePictureIndex = 2
  1244. tv_func.setitem(ll_handl,tvi)
  1245. ll_handl = tv_func.finditem(ParentTreeItem!,ll_handl)
  1246. do while ll_handl > 0
  1247. tv_func.getitem(ll_handl,tvi)
  1248. tvi.StatePictureIndex = 2
  1249. tv_func.setitem(ll_handl,tvi)
  1250. ll_handl = tv_func.finditem(ParentTreeItem!,ll_handl)
  1251. loop
  1252. end subroutine
  1253. public subroutine wf_set_tvchild (long arg_handl);//====================================================================
  1254. // Function: wf_find_childtree()
  1255. //--------------------------------------------------------------------
  1256. // Description:
  1257. //--------------------------------------------------------------------
  1258. // Arguments:
  1259. // value long arg_handl
  1260. // value long arg_state
  1261. //--------------------------------------------------------------------
  1262. // Returns: integer
  1263. //--------------------------------------------------------------------
  1264. // Author: yyx Date: 2004.11.18
  1265. //--------------------------------------------------------------------
  1266. // Modify History:
  1267. //
  1268. //====================================================================
  1269. long ll_handl
  1270. treeviewitem tvi
  1271. ll_handl = arg_handl
  1272. tv_func.getitem(ll_handl,tvi)
  1273. tvi.StatePictureIndex = 1
  1274. tv_func.setitem(ll_handl,tvi)
  1275. ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
  1276. do while ll_handl > 0
  1277. wf_set_tvnext(ll_handl)
  1278. ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
  1279. loop
  1280. end subroutine
  1281. public subroutine wf_set_tvnext (long arg_handl);//====================================================================
  1282. // Function: wf_find_childtree()
  1283. //--------------------------------------------------------------------
  1284. // Description:
  1285. //--------------------------------------------------------------------
  1286. // Arguments:
  1287. // value long arg_handl
  1288. // value long arg_state
  1289. //--------------------------------------------------------------------
  1290. // Returns: integer
  1291. //--------------------------------------------------------------------
  1292. // Author: yyx Date: 2004.11.18
  1293. //--------------------------------------------------------------------
  1294. // Modify History:
  1295. //
  1296. //====================================================================
  1297. long ll_handl
  1298. treeviewitem tvi
  1299. ll_handl = arg_handl
  1300. tv_func.getitem(ll_handl,tvi)
  1301. tvi.StatePictureIndex = 1
  1302. tv_func.setitem(ll_handl,tvi)
  1303. ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
  1304. do while ll_handl > 0
  1305. wf_set_tvchild(ll_handl)
  1306. ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
  1307. loop
  1308. end subroutine
  1309. public subroutine wf_clear_tvnext (long arg_handl);long ll_handl
  1310. treeviewitem tvi
  1311. ll_handl = arg_handl
  1312. ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
  1313. do while ll_handl > 0
  1314. tv_func.getitem(ll_handl,tvi)
  1315. tvi.statepictureindex = 1
  1316. tv_func.setitem(ll_handl,tvi)
  1317. wf_clear_tvchild(ll_handl)
  1318. ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
  1319. loop
  1320. end subroutine
  1321. public subroutine wf_clear_tvchild (long arg_handl);long ll_handl
  1322. treeviewitem tvi
  1323. ll_handl = arg_handl
  1324. ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
  1325. do while ll_handl > 0
  1326. tv_func.getitem(ll_handl,tvi)
  1327. tvi.statepictureindex = 1
  1328. tv_func.setitem(ll_handl,tvi)
  1329. wf_clear_tvnext(ll_handl)
  1330. ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
  1331. loop
  1332. end subroutine
  1333. public function integer wf_build_areatree ();//====================================================================
  1334. // Function: wf_build_functree()
  1335. //--------------------------------------------------------------------
  1336. // Description:
  1337. //--------------------------------------------------------------------
  1338. // Arguments:(None)
  1339. //--------------------------------------------------------------------
  1340. // Returns: integer
  1341. //--------------------------------------------------------------------
  1342. // Author: yyx Date: 2004.11.16
  1343. //--------------------------------------------------------------------
  1344. // Modify History:
  1345. //
  1346. //====================================================================
  1347. Long hand
  1348. deep = 1
  1349. Long tvi_hdl = 0
  1350. DO UNTIL tv_cusarea.FindItem(roottreeitem!, 0) = -1
  1351. tv_cusarea.DeleteItem(tvi_hdl)
  1352. LOOP
  1353. hand = tv_cusarea.InsertItemLast(0,'全部地区',1)
  1354. pf_treegrowth_area(hand,0,2)
  1355. //tv_cusarea.expanditem(hand)
  1356. RETURN 1
  1357. end function
  1358. public function integer pf_treegrowth_area (long arg_handl, long arg_parentid, integer arg_lp);//====================================================================
  1359. // Function: pf_treegrowth()
  1360. //--------------------------------------------------------------------
  1361. // Description:
  1362. //--------------------------------------------------------------------
  1363. // Arguments:
  1364. // long arg_handl
  1365. // long arg_parentid
  1366. //--------------------------------------------------------------------
  1367. // Returns: integer
  1368. //--------------------------------------------------------------------
  1369. // Author: yyx Date: 2005.01.28
  1370. //--------------------------------------------------------------------
  1371. // Modify History:
  1372. //
  1373. //====================================================================
  1374. Long rslt = 1
  1375. Long ll_CusareaID,ll_count = 0,ll_i
  1376. String ls_Cusareaname,ls_areaname
  1377. Int li_sonflag
  1378. s_cusarea l_s_pfmx[]
  1379. Long li_handl
  1380. TreeViewItem l_tvi
  1381. deep_area++
  1382. IF deep_area > 4000 THEN //防止死递归
  1383. RETURN 0
  1384. END IF
  1385. DECLARE pf_cur CURSOR FOR
  1386. SELECT u_Cusarea.CusareaID,
  1387. u_Cusarea.Cusareaname,
  1388. u_Cusarea.sonflag
  1389. FROM u_Cusarea
  1390. Where ( u_Cusarea.parentid = :arg_parentid );
  1391. OPEN pf_cur;
  1392. ll_count = 1
  1393. FETCH pf_cur Into :l_s_pfmx[ll_count].CusareaID,:l_s_pfmx[ll_count].Cusareaname,:l_s_pfmx[ll_count].sonflag;
  1394. DO WHILE sqlca.SQLCode = 0
  1395. ll_count++
  1396. FETCH pf_cur Into :l_s_pfmx[ll_count].CusareaID,:l_s_pfmx[ll_count].Cusareaname,:l_s_pfmx[ll_count].sonflag;
  1397. LOOP
  1398. ll_count = ll_count - 1
  1399. CLOSE pf_cur;
  1400. FOR ll_i = 1 To ll_count
  1401. IF l_s_pfmx[ll_i].sonflag = 0 THEN
  1402. arg_lp = 2
  1403. ELSE
  1404. arg_lp = 3
  1405. END IF
  1406. li_handl = tv_cusarea.InsertItemSort(arg_handl,l_s_pfmx[ll_i].Cusareaname,arg_lp)
  1407. IF tv_cusarea.GetItem ( li_handl, l_tvi) = 1 THEN
  1408. l_tvi.Label = l_s_pfmx[ll_i].Cusareaname
  1409. l_tvi.Data = l_s_pfmx[ll_i].CusareaID
  1410. tv_cusarea.SetItem( li_handl, l_tvi )
  1411. END IF
  1412. pf_treegrowth_area(li_handl,l_s_pfmx[ll_i].CusareaID,arg_lp)
  1413. NEXT
  1414. tv_cusarea.ExpandItem(arg_handl)
  1415. RETURN 1
  1416. end function
  1417. public subroutine wf_refresh_tvchild_area (long arg_handl, string arg_areastr);long ll_handl
  1418. long ll_cusareaid
  1419. treeviewitem tvi
  1420. ll_handl = arg_handl
  1421. ll_handl = tv_cusarea.finditem(ChildTreeItem!,ll_handl)
  1422. do while ll_handl > 0
  1423. tv_cusarea.getitem(ll_handl,tvi)
  1424. ll_cusareaid = tvi.data
  1425. if not ll_cusareaid = 0 then
  1426. if pos(arg_areastr,','+string(ll_cusareaid)+',') > 0 or arg_areastr = '0' then
  1427. tvi.statepictureindex = 2
  1428. else
  1429. tvi.statepictureindex = 1
  1430. end if
  1431. end if
  1432. tv_cusarea.setitem(ll_handl,tvi)
  1433. wf_refresh_tvnext_area(ll_handl,arg_areastr)
  1434. ll_handl = tv_cusarea.finditem(ChildTreeItem!,ll_handl)
  1435. loop
  1436. end subroutine
  1437. public subroutine wf_refresh_tvnext_area (long arg_handl, string arg_areastr);long ll_handl
  1438. long ll_cusareaid
  1439. treeviewitem tvi
  1440. ll_handl = arg_handl
  1441. ll_handl = tv_cusarea.finditem(NextTreeItem!,ll_handl)
  1442. do while ll_handl > 0
  1443. tv_cusarea.getitem(ll_handl,tvi)
  1444. ll_cusareaid = tvi.data
  1445. if not ll_cusareaid = 0 then
  1446. if pos(arg_areastr,','+string(ll_cusareaid)+',')> 0 or arg_areastr = '0' then
  1447. tvi.statepictureindex = 2
  1448. else
  1449. tvi.statepictureindex = 1
  1450. end if
  1451. end if
  1452. tv_cusarea.setitem(ll_handl,tvi)
  1453. wf_refresh_tvchild_area(ll_handl,arg_areastr)
  1454. ll_handl = tv_cusarea.finditem(NextTreeItem!,ll_handl)
  1455. loop
  1456. end subroutine
  1457. public subroutine wf_getarea_tvchild (long arg_handl, ref string arg_areastr);long ll_handl
  1458. long ll_cusareaid
  1459. treeviewitem tvi
  1460. ll_handl = arg_handl
  1461. ll_handl = tv_cusarea.finditem(ChildTreeItem!,ll_handl)
  1462. do while ll_handl > 0
  1463. tv_cusarea.getitem(ll_handl,tvi)
  1464. ll_cusareaid = tvi.data
  1465. if not ll_cusareaid = 0 then
  1466. if tvi.statepictureindex = 2 then
  1467. if len(arg_areastr) = 0 then
  1468. arg_areastr =arg_areastr + ','+string(ll_cusareaid) + ','
  1469. else
  1470. arg_areastr =arg_areastr + string(ll_cusareaid) + ','
  1471. end if
  1472. end if
  1473. end if
  1474. wf_getarea_tvnext(ll_handl,arg_areastr)
  1475. ll_handl = tv_cusarea.finditem(ChildTreeItem!,ll_handl)
  1476. loop
  1477. end subroutine
  1478. public subroutine wf_getarea_tvnext (long arg_handl, ref string arg_areastr);long ll_handl
  1479. long ll_cusareaid
  1480. treeviewitem tvi
  1481. ll_handl = arg_handl
  1482. ll_handl = tv_cusarea.finditem(NextTreeItem!,ll_handl)
  1483. do while ll_handl > 0
  1484. tv_cusarea.getitem(ll_handl,tvi)
  1485. ll_cusareaid = tvi.data
  1486. if not ll_cusareaid = 0 then
  1487. if tvi.statepictureindex = 2 then
  1488. if len(arg_areastr) = 0 then
  1489. arg_areastr =arg_areastr + ','+string(ll_cusareaid) + ','
  1490. else
  1491. arg_areastr =arg_areastr + string(ll_cusareaid) + ','
  1492. end if
  1493. end if
  1494. end if
  1495. tv_cusarea.setitem(ll_handl,tvi)
  1496. wf_getarea_tvchild(ll_handl,arg_areastr)
  1497. ll_handl = tv_cusarea.finditem(NextTreeItem!,ll_handl)
  1498. loop
  1499. end subroutine
  1500. public function string wf_getarea ();string ls_ret = ''
  1501. long ll_handl
  1502. ll_handl = tv_cusarea.finditem(RootTreeItem!,0)
  1503. if ll_handl > 0 then wf_getarea_tvchild(ll_handl,ls_ret)
  1504. if ls_ret = '' then ls_ret = '-1'
  1505. return ls_ret
  1506. end function
  1507. public subroutine wf_set_tvchild_area (long arg_handl, integer arg_index);long ll_handl
  1508. treeviewitem tvi
  1509. ll_handl = arg_handl
  1510. tv_cusarea.getitem(ll_handl,tvi)
  1511. tvi.StatePictureIndex = arg_index
  1512. tv_cusarea.setitem(ll_handl,tvi)
  1513. ll_handl = tv_cusarea.finditem(ChildTreeItem!,ll_handl)
  1514. do while ll_handl > 0
  1515. wf_set_tvnext_area(ll_handl,arg_index)
  1516. ll_handl = tv_cusarea.finditem(ChildTreeItem!,ll_handl)
  1517. loop
  1518. end subroutine
  1519. public subroutine wf_set_tvnext_area (long arg_handl, integer arg_index);long ll_handl
  1520. treeviewitem tvi
  1521. ll_handl = arg_handl
  1522. tv_cusarea.getitem(ll_handl,tvi)
  1523. tvi.StatePictureIndex = arg_index
  1524. tv_cusarea.setitem(ll_handl,tvi)
  1525. ll_handl = tv_cusarea.finditem(NextTreeItem!,ll_handl)
  1526. do while ll_handl > 0
  1527. wf_set_tvchild_area(ll_handl,arg_index)
  1528. ll_handl = tv_cusarea.finditem(NextTreeItem!,ll_handl)
  1529. loop
  1530. end subroutine
  1531. public subroutine wf_set_tvparent_area (long arg_handl);//====================================================================
  1532. // Function: wf_find_parenttree()
  1533. //--------------------------------------------------------------------
  1534. // Description:
  1535. //--------------------------------------------------------------------
  1536. // Arguments:
  1537. // value long arg_handl
  1538. // value long arg_state
  1539. //--------------------------------------------------------------------
  1540. // Returns: (none)
  1541. //--------------------------------------------------------------------
  1542. // Author: yyx Date: 2004.11.18
  1543. //--------------------------------------------------------------------
  1544. // Modify History:
  1545. //
  1546. //====================================================================
  1547. long ll_handl
  1548. treeviewitem tvi
  1549. ll_handl = arg_handl
  1550. tv_cusarea.getitem(ll_handl,tvi)
  1551. tvi.StatePictureIndex = 2
  1552. tv_cusarea.setitem(ll_handl,tvi)
  1553. ll_handl = tv_cusarea.finditem(ParentTreeItem!,ll_handl)
  1554. do while ll_handl > 0
  1555. tv_cusarea.getitem(ll_handl,tvi)
  1556. tvi.StatePictureIndex = 2
  1557. tv_cusarea.setitem(ll_handl,tvi)
  1558. ll_handl = tv_cusarea.finditem(ParentTreeItem!,ll_handl)
  1559. loop
  1560. end subroutine
  1561. public subroutine wf_clear_tvchild_area (long arg_handl);long ll_handl
  1562. treeviewitem tvi
  1563. ll_handl = arg_handl
  1564. ll_handl = tv_cusarea.finditem(ChildTreeItem!,ll_handl)
  1565. do while ll_handl > 0
  1566. tv_cusarea.getitem(ll_handl,tvi)
  1567. tvi.statepictureindex = 1
  1568. tv_cusarea.setitem(ll_handl,tvi)
  1569. wf_clear_tvnext_area(ll_handl)
  1570. ll_handl = tv_cusarea.finditem(ChildTreeItem!,ll_handl)
  1571. loop
  1572. end subroutine
  1573. public subroutine wf_clear_tvnext_area (long arg_handl);long ll_handl
  1574. treeviewitem tvi
  1575. ll_handl = arg_handl
  1576. ll_handl = tv_cusarea.finditem(NextTreeItem!,ll_handl)
  1577. do while ll_handl > 0
  1578. tv_cusarea.getitem(ll_handl,tvi)
  1579. tvi.statepictureindex = 1
  1580. tv_cusarea.setitem(ll_handl,tvi)
  1581. wf_clear_tvchild_area(ll_handl)
  1582. ll_handl = tv_cusarea.finditem(NextTreeItem!,ll_handl)
  1583. loop
  1584. end subroutine
  1585. public subroutine wf_get_class (ref string arg_classedit, ref string arg_classview);String ls_retedit = '',ls_retview = ''
  1586. Long cnt,i,choicecnt = 0,choicecnt1 = 0
  1587. arg_classedit = ''
  1588. arg_classview = ''
  1589. cnt = dw_4.RowCount()
  1590. FOR i = 1 TO cnt
  1591. IF dw_4.Object.allow_edit[i] = 1 THEN
  1592. choicecnt++
  1593. ls_retedit = ls_retedit+','+String(dw_4.Object.classid[i])
  1594. END IF
  1595. IF dw_4.Object.allow_view[i] = 1 THEN
  1596. choicecnt1++
  1597. ls_retview = ls_retview+','+String(dw_4.Object.classid[i])
  1598. END IF
  1599. NEXT
  1600. IF choicecnt = cnt THEN
  1601. ls_retedit = '0' //全部
  1602. ELSEIF choicecnt <> cnt AND choicecnt > 0 THEN
  1603. ls_retedit = ls_retedit + ','
  1604. ELSEIF choicecnt = 0 THEN
  1605. ls_retedit = '-1' //无
  1606. END IF
  1607. IF choicecnt1 = cnt THEN
  1608. ls_retview = '0' //全部
  1609. ELSEIF choicecnt1 <> cnt AND choicecnt1 > 0 THEN
  1610. ls_retview = ls_retview + ','
  1611. ELSEIF choicecnt1 = 0 THEN
  1612. ls_retview = '-1' //无
  1613. END IF
  1614. arg_classview = ls_retview
  1615. arg_classedit = ls_retedit
  1616. end subroutine
  1617. public subroutine wf_get_xlspowerstr (ref string arg_xls_printstr, ref string arg_xls_sendstr);String ls_retprintstr = '',ls_retsendstr = ''
  1618. Long cnt,i,choicecnt = 0,choicecnt1 = 0
  1619. arg_xls_printstr = ''
  1620. arg_xls_sendstr = ''
  1621. cnt = dw_5.RowCount()
  1622. FOR i = 1 TO cnt
  1623. IF dw_5.Object.allow_print[i] = 1 THEN
  1624. choicecnt++
  1625. ls_retprintstr = ls_retprintstr+','+String(dw_5.Object.u_xls_templates_id [i])
  1626. END IF
  1627. IF dw_5.Object.allow_send[i] = 1 THEN
  1628. choicecnt1++
  1629. ls_retsendstr = ls_retsendstr+','+String(dw_5.Object.u_xls_templates_id [i])
  1630. END IF
  1631. NEXT
  1632. IF choicecnt = cnt THEN
  1633. ls_retprintstr = '0' //全部
  1634. ELSEIF choicecnt <> cnt AND choicecnt > 0 THEN
  1635. ls_retprintstr = ls_retprintstr + ','
  1636. ELSEIF choicecnt = 0 THEN
  1637. ls_retprintstr = '-1' //无
  1638. END IF
  1639. IF choicecnt1 = cnt THEN
  1640. ls_retsendstr = '0' //全部
  1641. ELSEIF choicecnt1 <> cnt AND choicecnt1 > 0 THEN
  1642. ls_retsendstr = ls_retsendstr + ','
  1643. ELSEIF choicecnt1 = 0 THEN
  1644. ls_retsendstr = '-1' //无
  1645. END IF
  1646. arg_xls_sendstr = ls_retsendstr
  1647. arg_xls_printstr = ls_retprintstr
  1648. end subroutine
  1649. public function string wf_get_spttype ();String ls_ret = ''
  1650. Long cnt,i,choicecnt = 0
  1651. cnt = dw_6.RowCount()
  1652. FOR i = 1 TO cnt
  1653. IF dw_6.Object.ch[i] = 1 THEN
  1654. choicecnt++
  1655. ls_ret = ls_ret+','+String(dw_6.Object.spttypeid[i])
  1656. END IF
  1657. NEXT
  1658. IF choicecnt = cnt THEN
  1659. ls_ret = '0' //全部
  1660. ELSEIF choicecnt <> cnt AND choicecnt > 0 THEN
  1661. ls_ret = ls_ret + ','
  1662. ELSEIF choicecnt = 0 THEN
  1663. ls_ret = '-1' //无
  1664. END IF
  1665. RETURN ls_ret
  1666. end function
  1667. public subroutine wf_get_plugins (ref string arg_str);//wf_get_plugins arg_str
  1668. String ls_ret = ''
  1669. Long cnt,i,choicecnt = 0
  1670. dw_7.accepttext()
  1671. cnt = dw_7.RowCount()
  1672. FOR i = 1 TO cnt
  1673. IF dw_7.Object.ch[i] = 1 THEN
  1674. choicecnt++
  1675. arg_str = arg_str+','+String(dw_7.Object.fileid[i])
  1676. END IF
  1677. NEXT
  1678. IF choicecnt = cnt THEN
  1679. arg_str = '0' //全部
  1680. ELSEIF choicecnt <> cnt AND choicecnt > 0 THEN
  1681. arg_str = arg_str + ','
  1682. ELSEIF choicecnt = 0 THEN
  1683. arg_str = '-1' //无
  1684. END IF
  1685. end subroutine
  1686. public subroutine wf_get_report (ref string arg_str);String ls_ret = ''
  1687. Long cnt,i,choicecnt = 0
  1688. dw_8.accepttext()
  1689. cnt = dw_8.RowCount()
  1690. FOR i = 1 TO cnt
  1691. IF dw_8.Object.ch[i] = 1 THEN
  1692. choicecnt++
  1693. arg_str = arg_str+','+String(dw_8.Object.reportid[i])
  1694. END IF
  1695. NEXT
  1696. IF choicecnt = cnt THEN
  1697. arg_str = '0' //全部
  1698. ELSEIF choicecnt <> cnt AND choicecnt > 0 THEN
  1699. arg_str = arg_str + ','
  1700. ELSEIF choicecnt = 0 THEN
  1701. arg_str = '-1' //无
  1702. END IF
  1703. end subroutine
  1704. public subroutine wf_set_sendout_tvnext (long arg_handl, integer arg_flag, integer arg_type);Long ll_handl
  1705. Long ll_funcid
  1706. string ls_treename
  1707. long ll_row
  1708. string ls_filter
  1709. treeviewitem tvi
  1710. ll_handl = arg_handl
  1711. ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl)
  1712. DO WHILE ll_handl > 0
  1713. tv_func.GetItem(ll_handl,tvi)
  1714. ll_funcid = tvi.Data
  1715. IF NOT ll_funcid = 0 THEN
  1716. ls_filter = 'funcid = '+String(ll_funcid)
  1717. sys_ds_userinfo.SetFilter(ls_filter)
  1718. sys_ds_userinfo.Filter()
  1719. IF sys_ds_userinfo.RowCount() = 0 THEN
  1720. tvi.StatePictureIndex = 1
  1721. ELSE
  1722. ls_treename = sys_ds_userinfo.Object.treename[1]
  1723. IF arg_type = 0 THEN //设置报表数据发送权限
  1724. IF ls_treename = '报表数据发送' THEN
  1725. IF arg_flag = 0 THEN //取消
  1726. tvi.StatePictureIndex = 1
  1727. ELSE
  1728. tvi.StatePictureIndex = 2
  1729. END IF
  1730. END IF
  1731. ELSE
  1732. IF ls_treename = '报表打印' THEN
  1733. IF arg_flag = 0 THEN
  1734. tvi.StatePictureIndex = 1
  1735. ELSE
  1736. tvi.StatePictureIndex = 2
  1737. END IF
  1738. END IF
  1739. END IF
  1740. END IF
  1741. END IF
  1742. tv_func.SetItem(ll_handl,tvi)
  1743. wf_set_sendout_tvchild(ll_handl,arg_flag,arg_type)
  1744. ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl)
  1745. LOOP
  1746. end subroutine
  1747. public subroutine wf_set_sendout_tvchild (long arg_handl, integer arg_flag, integer arg_type);Long ll_handl
  1748. Long ll_funcid
  1749. String ls_treename
  1750. Long ll_row
  1751. String ls_filter
  1752. treeviewitem tvi
  1753. ll_handl = arg_handl
  1754. ll_handl = tv_func.FindItem(ChildTreeItem!,ll_handl)
  1755. DO WHILE ll_handl > 0
  1756. tv_func.GetItem(ll_handl,tvi)
  1757. ll_funcid = tvi.Data
  1758. IF NOT ll_funcid = 0 THEN
  1759. ls_filter = 'funcid = '+String(ll_funcid)
  1760. sys_ds_userinfo.SetFilter(ls_filter)
  1761. sys_ds_userinfo.Filter()
  1762. IF sys_ds_userinfo.RowCount() = 0 THEN
  1763. tvi.StatePictureIndex = 1
  1764. ELSE
  1765. ls_treename = sys_ds_userinfo.Object.treename[1]
  1766. IF arg_type = 0 THEN //设置报表数据发送权限
  1767. IF ls_treename = '报表数据发送' THEN
  1768. IF arg_flag = 0 THEN //取消
  1769. tvi.StatePictureIndex = 1
  1770. ELSE
  1771. tvi.StatePictureIndex = 2
  1772. END IF
  1773. END IF
  1774. ELSE
  1775. IF ls_treename = '报表打印' THEN
  1776. IF arg_flag = 0 THEN
  1777. tvi.StatePictureIndex = 1
  1778. ELSE
  1779. tvi.StatePictureIndex = 2
  1780. END IF
  1781. END IF
  1782. END IF
  1783. END IF
  1784. END IF
  1785. tv_func.SetItem(ll_handl,tvi)
  1786. // wf_set_sendout_tvnext(ll_handl,arg_flag,arg_type)
  1787. // ll_handl = tv_func.FindItem(ChildTreeItem!,ll_handl)
  1788. wf_set_sendout_tvchild(ll_handl,arg_flag,arg_type)
  1789. ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl)
  1790. LOOP
  1791. end subroutine
  1792. public subroutine wf_set_sendout (integer arg_flag, integer arg_type);IF NOT dw_edit_mode THEN
  1793. MessageBox('提示','非编辑状态下不可用', Information!, OK! )
  1794. RETURN
  1795. END IF
  1796. Long ll_handl
  1797. ll_handl = tv_func.FindItem(RootTreeItem!,0)
  1798. //arg_flag 0 - 取消 1 - 设置
  1799. //arg_type 0 - 报表发送 1 - 报表打印
  1800. tv_func.setredraw(false)
  1801. IF ll_handl > 0 THEN wf_set_sendout_tvchild(ll_handl,arg_flag,arg_type)
  1802. tv_func.setredraw(true)
  1803. RETURN
  1804. end subroutine
  1805. public function long wf_gethandlestate (long arg_handle);long i
  1806. for i = 1 to il_max
  1807. if il_handle_arr[i] = arg_handle then
  1808. return il_state_arr[i]
  1809. end if
  1810. next
  1811. return 0
  1812. end function
  1813. public subroutine wf_sethandlestate (long arg_handle, long arg_state);long i
  1814. for i = 1 to il_max
  1815. if il_handle_arr[i] = arg_handle then
  1816. il_state_arr[i] = arg_state
  1817. return
  1818. end if
  1819. next
  1820. il_max ++
  1821. il_handle_arr[il_max] = arg_handle
  1822. il_state_arr[il_max] = arg_state
  1823. end subroutine
  1824. public subroutine wf_get_account (ref string arg_str);
  1825. String ls_ret = ''
  1826. Long cnt,i,choicecnt = 0
  1827. dw_9.accepttext()
  1828. cnt = dw_9.RowCount()
  1829. FOR i = 1 TO cnt
  1830. IF dw_9.Object.ch[i] = 1 THEN
  1831. choicecnt++
  1832. arg_str = arg_str+','+String(dw_9.Object.accountsid[i])
  1833. END IF
  1834. NEXT
  1835. IF choicecnt = cnt THEN
  1836. arg_str = '0' //全部
  1837. ELSEIF choicecnt <> cnt AND choicecnt > 0 THEN
  1838. arg_str = arg_str + ','
  1839. ELSEIF choicecnt = 0 THEN
  1840. arg_str = '-1' //无
  1841. END IF
  1842. end subroutine
  1843. public subroutine wf_get_outrep (ref string arg_str);
  1844. arg_str = ''
  1845. Long cnt,i,choicecnt = 0
  1846. dw_10.accepttext()
  1847. cnt = dw_10.RowCount()
  1848. FOR i = 1 TO cnt
  1849. IF dw_10.Object.choice[i] = 1 THEN
  1850. choicecnt++
  1851. arg_str = arg_str+','+String(dw_10.Object.outrepname[i])
  1852. END IF
  1853. NEXT
  1854. IF choicecnt = cnt THEN
  1855. arg_str = '0' //全部
  1856. ELSEIF choicecnt <> cnt AND choicecnt > 0 THEN
  1857. arg_str = arg_str + ','
  1858. ELSEIF choicecnt = 0 THEN
  1859. arg_str = '-1' //无
  1860. END IF
  1861. end subroutine
  1862. public subroutine wf_refresh_mx (s_sys_user arg_s_user);//wf_refresh
  1863. long i
  1864. long ll_storageid
  1865. long ll_scid
  1866. long ll_ClassID
  1867. long ll_xls_templates_id
  1868. long ll_spttypeid
  1869. long ll_fileid
  1870. long ll_reportid
  1871. long ll_accountsid
  1872. string ls_outrepname
  1873. //**storage_checkbox
  1874. FOR i = 1 TO dw_2.RowCount()
  1875. IF arg_s_user.storagestr = '0' THEN
  1876. dw_2.Object.choice[i] = 1
  1877. ELSE
  1878. ll_storageid = dw_2.Object.storageid[i]
  1879. IF Pos(arg_s_user.storagestr,','+String(ll_storageid)+',',1) > 0 THEN
  1880. dw_2.Object.choice[i] = 1
  1881. ELSE
  1882. dw_2.Object.choice[i] = 0
  1883. END IF
  1884. END IF
  1885. NEXT
  1886. //**sc_checkbox
  1887. FOR i = 1 TO dw_3.RowCount()
  1888. IF arg_s_user.scstr = '0' THEN
  1889. dw_3.Object.choice[i] = 1
  1890. ELSE
  1891. ll_scid = dw_3.Object.scid[i]
  1892. IF Pos(arg_s_user.scstr,','+String(ll_scid)+',',1) > 0 THEN
  1893. dw_3.Object.choice[i] = 1
  1894. ELSE
  1895. dw_3.Object.choice[i] = 0
  1896. END IF
  1897. END IF
  1898. NEXT
  1899. // //** classedit _checkbox
  1900. FOR i = 1 TO dw_4.RowCount()
  1901. IF arg_s_user.classeditstr = '0' THEN
  1902. dw_4.Object.allow_edit[i] = 1
  1903. ELSE
  1904. ll_ClassID = dw_4.Object.classid[i]
  1905. IF Pos(arg_s_user.classeditstr,','+String(ll_ClassID)+',',1) > 0 THEN
  1906. dw_4.Object.allow_edit[i] = 1
  1907. ELSE
  1908. dw_4.Object.allow_edit[i] = 0
  1909. END IF
  1910. END IF
  1911. NEXT
  1912. //** classview _checkbox
  1913. FOR i = 1 TO dw_4.RowCount()
  1914. IF arg_s_user.classviewstr = '0' THEN
  1915. dw_4.Object.allow_view[i] = 1
  1916. ELSE
  1917. ll_ClassID = dw_4.Object.classid[i]
  1918. IF Pos(arg_s_user.classviewstr,','+String(ll_ClassID)+',',1) > 0 THEN
  1919. dw_4.Object.allow_view[i] = 1
  1920. ELSE
  1921. dw_4.Object.allow_view[i] = 0
  1922. END IF
  1923. END IF
  1924. NEXT
  1925. //** xls_printstr _checkbox
  1926. FOR i = 1 TO dw_5.RowCount()
  1927. IF arg_s_user.xls_printstr = '0' THEN
  1928. dw_5.Object.allow_print[i] = 1
  1929. ELSE
  1930. ll_xls_templates_id = dw_5.Object.u_xls_templates_id[i]
  1931. IF Pos(arg_s_user.xls_printstr,','+String(ll_xls_templates_id)+',',1) > 0 THEN
  1932. dw_5.Object.allow_print[i] = 1
  1933. ELSE
  1934. dw_5.Object.allow_print[i] = 0
  1935. END IF
  1936. END IF
  1937. NEXT
  1938. //** xls_sendstr _checkbox
  1939. FOR i = 1 TO dw_5.RowCount()
  1940. IF arg_s_user.xls_sendstr = '0' THEN
  1941. dw_5.Object.allow_send[i] = 1
  1942. ELSE
  1943. ll_xls_templates_id = dw_5.Object.u_xls_templates_id[i]
  1944. IF Pos(arg_s_user.xls_sendstr,','+String(ll_xls_templates_id)+',',1) > 0 THEN
  1945. dw_5.Object.allow_send[i] = 1
  1946. ELSE
  1947. dw_5.Object.allow_send[i] = 0
  1948. END IF
  1949. END IF
  1950. NEXT
  1951. //** arg_s_user.spttypestr _checkbox
  1952. FOR i = 1 TO dw_6.RowCount()
  1953. IF arg_s_user.spttypestr = '0' THEN
  1954. dw_6.Object.ch[i] = 1
  1955. ELSE
  1956. ll_spttypeid = dw_6.Object.spttypeid[i]
  1957. IF Pos(arg_s_user.spttypestr,','+String(ll_spttypeid)+',',1) > 0 THEN
  1958. dw_6.Object.ch[i] = 1
  1959. ELSE
  1960. dw_6.Object.ch[i] = 0
  1961. END IF
  1962. END IF
  1963. NEXT
  1964. //** plugins_str _checkbox
  1965. FOR i = 1 TO dw_7.RowCount()
  1966. IF arg_s_user.pluginsstr = '0' THEN
  1967. dw_7.Object.ch[i] = 1
  1968. ELSE
  1969. ll_fileid = dw_7.Object.fileid[i]
  1970. IF Pos(arg_s_user.pluginsstr,','+String(ll_fileid)+',',1) > 0 THEN
  1971. dw_7.Object.ch[i] = 1
  1972. ELSE
  1973. dw_7.Object.ch[i] = 0
  1974. END IF
  1975. END IF
  1976. NEXT
  1977. //自定义报表
  1978. dw_8.SetRedraw(FALSE)
  1979. FOR i = 1 TO dw_8.RowCount()
  1980. IF arg_s_user.reportstr = '0' THEN
  1981. dw_8.Object.ch[i] = 1
  1982. ELSE
  1983. ll_reportid = dw_8.Object.reportid[i]
  1984. IF Pos(arg_s_user.reportstr,','+String(ll_reportid)+',',1) > 0 THEN
  1985. dw_8.Object.ch[i] = 1
  1986. ELSE
  1987. dw_8.Object.ch[i] = 0
  1988. END IF
  1989. END IF
  1990. NEXT
  1991. dw_8.SetRedraw(TRUE)
  1992. dw_9.SetRedraw(FALSE)
  1993. FOR i = 1 TO dw_9.RowCount()
  1994. IF arg_s_user.accountstr = '0' THEN
  1995. dw_9.Object.ch[i] = 1
  1996. ELSE
  1997. ll_accountsid = dw_9.Object.accountsid[i]
  1998. IF Pos(arg_s_user.accountstr,','+String(ll_accountsid)+',',1) > 0 THEN
  1999. dw_9.Object.ch[i] = 1
  2000. ELSE
  2001. dw_9.Object.ch[i] = 0
  2002. END IF
  2003. END IF
  2004. NEXT
  2005. dw_9.SetRedraw(TRUE)
  2006. dw_10.SetRedraw(FALSE)
  2007. FOR i = 1 TO dw_10.RowCount()
  2008. IF arg_s_user.outrepstr = '0' THEN
  2009. dw_10.Object.choice[i] = 1
  2010. ELSE
  2011. ls_outrepname = dw_10.Object.outrepname[i]
  2012. IF Pos(arg_s_user.outrepstr,','+String(ls_outrepname)+',',1) > 0 THEN
  2013. dw_10.Object.choice[i] = 1
  2014. ELSE
  2015. dw_10.Object.choice[i] = 0
  2016. END IF
  2017. END IF
  2018. NEXT
  2019. dw_10.SetRedraw(TRUE)
  2020. //**tv_checkbox
  2021. //if ls_str = '' then return
  2022. Long ll_handl
  2023. ll_handl = tv_func.FindItem(RootTreeItem!,0)
  2024. IF ll_handl > 0 THEN wf_refresh_tvchild(ll_handl,arg_s_user.rightstring)
  2025. //**tv_checkbox
  2026. //if arg_s_user.areastr = '' then return
  2027. Long ll_handl_area
  2028. ll_handl_area = tv_cusarea.FindItem(RootTreeItem!,0)
  2029. IF ll_handl_area > 0 THEN wf_refresh_tvchild_area(ll_handl_area,arg_s_user.areastr)
  2030. RETURN
  2031. end subroutine
  2032. public subroutine wf_set_tvchild_son (long arg_handl, integer arg_index);//==============================================================================
  2033. // 函数: w_userinfo_def::wf_set_tvchild_son()
  2034. //------------------------------------------------------------------------------
  2035. // 描述:
  2036. //------------------------------------------------------------------------------
  2037. // 参数:
  2038. // value long arg_handl
  2039. // value integer arg_index
  2040. //------------------------------------------------------------------------------
  2041. // 返回值: (none)
  2042. //------------------------------------------------------------------------------
  2043. // 作者: HD Lee 日期: 2012.06.22
  2044. //------------------------------------------------------------------------------
  2045. // 修改历史:
  2046. //
  2047. //==============================================================================
  2048. //====================================================================
  2049. Long ll_handl
  2050. treeviewitem tvi
  2051. ll_handl = arg_handl
  2052. tv_func.GetItem(ll_handl,tvi)
  2053. tvi.StatePictureIndex = arg_index
  2054. tv_func.SetItem(ll_handl,tvi)
  2055. ll_handl = tv_func.FindItem(ChildTreeItem!,ll_handl)
  2056. DO WHILE ll_handl > 0
  2057. // wf_set_tvchild_son(ll_handl, arg_index)
  2058. tv_func.GetItem(ll_handl,tvi)
  2059. tvi.StatePictureIndex = arg_index
  2060. tv_func.SetItem(ll_handl,tvi)
  2061. ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl)
  2062. LOOP
  2063. end subroutine
  2064. public subroutine wf_set_tvchild_son_all (long arg_handl, integer arg_index);//==============================================================================
  2065. // 函数: w_userinfo_def::wf_set_tvchild_son()
  2066. //------------------------------------------------------------------------------
  2067. // 描述:
  2068. //------------------------------------------------------------------------------
  2069. // 参数:
  2070. // value long arg_handl
  2071. // value integer arg_index
  2072. //------------------------------------------------------------------------------
  2073. // 返回值: (none)
  2074. //------------------------------------------------------------------------------
  2075. // 作者: HD Lee 日期: 2012.06.22
  2076. //------------------------------------------------------------------------------
  2077. // 修改历史:
  2078. //
  2079. //==============================================================================
  2080. //====================================================================
  2081. Long ll_handl
  2082. treeviewitem tvi
  2083. ll_handl = arg_handl
  2084. tv_func.GetItem(ll_handl,tvi)
  2085. tvi.StatePictureIndex = arg_index
  2086. tv_func.SetItem(ll_handl,tvi)
  2087. ll_handl = tv_func.FindItem(ChildTreeItem!,ll_handl)
  2088. DO WHILE ll_handl > 0
  2089. tv_func.GetItem(ll_handl,tvi)
  2090. tvi.StatePictureIndex = arg_index
  2091. tv_func.SetItem(ll_handl,tvi)
  2092. wf_set_tvchild_son_all(ll_handl, arg_index)
  2093. ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl)
  2094. LOOP
  2095. end subroutine
  2096. public subroutine wf_select_all (datawindow arg_dw, dwobject dwo);String str_clickedobjecttype
  2097. String column_title_name, column_name
  2098. String column_title_text
  2099. str_clickedobjecttype = Lower(Left(dwo.Type,4))
  2100. IF str_clickedobjecttype = 'text' THEN
  2101. column_title_name = dwo.Name
  2102. IF Right(column_title_name, 2) = "_t" THEN
  2103. column_name = Left(column_title_name, Len(column_title_name) - 2)
  2104. column_title_text = arg_dw.Describe(column_title_name+ ".text")
  2105. IF Left( arg_dw.Describe( column_name+ ".coltype"),4) = "long" THEN
  2106. Long i, OldTabNum
  2107. OldTabNum = arg_dw.SetTabOrder(column_name, 0)
  2108. IF OldTabNum > 0 THEN
  2109. arg_dw.setredraw(false)
  2110. FOR i = 1 To arg_dw.RowCount()
  2111. arg_dw.SetItem(i, column_name, tmp_chflag)
  2112. NEXT
  2113. arg_dw.setredraw(true)
  2114. tmp_chflag = 1 - tmp_chflag
  2115. arg_dw.SetTabOrder(column_name, OldTabNum)
  2116. END IF
  2117. END IF
  2118. END IF
  2119. END IF
  2120. end subroutine
  2121. on w_userinfo_def.create
  2122. this.cbx_tree=create cbx_tree
  2123. this.cbx_ifphone=create cbx_ifphone
  2124. this.ddlb_dlflag=create ddlb_dlflag
  2125. this.st_5=create st_5
  2126. this.cb_other_func=create cb_other_func
  2127. this.cbx_ifnotin=create cbx_ifnotin
  2128. this.cbx_usecard=create cbx_usecard
  2129. this.cb_help=create cb_help
  2130. this.sle_cardno=create sle_cardno
  2131. this.st_4=create st_4
  2132. this.tab_1=create tab_1
  2133. this.cb_superpsw=create cb_superpsw
  2134. this.cb_undo=create cb_undo
  2135. this.cb_paste=create cb_paste
  2136. this.cb_copy=create cb_copy
  2137. this.cb_setpws=create cb_setpws
  2138. this.cb_select_emp=create cb_select_emp
  2139. this.dw_1=create dw_1
  2140. this.sle_dscrp=create sle_dscrp
  2141. this.st_3=create st_3
  2142. this.sle_xm=create sle_xm
  2143. this.sle_id=create sle_id
  2144. this.st_2=create st_2
  2145. this.st_1=create st_1
  2146. this.cb_end=create cb_end
  2147. this.cb_del=create cb_del
  2148. this.cb_mod=create cb_mod
  2149. this.cb_add=create cb_add
  2150. this.ln_bar=create ln_bar
  2151. this.ln_bar2=create ln_bar2
  2152. this.r_bar=create r_bar
  2153. this.Control[]={this.cbx_tree,&
  2154. this.cbx_ifphone,&
  2155. this.ddlb_dlflag,&
  2156. this.st_5,&
  2157. this.cb_other_func,&
  2158. this.cbx_ifnotin,&
  2159. this.cbx_usecard,&
  2160. this.cb_help,&
  2161. this.sle_cardno,&
  2162. this.st_4,&
  2163. this.tab_1,&
  2164. this.cb_superpsw,&
  2165. this.cb_undo,&
  2166. this.cb_paste,&
  2167. this.cb_copy,&
  2168. this.cb_setpws,&
  2169. this.cb_select_emp,&
  2170. this.dw_1,&
  2171. this.sle_dscrp,&
  2172. this.st_3,&
  2173. this.sle_xm,&
  2174. this.sle_id,&
  2175. this.st_2,&
  2176. this.st_1,&
  2177. this.cb_end,&
  2178. this.cb_del,&
  2179. this.cb_mod,&
  2180. this.cb_add,&
  2181. this.ln_bar,&
  2182. this.ln_bar2,&
  2183. this.r_bar}
  2184. end on
  2185. on w_userinfo_def.destroy
  2186. destroy(this.cbx_tree)
  2187. destroy(this.cbx_ifphone)
  2188. destroy(this.ddlb_dlflag)
  2189. destroy(this.st_5)
  2190. destroy(this.cb_other_func)
  2191. destroy(this.cbx_ifnotin)
  2192. destroy(this.cbx_usecard)
  2193. destroy(this.cb_help)
  2194. destroy(this.sle_cardno)
  2195. destroy(this.st_4)
  2196. destroy(this.tab_1)
  2197. destroy(this.cb_superpsw)
  2198. destroy(this.cb_undo)
  2199. destroy(this.cb_paste)
  2200. destroy(this.cb_copy)
  2201. destroy(this.cb_setpws)
  2202. destroy(this.cb_select_emp)
  2203. destroy(this.dw_1)
  2204. destroy(this.sle_dscrp)
  2205. destroy(this.st_3)
  2206. destroy(this.sle_xm)
  2207. destroy(this.sle_id)
  2208. destroy(this.st_2)
  2209. destroy(this.st_1)
  2210. destroy(this.cb_end)
  2211. destroy(this.cb_del)
  2212. destroy(this.cb_mod)
  2213. destroy(this.cb_add)
  2214. destroy(this.ln_bar)
  2215. destroy(this.ln_bar2)
  2216. destroy(this.r_bar)
  2217. end on
  2218. event open;
  2219. //tab_1.tabpage_2.enabled = sys_option_cusarea = 1
  2220. //tab_1.tabpage_8.enabled = sys_option_outrep = 1
  2221. tab_1.tabpage_2.visible = sys_option_cusarea = 1
  2222. tab_1.tabpage_8.visible = sys_option_outrep = 1
  2223. tv_func = tab_1.tabpage_1.tv_2
  2224. tv_cusarea = tab_1.tabpage_2.tv_1
  2225. dw_6 = tab_1.tabpage_3.dw_6
  2226. dw_5 = tab_1.tabpage_5.dw_5
  2227. dw_4 = tab_1.tabpage_4.dw_4
  2228. dw_3 = tab_1.tabpage_3.dw_3
  2229. dw_2 = tab_1.tabpage_3.dw_2
  2230. dw_7 = tab_1.tabpage_4.dw_7
  2231. dw_8 = tab_1.tabpage_6.dw_8
  2232. dw_9 = tab_1.tabpage_7.dw_9
  2233. dw_10 = tab_1.tabpage_8.dw_10
  2234. dw_1.settransobject(sqlca)
  2235. dw_1.retrieve(sys_scid)
  2236. dw_2.settransobject(sqlca)
  2237. int li_inuse
  2238. if tab_1.tabpage_3.cbx_inuse_storage.checked then
  2239. li_inuse = 1
  2240. else
  2241. li_inuse = -1
  2242. end if
  2243. dw_2.retrieve(li_inuse)
  2244. dw_3.settransobject(sqlca)
  2245. dw_3.retrieve()
  2246. dw_4.settransobject(sqlca)
  2247. dw_4.retrieve()
  2248. dw_5.settransobject(sqlca)
  2249. dw_5.retrieve()
  2250. dw_6.settransobject(sqlca)
  2251. dw_6.retrieve()
  2252. dw_7.settransobject(sqlca)
  2253. dw_7.retrieve()
  2254. dw_8.settransobject(sqlca)
  2255. dw_8.retrieve()
  2256. dw_9.settransobject(sqlca)
  2257. dw_9.retrieve()
  2258. dw_10.settransobject(sqlca)
  2259. dw_10.retrieve()
  2260. wf_build_functree()
  2261. wf_build_areatree()
  2262. wf_refresh()
  2263. wf_lockface()
  2264. uo_user=create uo_usergroup
  2265. end event
  2266. event key;IF Key = KeyEnter! OR Key = KeyDownArrow! THEN //
  2267. keybd_event ( 9, 0, 0 , 0 ) // 按下tab
  2268. keybd_event ( 9, 0, 2, 0 ) // 释放tab
  2269. RETURN 1
  2270. END IF
  2271. end event
  2272. event resize;ln_bar.endx = this.width
  2273. ln_bar2.endx = this.width
  2274. r_bar.width = this.width
  2275. long w_width,w_height
  2276. w_width = 3600
  2277. w_height = 2300
  2278. dw_1.height = this.height - dw_1.y - 140
  2279. tab_1.width = this.width - tab_1.x - 40
  2280. tab_1.height = this.height - tab_1.y - 140
  2281. tv_func.width = tab_1.width - tv_func.x - 40
  2282. tv_func.height = tab_1.height - tv_func.y - 100
  2283. tv_cusarea.width = tab_1.width - tv_cusarea.x - 40
  2284. tv_cusarea.height = tab_1.height - tv_cusarea.y - 100
  2285. tab_1.tabpage_8.dw_10.width = tv_cusarea.width
  2286. tab_1.tabpage_8.dw_10.height = tv_cusarea.height
  2287. tab_1.tabpage_3.dw_2.height = tv_cusarea.height - 92
  2288. tab_1.tabpage_3.dw_3.height = tv_cusarea.height
  2289. tab_1.tabpage_3.dw_6.height = tv_cusarea.height
  2290. tab_1.tabpage_3.dw_3.width = tab_1.tabpage_3.width / 3 - 4
  2291. tab_1.tabpage_3.dw_2.x = tab_1.tabpage_3.dw_3.x + tab_1.tabpage_3.dw_3.width + 4
  2292. tab_1.tabpage_3.dw_2.width = tab_1.tabpage_3.width / 3 - 4
  2293. tab_1.tabpage_3.cbx_inuse_storage.x = tab_1.tabpage_3.dw_2.x + 10
  2294. tab_1.tabpage_3.dw_6.x = tab_1.tabpage_3.dw_2.x + tab_1.tabpage_3.dw_2.width + 4
  2295. tab_1.tabpage_3.dw_6.width = tab_1.tabpage_3.width / 3 - 4
  2296. tab_1.tabpage_4.dw_4.height = tv_cusarea.height
  2297. tab_1.tabpage_4.dw_7.height = tv_cusarea.height
  2298. tab_1.tabpage_4.dw_4.width = tab_1.tabpage_4.width / 2 - 4
  2299. tab_1.tabpage_4.dw_7.x = tab_1.tabpage_4.dw_4.x + tab_1.tabpage_4.dw_4.width + 4
  2300. tab_1.tabpage_4.dw_7.width = tab_1.tabpage_4.width / 2 - 4
  2301. tab_1.tabpage_5.dw_5.width = tv_cusarea.width
  2302. tab_1.tabpage_5.dw_5.height = tv_cusarea.height
  2303. tab_1.tabpage_6.dw_8.width = tv_cusarea.width
  2304. tab_1.tabpage_6.dw_8.height = tv_cusarea.height
  2305. tab_1.tabpage_7.dw_9.width = tv_cusarea.width
  2306. tab_1.tabpage_7.dw_9.height = tv_cusarea.height
  2307. end event
  2308. type cbx_tree from checkbox within w_userinfo_def
  2309. integer x = 2889
  2310. integer y = 64
  2311. integer width = 576
  2312. integer height = 60
  2313. integer textsize = -9
  2314. integer weight = 400
  2315. fontcharset fontcharset = gb2312charset!
  2316. fontpitch fontpitch = variable!
  2317. string facename = "宋体"
  2318. long textcolor = 33554432
  2319. long backcolor = 67108864
  2320. string text = "进入窗口展开权限树"
  2321. end type
  2322. event clicked;Int li_iftree
  2323. IF THIS.Checked THEN
  2324. li_iftree = 1
  2325. ELSE
  2326. li_iftree = 0
  2327. END IF
  2328. f_SetProfileString (sys_empid,'w_userinfo_def', "iftree", String(li_iftree))
  2329. end event
  2330. event constructor;this.backcolor = 14215660
  2331. Int li_iftree
  2332. li_iftree = Integer(f_ProfileString (sys_empid,'w_userinfo_def', "iftree", '0'))
  2333. IF li_iftree = 0 THEN
  2334. THIS.Checked = FALSE
  2335. ELSE
  2336. THIS.Checked = TRUE
  2337. END IF
  2338. end event
  2339. type cbx_ifphone from checkbox within w_userinfo_def
  2340. integer x = 827
  2341. integer y = 280
  2342. integer width = 361
  2343. integer height = 92
  2344. integer textsize = -9
  2345. integer weight = 400
  2346. fontcharset fontcharset = gb2312charset!
  2347. fontpitch fontpitch = variable!
  2348. string facename = "宋体"
  2349. long textcolor = 33554432
  2350. long backcolor = 134217739
  2351. string text = "移动端用户"
  2352. end type
  2353. type ddlb_dlflag from dropdownlistbox within w_userinfo_def
  2354. integer x = 270
  2355. integer y = 384
  2356. integer width = 530
  2357. integer height = 300
  2358. integer taborder = 60
  2359. integer textsize = -9
  2360. integer weight = 400
  2361. fontcharset fontcharset = gb2312charset!
  2362. fontpitch fontpitch = variable!
  2363. string facename = "宋体"
  2364. long textcolor = 33554432
  2365. string item[] = {"单口令","单指纹","口令+指纹"}
  2366. borderstyle borderstyle = stylelowered!
  2367. end type
  2368. type st_5 from statictext within w_userinfo_def
  2369. integer x = 23
  2370. integer y = 384
  2371. integer width = 293
  2372. integer height = 60
  2373. integer textsize = -9
  2374. integer weight = 400
  2375. fontcharset fontcharset = gb2312charset!
  2376. fontpitch fontpitch = variable!
  2377. string facename = "宋体"
  2378. long textcolor = 16711680
  2379. long backcolor = 134217739
  2380. boolean enabled = false
  2381. string text = "登陆模式:"
  2382. boolean focusrectangle = false
  2383. end type
  2384. type cb_other_func from uo_imflatbutton within w_userinfo_def
  2385. integer x = 919
  2386. integer width = 261
  2387. integer height = 172
  2388. integer taborder = 30
  2389. string text = "辅助功能"
  2390. string normalpicname = "other.bmp"
  2391. integer picsize = 16
  2392. toolbaralignment pic_align = alignattop!
  2393. boolean border = false
  2394. end type
  2395. event clicked;call super::clicked;m_Dfc_Control_PopupMenu dmPopupMenu
  2396. String menustr
  2397. menustr = "Text=批设置报表数据发送权限~tEvent=ue_sendout"
  2398. menustr = menustr + "|" + "Text=批设置报表打印权限~tEvent=ue_print_report"
  2399. menustr = menustr + "|" + "Text=-"
  2400. menustr = menustr + "|" + "Text=批取消报表数据发送权限~tEvent=ue_sendout_cancle"
  2401. menustr = menustr + "|" + "Text=批取消报表打印权限~tEvent=ue_print_report_cancle"
  2402. IF Len(Trim(menustr)) <> 0 THEN
  2403. dmPopupMenu = CREATE m_Dfc_Control_PopupMenu
  2404. dmPopupMenu.mf_BuildMenu(THIS, menustr)
  2405. dmPopupMenu.mf_PopMenu()
  2406. DESTROY dmPopupMenu
  2407. END IF
  2408. end event
  2409. type cbx_ifnotin from checkbox within w_userinfo_def
  2410. integer x = 827
  2411. integer y = 188
  2412. integer width = 210
  2413. integer height = 92
  2414. integer textsize = -9
  2415. integer weight = 400
  2416. fontcharset fontcharset = gb2312charset!
  2417. fontpitch fontpitch = variable!
  2418. string facename = "宋体"
  2419. long textcolor = 33554432
  2420. long backcolor = 134217739
  2421. string text = "禁用"
  2422. end type
  2423. type cbx_usecard from checkbox within w_userinfo_def
  2424. boolean visible = false
  2425. integer x = 1275
  2426. integer y = 372
  2427. integer width = 219
  2428. integer height = 92
  2429. integer textsize = -9
  2430. integer weight = 400
  2431. fontcharset fontcharset = gb2312charset!
  2432. fontpitch fontpitch = variable!
  2433. string facename = "宋体"
  2434. long textcolor = 33554432
  2435. long backcolor = 134217739
  2436. string text = "刷卡"
  2437. end type
  2438. event clicked;if this.checked=false then
  2439. sle_cardno.enabled=false
  2440. else
  2441. sle_cardno.enabled=true
  2442. end if
  2443. end event
  2444. type cb_help from uo_imflatbutton within w_userinfo_def
  2445. string tag = "帮助[F1]"
  2446. integer x = 1961
  2447. integer width = 165
  2448. integer height = 172
  2449. integer taborder = 70
  2450. boolean bringtotop = true
  2451. string text = "帮助"
  2452. string normalpicname = "help.bmp"
  2453. integer picsize = 16
  2454. toolbaralignment pic_align = alignattop!
  2455. boolean border = false
  2456. end type
  2457. type sle_cardno from singlelineedit within w_userinfo_def
  2458. boolean visible = false
  2459. integer x = 270
  2460. integer y = 372
  2461. integer width = 987
  2462. integer height = 92
  2463. integer taborder = 50
  2464. integer textsize = -9
  2465. integer weight = 400
  2466. fontcharset fontcharset = gb2312charset!
  2467. fontpitch fontpitch = variable!
  2468. string facename = "宋体"
  2469. long textcolor = 33554432
  2470. boolean enabled = false
  2471. boolean autohscroll = false
  2472. integer limit = 10
  2473. boolean displayonly = true
  2474. borderstyle borderstyle = stylelowered!
  2475. end type
  2476. type st_4 from statictext within w_userinfo_def
  2477. boolean visible = false
  2478. integer x = 23
  2479. integer y = 388
  2480. integer width = 293
  2481. integer height = 60
  2482. integer textsize = -9
  2483. integer weight = 400
  2484. fontcharset fontcharset = gb2312charset!
  2485. fontpitch fontpitch = variable!
  2486. string facename = "宋体"
  2487. long textcolor = 16711680
  2488. long backcolor = 134217739
  2489. boolean enabled = false
  2490. string text = "卡 号:"
  2491. boolean focusrectangle = false
  2492. end type
  2493. type tab_1 from tab within w_userinfo_def
  2494. integer x = 1518
  2495. integer y = 192
  2496. integer width = 2363
  2497. integer height = 1980
  2498. integer taborder = 20
  2499. integer textsize = -9
  2500. integer weight = 400
  2501. fontcharset fontcharset = gb2312charset!
  2502. fontpitch fontpitch = variable!
  2503. string facename = "宋体"
  2504. long backcolor = 134217739
  2505. boolean raggedright = true
  2506. boolean focusonbuttondown = true
  2507. integer selectedtab = 1
  2508. tabpage_1 tabpage_1
  2509. tabpage_2 tabpage_2
  2510. tabpage_3 tabpage_3
  2511. tabpage_7 tabpage_7
  2512. tabpage_8 tabpage_8
  2513. tabpage_4 tabpage_4
  2514. tabpage_5 tabpage_5
  2515. tabpage_6 tabpage_6
  2516. end type
  2517. on tab_1.create
  2518. this.tabpage_1=create tabpage_1
  2519. this.tabpage_2=create tabpage_2
  2520. this.tabpage_3=create tabpage_3
  2521. this.tabpage_7=create tabpage_7
  2522. this.tabpage_8=create tabpage_8
  2523. this.tabpage_4=create tabpage_4
  2524. this.tabpage_5=create tabpage_5
  2525. this.tabpage_6=create tabpage_6
  2526. this.Control[]={this.tabpage_1,&
  2527. this.tabpage_2,&
  2528. this.tabpage_3,&
  2529. this.tabpage_7,&
  2530. this.tabpage_8,&
  2531. this.tabpage_4,&
  2532. this.tabpage_5,&
  2533. this.tabpage_6}
  2534. end on
  2535. on tab_1.destroy
  2536. destroy(this.tabpage_1)
  2537. destroy(this.tabpage_2)
  2538. destroy(this.tabpage_3)
  2539. destroy(this.tabpage_7)
  2540. destroy(this.tabpage_8)
  2541. destroy(this.tabpage_4)
  2542. destroy(this.tabpage_5)
  2543. destroy(this.tabpage_6)
  2544. end on
  2545. event doubleclicked;cb_superpsw.visible = not cb_superpsw.visible
  2546. end event
  2547. type tabpage_1 from userobject within tab_1
  2548. integer x = 18
  2549. integer y = 96
  2550. integer width = 2327
  2551. integer height = 1868
  2552. long backcolor = 134217739
  2553. string text = "权限"
  2554. long tabtextcolor = 33554432
  2555. long tabbackcolor = 134217739
  2556. long picturemaskcolor = 536870912
  2557. tv_2 tv_2
  2558. end type
  2559. on tabpage_1.create
  2560. this.tv_2=create tv_2
  2561. this.Control[]={this.tv_2}
  2562. end on
  2563. on tabpage_1.destroy
  2564. destroy(this.tv_2)
  2565. end on
  2566. type tv_2 from treeview within tabpage_1
  2567. event afterclicked ( long handle, boolean arg_changed )
  2568. integer width = 1957
  2569. integer height = 1820
  2570. integer taborder = 40
  2571. integer textsize = -9
  2572. integer weight = 400
  2573. fontcharset fontcharset = gb2312charset!
  2574. fontpitch fontpitch = variable!
  2575. string facename = "宋体"
  2576. long textcolor = 33554432
  2577. borderstyle borderstyle = stylelowered!
  2578. boolean disabledragdrop = false
  2579. boolean hideselection = false
  2580. boolean tooltips = false
  2581. boolean checkboxes = true
  2582. boolean trackselect = true
  2583. string picturename[] = {"application.ico","graphics\Shell32 005.ico","graphics\blue folder.ico","graphics\Shell32 025.ico"}
  2584. long picturemaskcolor = 536870912
  2585. long statepicturemaskcolor = 536870912
  2586. end type
  2587. event afterclicked(long handle, boolean arg_changed);treeviewitem tvi
  2588. long laststate
  2589. laststate = wf_gethandlestate(handle)
  2590. if laststate = 0 then return
  2591. IF tv_func.GetItem(Handle,tvi) = 1 THEN
  2592. IF arg_changed THEN // 状态更改
  2593. IF NOT dw_edit_mode THEN
  2594. tvi.StatePictureIndex = lastState
  2595. THIS.SetItem(Handle, tvi)
  2596. ELSE
  2597. IF Handle > 0 THEN
  2598. IF lastState = 2 THEN //孩子全部取消
  2599. wf_set_tvchild(Handle)
  2600. ELSEIF lastState = 1 THEN //父亲选定
  2601. wf_set_tvparent(Handle)
  2602. END IF
  2603. END IF
  2604. END IF
  2605. wf_sethandlestate(handle, 0)
  2606. END IF
  2607. END IF
  2608. end event
  2609. event clicked;//if not dw_edit_mode then return
  2610. //
  2611. //int ls_state
  2612. //treeviewitem tvi
  2613. //
  2614. //tv_func.getitem(handle,tvi)
  2615. //ls_state = tvi.StatePictureIndex
  2616. //
  2617. //if handle > 0 then
  2618. // if ls_state = 2 then //孩子全部取消
  2619. // wf_set_tvchild(handle)
  2620. // elseif ls_state = 1 then//父亲选定
  2621. // wf_set_tvparent(handle)
  2622. // end if
  2623. //end if
  2624. //
  2625. //
  2626. Int ls_state
  2627. treeviewitem tvi
  2628. Boolean lb_changed = False
  2629. IF getCursor() = LoadCursor(0, 32649) THEN
  2630. lb_changed = True
  2631. END IF
  2632. IF tv_func.GetItem(Handle,tvi) = 1 THEN
  2633. ls_state = tvi.StatePictureIndex
  2634. IF wf_gethandlestate(Handle) = 0 THEN
  2635. wf_sethandlestate(Handle, ls_state)
  2636. END IF
  2637. This.Event Post afterclicked(Handle, lb_changed)
  2638. END IF
  2639. end event
  2640. event key;Int ls_state
  2641. treeviewitem tvi
  2642. Long Handle
  2643. IF Key = keyspacebar! THEN
  2644. Handle = tv_func.FindItem(CurrentTreeItem!, 0)
  2645. IF tv_func.GetItem(Handle,tvi) = 1 THEN
  2646. ls_state = tvi.StatePictureIndex
  2647. IF wf_gethandlestate(Handle) = 0 THEN
  2648. wf_sethandlestate(Handle, ls_state)
  2649. END IF
  2650. THIS.EVENT POST afterclicked(Handle, TRUE)
  2651. END IF
  2652. END IF
  2653. end event
  2654. event rightclicked;IF dw_edit_mode THEN
  2655. tv_func_cur_handle = Handle
  2656. m_Dfc_Control_PopupMenu dmPopupMenu
  2657. String menustr
  2658. menustr = "Text=全选下一级~tEvent=ue_select_allson"
  2659. menustr = menustr + "|" + "Text=全选下级~tEvent=ue_select_allson_all"
  2660. //menustr = menustr + "|" + "Text=-"
  2661. IF Len(Trim(menustr)) <> 0 THEN
  2662. dmPopupMenu = Create m_Dfc_Control_PopupMenu
  2663. dmPopupMenu.mf_BuildMenu(This, menustr)
  2664. dmPopupMenu.mf_PopMenu()
  2665. Destroy dmPopupMenu
  2666. END IF
  2667. END IF
  2668. end event
  2669. type tabpage_2 from userobject within tab_1
  2670. integer x = 18
  2671. integer y = 96
  2672. integer width = 2327
  2673. integer height = 1868
  2674. long backcolor = 134217739
  2675. string text = "区域"
  2676. long tabtextcolor = 33554432
  2677. long tabbackcolor = 134217739
  2678. long picturemaskcolor = 536870912
  2679. tv_1 tv_1
  2680. end type
  2681. on tabpage_2.create
  2682. this.tv_1=create tv_1
  2683. this.Control[]={this.tv_1}
  2684. end on
  2685. on tabpage_2.destroy
  2686. destroy(this.tv_1)
  2687. end on
  2688. type tv_1 from treeview within tabpage_2
  2689. integer width = 1957
  2690. integer height = 1852
  2691. integer taborder = 50
  2692. integer textsize = -9
  2693. integer weight = 400
  2694. fontcharset fontcharset = gb2312charset!
  2695. fontpitch fontpitch = variable!
  2696. string facename = "宋体"
  2697. long textcolor = 33554432
  2698. borderstyle borderstyle = stylelowered!
  2699. boolean disabledragdrop = false
  2700. boolean hideselection = false
  2701. boolean tooltips = false
  2702. boolean checkboxes = true
  2703. boolean trackselect = true
  2704. string picturename[] = {"application.ico","graphics\Shell32 005.ico","graphics\blue folder.ico"}
  2705. long picturemaskcolor = 536870912
  2706. long statepicturemaskcolor = 536870912
  2707. end type
  2708. event clicked;if not dw_edit_mode then return
  2709. int ls_state
  2710. treeviewitem tvi
  2711. tv_cusarea.getitem(handle,tvi)
  2712. ls_state = tvi.StatePictureIndex
  2713. if handle > 0 then
  2714. if ls_state = 2 then
  2715. wf_set_tvchild_area(handle,1)
  2716. elseif ls_state = 1 then
  2717. wf_set_tvchild_area(handle,2)
  2718. wf_set_tvparent_area(handle)
  2719. end if
  2720. end if
  2721. end event
  2722. type tabpage_3 from userobject within tab_1
  2723. integer x = 18
  2724. integer y = 96
  2725. integer width = 2327
  2726. integer height = 1868
  2727. long backcolor = 134217739
  2728. string text = "分部&仓库&供应商"
  2729. long tabtextcolor = 33554432
  2730. long tabbackcolor = 134217739
  2731. long picturemaskcolor = 536870912
  2732. cbx_inuse_storage cbx_inuse_storage
  2733. dw_6 dw_6
  2734. dw_2 dw_2
  2735. dw_3 dw_3
  2736. end type
  2737. on tabpage_3.create
  2738. this.cbx_inuse_storage=create cbx_inuse_storage
  2739. this.dw_6=create dw_6
  2740. this.dw_2=create dw_2
  2741. this.dw_3=create dw_3
  2742. this.Control[]={this.cbx_inuse_storage,&
  2743. this.dw_6,&
  2744. this.dw_2,&
  2745. this.dw_3}
  2746. end on
  2747. on tabpage_3.destroy
  2748. destroy(this.cbx_inuse_storage)
  2749. destroy(this.dw_6)
  2750. destroy(this.dw_2)
  2751. destroy(this.dw_3)
  2752. end on
  2753. type cbx_inuse_storage from checkbox within tabpage_3
  2754. integer x = 969
  2755. integer y = 16
  2756. integer width = 402
  2757. integer height = 60
  2758. integer textsize = -9
  2759. integer weight = 400
  2760. fontcharset fontcharset = gb2312charset!
  2761. fontpitch fontpitch = variable!
  2762. string facename = "宋体"
  2763. long textcolor = 33554432
  2764. long backcolor = 134217739
  2765. string text = "只显示有效"
  2766. boolean checked = true
  2767. end type
  2768. event clicked;Int li_inuse
  2769. IF Checked THEN
  2770. li_inuse = 1
  2771. ELSE
  2772. li_inuse = -1
  2773. END IF
  2774. dw_2.Retrieve(li_inuse)
  2775. end event
  2776. type dw_6 from datawindow within tabpage_3
  2777. integer x = 1742
  2778. integer width = 782
  2779. integer height = 1844
  2780. integer taborder = 70
  2781. string title = "none"
  2782. string dataobject = "dw_user_spttype"
  2783. boolean hscrollbar = true
  2784. boolean vscrollbar = true
  2785. boolean livescroll = true
  2786. borderstyle borderstyle = stylelowered!
  2787. end type
  2788. event rbuttondown;wf_select_all(this, dwo)
  2789. end event
  2790. type dw_2 from datawindow within tabpage_3
  2791. integer x = 786
  2792. integer y = 92
  2793. integer width = 951
  2794. integer height = 1760
  2795. integer taborder = 30
  2796. string title = "none"
  2797. string dataobject = "dw_user_storage_sp1"
  2798. boolean hscrollbar = true
  2799. boolean vscrollbar = true
  2800. boolean livescroll = true
  2801. borderstyle borderstyle = stylelowered!
  2802. end type
  2803. event rbuttondown;wf_select_all(this, dwo)
  2804. end event
  2805. type dw_3 from datawindow within tabpage_3
  2806. integer width = 782
  2807. integer height = 1852
  2808. integer taborder = 40
  2809. string title = "none"
  2810. string dataobject = "dw_user_sc_sp1"
  2811. boolean hscrollbar = true
  2812. boolean vscrollbar = true
  2813. boolean livescroll = true
  2814. borderstyle borderstyle = stylelowered!
  2815. end type
  2816. event rbuttondown;wf_select_all(this, dwo)
  2817. end event
  2818. type tabpage_7 from userobject within tab_1
  2819. integer x = 18
  2820. integer y = 96
  2821. integer width = 2327
  2822. integer height = 1868
  2823. long backcolor = 134217739
  2824. string text = "出纳帐号"
  2825. long tabtextcolor = 33554432
  2826. long tabbackcolor = 134217739
  2827. long picturemaskcolor = 536870912
  2828. dw_9 dw_9
  2829. end type
  2830. on tabpage_7.create
  2831. this.dw_9=create dw_9
  2832. this.Control[]={this.dw_9}
  2833. end on
  2834. on tabpage_7.destroy
  2835. destroy(this.dw_9)
  2836. end on
  2837. type dw_9 from u_dw_rbtnfilter within tabpage_7
  2838. integer width = 2240
  2839. integer height = 1772
  2840. string dataobject = "dw_user_accountstr_sp1"
  2841. boolean hscrollbar = true
  2842. boolean vscrollbar = true
  2843. end type
  2844. event rbuttondown;call super::rbuttondown;wf_select_all(this, dwo)
  2845. end event
  2846. type tabpage_8 from userobject within tab_1
  2847. integer x = 18
  2848. integer y = 96
  2849. integer width = 2327
  2850. integer height = 1868
  2851. long backcolor = 134217739
  2852. string text = "业务员"
  2853. long tabtextcolor = 33554432
  2854. long tabbackcolor = 134217739
  2855. long picturemaskcolor = 536870912
  2856. dw_10 dw_10
  2857. end type
  2858. on tabpage_8.create
  2859. this.dw_10=create dw_10
  2860. this.Control[]={this.dw_10}
  2861. end on
  2862. on tabpage_8.destroy
  2863. destroy(this.dw_10)
  2864. end on
  2865. type dw_10 from datawindow within tabpage_8
  2866. integer width = 2327
  2867. integer height = 1852
  2868. integer taborder = 50
  2869. string title = "none"
  2870. string dataobject = "dw_user_outrep"
  2871. boolean hscrollbar = true
  2872. boolean vscrollbar = true
  2873. boolean livescroll = true
  2874. borderstyle borderstyle = stylelowered!
  2875. end type
  2876. event rbuttondown;wf_select_all(this, dwo)
  2877. end event
  2878. type tabpage_4 from userobject within tab_1
  2879. integer x = 18
  2880. integer y = 96
  2881. integer width = 2327
  2882. integer height = 1868
  2883. long backcolor = 134217739
  2884. string text = "附件&外挂"
  2885. long tabtextcolor = 33554432
  2886. long tabbackcolor = 134217739
  2887. long picturemaskcolor = 536870912
  2888. dw_4 dw_4
  2889. dw_7 dw_7
  2890. end type
  2891. on tabpage_4.create
  2892. this.dw_4=create dw_4
  2893. this.dw_7=create dw_7
  2894. this.Control[]={this.dw_4,&
  2895. this.dw_7}
  2896. end on
  2897. on tabpage_4.destroy
  2898. destroy(this.dw_4)
  2899. destroy(this.dw_7)
  2900. end on
  2901. type dw_4 from u_dw_rbtnfilter within tabpage_4
  2902. integer y = 12
  2903. integer width = 1312
  2904. integer height = 1836
  2905. integer taborder = 20
  2906. string dataobject = "dw_user_fileclass_sp1"
  2907. boolean hscrollbar = true
  2908. boolean vscrollbar = true
  2909. end type
  2910. event rbuttondown;call super::rbuttondown;wf_select_all(this, dwo)
  2911. end event
  2912. type dw_7 from u_dw_rbtnfilter within tabpage_4
  2913. integer x = 1312
  2914. integer y = 12
  2915. integer width = 1001
  2916. integer height = 1840
  2917. integer taborder = 20
  2918. string dataobject = "dw_user_plugins_sp1"
  2919. boolean hscrollbar = true
  2920. boolean vscrollbar = true
  2921. end type
  2922. event rbuttondown;call super::rbuttondown;wf_select_all(this, dwo)
  2923. end event
  2924. type tabpage_5 from userobject within tab_1
  2925. integer x = 18
  2926. integer y = 96
  2927. integer width = 2327
  2928. integer height = 1868
  2929. long backcolor = 134217739
  2930. string text = "Excel打印格式"
  2931. long tabtextcolor = 33554432
  2932. long tabbackcolor = 134217739
  2933. long picturemaskcolor = 536870912
  2934. dw_5 dw_5
  2935. end type
  2936. on tabpage_5.create
  2937. this.dw_5=create dw_5
  2938. this.Control[]={this.dw_5}
  2939. end on
  2940. on tabpage_5.destroy
  2941. destroy(this.dw_5)
  2942. end on
  2943. type dw_5 from datawindow within tabpage_5
  2944. integer width = 1961
  2945. integer height = 1852
  2946. integer taborder = 50
  2947. string title = "none"
  2948. string dataobject = "dw_user_xlsbillprint_sp1"
  2949. boolean hscrollbar = true
  2950. boolean vscrollbar = true
  2951. boolean livescroll = true
  2952. borderstyle borderstyle = stylelowered!
  2953. end type
  2954. event rbuttondown;wf_select_all(this, dwo)
  2955. end event
  2956. type tabpage_6 from userobject within tab_1
  2957. integer x = 18
  2958. integer y = 96
  2959. integer width = 2327
  2960. integer height = 1868
  2961. long backcolor = 134217739
  2962. string text = "自定义报表"
  2963. long tabtextcolor = 33554432
  2964. long tabbackcolor = 134217739
  2965. long picturemaskcolor = 536870912
  2966. dw_8 dw_8
  2967. end type
  2968. on tabpage_6.create
  2969. this.dw_8=create dw_8
  2970. this.Control[]={this.dw_8}
  2971. end on
  2972. on tabpage_6.destroy
  2973. destroy(this.dw_8)
  2974. end on
  2975. type dw_8 from u_dw_rbtnfilter within tabpage_6
  2976. integer width = 2135
  2977. integer height = 1772
  2978. integer taborder = 20
  2979. string dataobject = "dw_user_report_sp1"
  2980. boolean hscrollbar = true
  2981. boolean vscrollbar = true
  2982. end type
  2983. event rbuttondown;call super::rbuttondown;wf_select_all(this, dwo)
  2984. end event
  2985. type cb_superpsw from uo_imflatbutton within w_userinfo_def
  2986. boolean visible = false
  2987. integer x = 2290
  2988. integer width = 530
  2989. integer height = 172
  2990. integer taborder = 150
  2991. string text = "超级删除数据密码"
  2992. string normalpicname = "delete.bmp"
  2993. integer picsize = 16
  2994. toolbaralignment pic_align = alignattop!
  2995. boolean border = false
  2996. end type
  2997. event clicked;call super::clicked;string superpsw,arg_msg
  2998. open(w_super_psw)
  2999. superpsw=message.stringparm
  3000. if superpsw='' then return
  3001. uo_getdbinfo uo_dbinfo
  3002. uo_dbinfo = create uo_getdbinfo
  3003. if uo_dbinfo.set_superpsw(superpsw,arg_msg)=0 then
  3004. messagebox("提示",arg_msg, Information!, OK! )
  3005. return
  3006. else
  3007. messagebox("提示",'设定超级密码成功', Information!, OK! )
  3008. sys_superpsw=superpsw
  3009. return
  3010. end if
  3011. end event
  3012. type cb_undo from uo_imflatbutton within w_userinfo_def
  3013. integer x = 329
  3014. integer width = 165
  3015. integer height = 172
  3016. integer taborder = 120
  3017. boolean enabled = false
  3018. string text = "放弃"
  3019. string normalpicname = "undo.bmp"
  3020. integer picsize = 16
  3021. toolbaralignment pic_align = alignattop!
  3022. boolean border = false
  3023. end type
  3024. event clicked;call super::clicked;Long currentrow
  3025. currentrow = dw_1.GetRow()
  3026. IF currentrow >= 1 THEN
  3027. sle_id.Text = dw_1.Object.u_user_userid[currentrow]
  3028. sle_xm.Text = dw_1.Object.username[currentrow]
  3029. sle_dscrp.Text = dw_1.Object.descrp[currentrow]
  3030. WF_REFRESH()
  3031. END IF
  3032. dw_edit_mode = FALSE
  3033. WF_LOCKFACE()
  3034. modisign = FALSE
  3035. end event
  3036. type cb_paste from uo_imflatbutton within w_userinfo_def
  3037. integer x = 1440
  3038. integer width = 261
  3039. integer height = 172
  3040. integer taborder = 90
  3041. string text = "粘贴权限"
  3042. string normalpicname = "paste.bmp"
  3043. integer picsize = 16
  3044. toolbaralignment pic_align = alignattop!
  3045. boolean border = false
  3046. end type
  3047. event clicked;call super::clicked;wf_pasteright()
  3048. end event
  3049. type cb_copy from uo_imflatbutton within w_userinfo_def
  3050. integer x = 1179
  3051. integer width = 261
  3052. integer height = 172
  3053. integer taborder = 80
  3054. string text = "复制权限"
  3055. string normalpicname = "copy.bmp"
  3056. integer picsize = 16
  3057. toolbaralignment pic_align = alignattop!
  3058. boolean border = false
  3059. end type
  3060. event clicked;call super::clicked;wf_copyright()
  3061. end event
  3062. type cb_setpws from uo_imflatbutton within w_userinfo_def
  3063. integer x = 1701
  3064. integer width = 261
  3065. integer height = 172
  3066. integer taborder = 100
  3067. string text = "恢复密码"
  3068. string normalpicname = "update.bmp"
  3069. integer picsize = 16
  3070. toolbaralignment pic_align = alignattop!
  3071. boolean border = false
  3072. end type
  3073. event clicked;call super::clicked;IF Trim(sle_id.Text) = sys_super_id THEN
  3074. MessageBox("提示",'超级用户记录不能修改!', Information!, OK! )
  3075. RETURN
  3076. END IF
  3077. Int i
  3078. i = MessageBox("提示",'你确定将用户'+is_id+ '的密码恢复吗?',Question!,yesno!,2)
  3079. IF i = 2 THEN
  3080. RETURN 1
  3081. END IF
  3082. String arg_msg
  3083. uo_user.reset_userpwd(sys_scid,ins_empid,Trim(sle_id.Text),arg_msg)
  3084. MessageBox("提示",arg_msg, Information!, OK! )
  3085. end event
  3086. type cb_select_emp from uo_imflatbutton within w_userinfo_def
  3087. integer x = 658
  3088. integer width = 261
  3089. integer height = 172
  3090. integer taborder = 70
  3091. string text = "选择员工"
  3092. string normalpicname = "find2.bmp"
  3093. integer picsize = 16
  3094. toolbaralignment pic_align = alignattop!
  3095. boolean border = false
  3096. end type
  3097. event clicked;call super::clicked;if not isvalid(w_empinfo_choice) then
  3098. s_empselect_open strans
  3099. OPENwithparm(w_empinfo_choice,strans)
  3100. s_empselect s_select
  3101. s_select=Message.PowerObjectParm //接受返回结构
  3102. IF s_select.empid>0 THEN
  3103. ins_empid=s_select.empid
  3104. sle_id.text=s_select.empcode
  3105. sle_xm.text=s_select.empname
  3106. END IF
  3107. end if
  3108. end event
  3109. type dw_1 from u_dw_rbtnfilter within w_userinfo_def
  3110. integer y = 564
  3111. integer width = 1513
  3112. integer height = 1612
  3113. string dataobject = "dw_userdef_sp1"
  3114. boolean hscrollbar = true
  3115. boolean vscrollbar = true
  3116. end type
  3117. event clicked;call super::clicked;if not dw_edit_mode then THIS.SETROW(ROW)
  3118. end event
  3119. event rowfocuschanged;IF currentrow <= 0 THEN RETURN
  3120. THIS.SelectRow(0,FALSE)
  3121. THIS.SelectRow(currentrow,TRUE)
  3122. IF dw_1.GetRow() > 0 THEN
  3123. is_id = THIS.Object.u_user_userid[dw_1.GetRow()]
  3124. ins_empid = THIS.Object.empid[dw_1.GetRow()]
  3125. sle_id.Text = is_id
  3126. sle_xm.Text = THIS.Object.username[dw_1.GetRow()]
  3127. sle_dscrp.Text = THIS.Object.descrp[dw_1.GetRow()]
  3128. sle_cardno.Text = f_psw_bczh(THIS.Object.cardno[dw_1.GetRow()],1,sys_power_key)
  3129. cbx_usecard.Checked = THIS.Object.ifusecard[dw_1.GetRow()] = 1
  3130. cbx_ifnotin.Checked = THIS.Object.ifnotin[dw_1.GetRow()] = 1
  3131. cbx_ifphone.Checked = THIS.Object.ifphone[dw_1.GetRow()] = 1
  3132. CHOOSE CASE THIS.Object.dlflag[dw_1.GetRow()]
  3133. CASE 0
  3134. ddlb_dlflag.text = '单口令'
  3135. case 1
  3136. ddlb_dlflag.text = '单指纹'
  3137. case 2
  3138. ddlb_dlflag.text = '口令+指纹'
  3139. END CHOOSE
  3140. wf_refresh()
  3141. END IF
  3142. end event
  3143. event rowfocuschanging;if dw_edit_mode then return 1
  3144. end event
  3145. event constructor;call super::constructor; titleclick_sort_use=true //单击标题排序功能开关
  3146. RBUTTON_FILTER_USE=true //右键查询功能开关
  3147. end event
  3148. type sle_dscrp from singlelineedit within w_userinfo_def
  3149. integer x = 270
  3150. integer y = 464
  3151. integer width = 1230
  3152. integer height = 92
  3153. integer taborder = 60
  3154. integer textsize = -9
  3155. integer weight = 400
  3156. fontcharset fontcharset = gb2312charset!
  3157. fontpitch fontpitch = variable!
  3158. string facename = "宋体"
  3159. long textcolor = 33554432
  3160. boolean autohscroll = false
  3161. borderstyle borderstyle = stylelowered!
  3162. end type
  3163. type st_3 from statictext within w_userinfo_def
  3164. integer x = 23
  3165. integer y = 480
  3166. integer width = 261
  3167. integer height = 60
  3168. integer textsize = -9
  3169. integer weight = 400
  3170. fontcharset fontcharset = gb2312charset!
  3171. fontpitch fontpitch = variable!
  3172. string facename = "宋体"
  3173. long textcolor = 16711680
  3174. long backcolor = 134217739
  3175. boolean enabled = false
  3176. string text = "备 注:"
  3177. boolean focusrectangle = false
  3178. end type
  3179. type sle_xm from singlelineedit within w_userinfo_def
  3180. integer x = 270
  3181. integer y = 284
  3182. integer width = 530
  3183. integer height = 92
  3184. integer taborder = 40
  3185. integer textsize = -9
  3186. integer weight = 400
  3187. fontcharset fontcharset = gb2312charset!
  3188. fontpitch fontpitch = variable!
  3189. string facename = "宋体"
  3190. long textcolor = 33554432
  3191. boolean autohscroll = false
  3192. integer limit = 10
  3193. boolean displayonly = true
  3194. borderstyle borderstyle = stylelowered!
  3195. end type
  3196. type sle_id from singlelineedit within w_userinfo_def
  3197. integer x = 270
  3198. integer y = 188
  3199. integer width = 530
  3200. integer height = 92
  3201. integer taborder = 30
  3202. integer textsize = -9
  3203. integer weight = 400
  3204. fontcharset fontcharset = gb2312charset!
  3205. fontpitch fontpitch = variable!
  3206. string facename = "宋体"
  3207. long textcolor = 33554432
  3208. boolean autohscroll = false
  3209. integer limit = 10
  3210. boolean displayonly = true
  3211. borderstyle borderstyle = stylelowered!
  3212. end type
  3213. type st_2 from statictext within w_userinfo_def
  3214. integer x = 23
  3215. integer y = 300
  3216. integer width = 293
  3217. integer height = 60
  3218. integer textsize = -9
  3219. integer weight = 400
  3220. fontcharset fontcharset = gb2312charset!
  3221. fontpitch fontpitch = variable!
  3222. string facename = "宋体"
  3223. long textcolor = 16711680
  3224. long backcolor = 134217739
  3225. boolean enabled = false
  3226. string text = "用户姓名:"
  3227. boolean focusrectangle = false
  3228. end type
  3229. type st_1 from statictext within w_userinfo_def
  3230. integer x = 23
  3231. integer y = 204
  3232. integer width = 288
  3233. integer height = 60
  3234. integer textsize = -9
  3235. integer weight = 400
  3236. fontcharset fontcharset = gb2312charset!
  3237. fontpitch fontpitch = variable!
  3238. string facename = "宋体"
  3239. long textcolor = 16711680
  3240. long backcolor = 134217739
  3241. boolean enabled = false
  3242. string text = "用户代码:"
  3243. boolean focusrectangle = false
  3244. end type
  3245. type cb_end from uo_imflatbutton within w_userinfo_def
  3246. integer x = 2126
  3247. integer width = 165
  3248. integer height = 172
  3249. integer taborder = 110
  3250. boolean bringtotop = true
  3251. string text = "退出"
  3252. string normalpicname = "exit.bmp"
  3253. integer picsize = 16
  3254. toolbaralignment pic_align = alignattop!
  3255. boolean border = false
  3256. end type
  3257. event clicked;call super::clicked;close(parent)
  3258. end event
  3259. type cb_del from uo_imflatbutton within w_userinfo_def
  3260. integer x = 494
  3261. integer width = 165
  3262. integer height = 172
  3263. integer taborder = 140
  3264. string text = "删除"
  3265. string normalpicname = "delete.bmp"
  3266. integer picsize = 16
  3267. toolbaralignment pic_align = alignattop!
  3268. boolean border = false
  3269. end type
  3270. event clicked;call super::clicked;int i
  3271. if trim(sle_id.text)=sys_super_id then
  3272. messagebox(publ_operator,'超级用户记录不能删除!')
  3273. return
  3274. END IF
  3275. i=messagebox(publ_operator,'你确定将用户'+is_id+ '删除吗?',Question!,yesno!,2)
  3276. if i=2 then
  3277. return 1
  3278. end if
  3279. long ll_row
  3280. string arg_msg
  3281. ll_row=dw_1.getrow()
  3282. if ll_row=0 then return
  3283. if uo_user.deluser(false,sys_scid,ins_empid,arg_msg,true)=0 then
  3284. messagebox('错误','删除用户'+is_id+'资料失败>>'+arg_msg, StopSign!, OK! )
  3285. return
  3286. end if
  3287. dw_1.deleterow(0)
  3288. dw_1.triggerevent(rowfocuschanged!)
  3289. end event
  3290. type cb_mod from uo_imflatbutton within w_userinfo_def
  3291. integer x = 165
  3292. integer width = 165
  3293. integer height = 172
  3294. integer taborder = 160
  3295. string text = "修改"
  3296. string normalpicname = "open.bmp"
  3297. integer picsize = 16
  3298. toolbaralignment pic_align = alignattop!
  3299. boolean border = false
  3300. end type
  3301. event clicked;call super::clicked;
  3302. IF dw_edit_mode THEN //保存
  3303. String ls_str,ls_storage_str,ls_sc_str,ls_areastr
  3304. String ls_id,ls_name,ls_pass,ls_dscrp,ls_cardno,ls_showdate
  3305. Long ll_row,i,ll_findrow
  3306. String arg_msg
  3307. String ls_classeditstr,ls_classviewstr
  3308. String ls_xls_printstr,ls_xls_sendstr
  3309. String ls_spttypestr
  3310. String ls_plugins_str
  3311. String ls_reportstr
  3312. String ls_accountstr
  3313. String ls_outrepstr
  3314. Int li_ifnotin = 0
  3315. Int li_dlflag = 0
  3316. Int li_ifphone = 0
  3317. ls_id = Trim(sle_id.Text)
  3318. IF ls_id = "" THEN
  3319. MessageBox("提示","必须填写用户代码!", Information!, OK! )
  3320. sle_id.SetFocus()
  3321. RETURN
  3322. END IF
  3323. ls_name = Trim(sle_xm.Text)
  3324. IF ls_name = "" THEN
  3325. MessageBox("提示","必须填写用户姓名!", Information!, OK! )
  3326. sle_xm.SetFocus()
  3327. RETURN
  3328. END IF
  3329. ls_dscrp = Trim(sle_dscrp.Text)
  3330. ls_cardno = Trim(sle_cardno.Text)
  3331. CHOOSE CASE ddlb_dlflag.Text
  3332. CASE '单口令'
  3333. li_dlflag = 0
  3334. CASE '单指纹'
  3335. li_dlflag = 1
  3336. CASE '口令+指纹'
  3337. li_dlflag = 2
  3338. END CHOOSE
  3339. ls_str = wf_getright() //get the user-right string
  3340. ls_areastr = wf_getarea() //get the user-area string
  3341. IF sys_option_cusarea = 0 THEN ls_areastr = '0'
  3342. IF cbx_ifnotin.Checked THEN li_ifnotin = 1
  3343. IF cbx_ifphone.Checked THEN li_ifphone = 1
  3344. ls_storage_str = wf_get_storage() //get the user-storage string
  3345. ls_sc_str = wf_get_sc()//get the user-sc string
  3346. ls_spttypestr = wf_get_spttype() //get the user-spttype string
  3347. wf_get_class(ls_classeditstr,ls_classviewstr)
  3348. wf_get_xlspowerstr(ls_xls_printstr,ls_xls_sendstr)
  3349. wf_get_plugins(ls_plugins_str)
  3350. wf_get_report(ls_reportstr)
  3351. wf_get_account(ls_accountstr)
  3352. wf_get_outrep(ls_outrepstr)
  3353. IF uo_user.saveuser(modisign,sys_scid,ins_empid,ls_id,ls_name,&
  3354. ls_cardno,ls_dscrp,ls_str,ls_storage_str,ls_sc_str,ls_areastr,&
  3355. ls_classeditstr,ls_classviewstr,ls_xls_printstr,ls_xls_sendstr,&
  3356. ls_spttypestr,ls_plugins_str,ls_reportstr,li_ifnotin,li_dlflag,&
  3357. arg_msg,TRUE,ls_accountstr,ls_outrepstr,li_ifphone) = 0 THEN
  3358. MessageBox(publ_operator,arg_msg)
  3359. RETURN
  3360. END IF
  3361. dw_1.Retrieve(sys_scid)
  3362. ll_findrow = dw_1.Find("empid="+String(ins_empid),1,dw_1.RowCount())
  3363. IF ll_findrow > 0 THEN
  3364. dw_1.SelectRow(0,FALSE)
  3365. dw_1.SetRow(ll_findrow)
  3366. dw_1.SelectRow(ll_findrow,TRUE)
  3367. END IF
  3368. MessageBox("提示",'用户资料已经成功更新!', Information!, OK! )
  3369. modisign = FALSE
  3370. dw_edit_mode = FALSE
  3371. WF_LOCKFACE()
  3372. ELSE //修改
  3373. IF Trim(sle_id.Text) = sys_super_id THEN
  3374. MessageBox("提示",'超级用户记录不能修改!', Information!, OK! )
  3375. RETURN
  3376. END IF
  3377. IF dw_1.GetRow() <= 0 THEN
  3378. MessageBox("提示",'没有修改对象!', Information!, OK! )
  3379. RETURN
  3380. END IF
  3381. dw_edit_mode = TRUE
  3382. modisign = TRUE
  3383. wf_lockface()
  3384. // is_id = dw_1.Object.u_user_userid[dw_1.GetRow()]
  3385. sle_id.SetFocus()
  3386. END IF
  3387. end event
  3388. type cb_add from uo_imflatbutton within w_userinfo_def
  3389. integer width = 165
  3390. integer height = 172
  3391. integer taborder = 170
  3392. string text = "增加"
  3393. string normalpicname = "new.bmp"
  3394. integer picsize = 16
  3395. toolbaralignment pic_align = alignattop!
  3396. boolean border = false
  3397. end type
  3398. event clicked;call super::clicked;int cnt,i,j,k
  3399. long ll_handl
  3400. ll_handl = tv_func.finditem(RootTreeItem!,0)
  3401. if ll_handl > 0 then wf_clear_tvchild(ll_handl)
  3402. ll_handl = tv_cusarea.finditem(RootTreeItem!,0)
  3403. if ll_handl > 0 then wf_clear_tvchild_area(ll_handl)
  3404. for j=1 to dw_2.rowcount()
  3405. dw_2.object.choice[j]=0
  3406. next
  3407. for k=1 to dw_3.rowcount()
  3408. dw_3.object.choice[k]=0
  3409. next
  3410. dw_edit_mode=true
  3411. wf_lockface()
  3412. sle_id.text=""
  3413. sle_xm.text=""
  3414. sle_cardno.TEXT=''
  3415. sle_dscrp.text=""
  3416. sle_id.setfocus()
  3417. cb_select_emp.triggerevent(clicked!)
  3418. end event
  3419. type ln_bar from line within w_userinfo_def
  3420. long linecolor = 268435456
  3421. integer linethickness = 4
  3422. integer beginy = 176
  3423. integer endx = 3323
  3424. integer endy = 176
  3425. end type
  3426. type ln_bar2 from line within w_userinfo_def
  3427. long linecolor = 16777215
  3428. integer linethickness = 4
  3429. integer beginy = 180
  3430. integer endx = 3323
  3431. integer endy = 180
  3432. end type
  3433. type r_bar from rectangle within w_userinfo_def
  3434. long linecolor = 16777215
  3435. long fillcolor = 1073741824
  3436. integer x = 3122
  3437. integer width = 73
  3438. integer height = 172
  3439. end type
  3440. event constructor;this.fillcolor = 14215660
  3441. this.linecolor = 14215660
  3442. this.x = -1
  3443. this.y = -1
  3444. this.height = ln_bar2.beginy - 5
  3445. end event