123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053 |
- $PBExportHeader$w_userinfo_def.srw
- forward
- global type w_userinfo_def from window
- end type
- type cbx_tree from checkbox within w_userinfo_def
- end type
- type cbx_ifphone from checkbox within w_userinfo_def
- end type
- type ddlb_dlflag from dropdownlistbox within w_userinfo_def
- end type
- type st_5 from statictext within w_userinfo_def
- end type
- type cb_other_func from uo_imflatbutton within w_userinfo_def
- end type
- type cbx_ifnotin from checkbox within w_userinfo_def
- end type
- type cbx_usecard from checkbox within w_userinfo_def
- end type
- type cb_help from uo_imflatbutton within w_userinfo_def
- end type
- type sle_cardno from singlelineedit within w_userinfo_def
- end type
- type st_4 from statictext within w_userinfo_def
- end type
- type tab_1 from tab within w_userinfo_def
- end type
- type tabpage_1 from userobject within tab_1
- end type
- type tv_2 from treeview within tabpage_1
- end type
- type tabpage_1 from userobject within tab_1
- tv_2 tv_2
- end type
- type tabpage_2 from userobject within tab_1
- end type
- type tv_1 from treeview within tabpage_2
- end type
- type tabpage_2 from userobject within tab_1
- tv_1 tv_1
- end type
- type tabpage_3 from userobject within tab_1
- end type
- type cbx_inuse_storage from checkbox within tabpage_3
- end type
- type dw_6 from datawindow within tabpage_3
- end type
- type dw_2 from datawindow within tabpage_3
- end type
- type dw_3 from datawindow within tabpage_3
- end type
- type tabpage_3 from userobject within tab_1
- cbx_inuse_storage cbx_inuse_storage
- dw_6 dw_6
- dw_2 dw_2
- dw_3 dw_3
- end type
- type tabpage_7 from userobject within tab_1
- end type
- type dw_9 from u_dw_rbtnfilter within tabpage_7
- end type
- type tabpage_7 from userobject within tab_1
- dw_9 dw_9
- end type
- type tabpage_8 from userobject within tab_1
- end type
- type dw_10 from datawindow within tabpage_8
- end type
- type tabpage_8 from userobject within tab_1
- dw_10 dw_10
- end type
- type tabpage_4 from userobject within tab_1
- end type
- type dw_4 from u_dw_rbtnfilter within tabpage_4
- end type
- type dw_7 from u_dw_rbtnfilter within tabpage_4
- end type
- type tabpage_4 from userobject within tab_1
- dw_4 dw_4
- dw_7 dw_7
- end type
- type tabpage_5 from userobject within tab_1
- end type
- type dw_5 from datawindow within tabpage_5
- end type
- type tabpage_5 from userobject within tab_1
- dw_5 dw_5
- end type
- type tabpage_6 from userobject within tab_1
- end type
- type dw_8 from u_dw_rbtnfilter within tabpage_6
- end type
- type tabpage_6 from userobject within tab_1
- dw_8 dw_8
- end type
- type tab_1 from tab within w_userinfo_def
- tabpage_1 tabpage_1
- tabpage_2 tabpage_2
- tabpage_3 tabpage_3
- tabpage_7 tabpage_7
- tabpage_8 tabpage_8
- tabpage_4 tabpage_4
- tabpage_5 tabpage_5
- tabpage_6 tabpage_6
- end type
- type cb_superpsw from uo_imflatbutton within w_userinfo_def
- end type
- type cb_undo from uo_imflatbutton within w_userinfo_def
- end type
- type cb_paste from uo_imflatbutton within w_userinfo_def
- end type
- type cb_copy from uo_imflatbutton within w_userinfo_def
- end type
- type cb_setpws from uo_imflatbutton within w_userinfo_def
- end type
- type cb_select_emp from uo_imflatbutton within w_userinfo_def
- end type
- type dw_1 from u_dw_rbtnfilter within w_userinfo_def
- end type
- type sle_dscrp from singlelineedit within w_userinfo_def
- end type
- type st_3 from statictext within w_userinfo_def
- end type
- type sle_xm from singlelineedit within w_userinfo_def
- end type
- type sle_id from singlelineedit within w_userinfo_def
- end type
- type st_2 from statictext within w_userinfo_def
- end type
- type st_1 from statictext within w_userinfo_def
- end type
- type cb_end from uo_imflatbutton within w_userinfo_def
- end type
- type cb_del from uo_imflatbutton within w_userinfo_def
- end type
- type cb_mod from uo_imflatbutton within w_userinfo_def
- end type
- type cb_add from uo_imflatbutton within w_userinfo_def
- end type
- type ln_bar from line within w_userinfo_def
- end type
- type ln_bar2 from line within w_userinfo_def
- end type
- type r_bar from rectangle within w_userinfo_def
- end type
- end forward
- global type w_userinfo_def from window
- integer x = 5
- integer y = 4
- integer width = 3918
- integer height = 2284
- boolean titlebar = true
- string title = "用户权限设置"
- boolean controlmenu = true
- boolean minbox = true
- boolean maxbox = true
- windowtype windowtype = popup!
- windowstate windowstate = maximized!
- long backcolor = 134217739
- boolean center = true
- event ue_print_report ( )
- event ue_print_report_cancle ( )
- event ue_sendout ( )
- event ue_sendout_cancle ( )
- event ue_save ( )
- event ue_undo ( )
- event ue_edit ( )
- event ue_select_allson ( )
- event ue_select_allson_all ( )
- cbx_tree cbx_tree
- cbx_ifphone cbx_ifphone
- ddlb_dlflag ddlb_dlflag
- st_5 st_5
- cb_other_func cb_other_func
- cbx_ifnotin cbx_ifnotin
- cbx_usecard cbx_usecard
- cb_help cb_help
- sle_cardno sle_cardno
- st_4 st_4
- tab_1 tab_1
- cb_superpsw cb_superpsw
- cb_undo cb_undo
- cb_paste cb_paste
- cb_copy cb_copy
- cb_setpws cb_setpws
- cb_select_emp cb_select_emp
- dw_1 dw_1
- sle_dscrp sle_dscrp
- st_3 st_3
- sle_xm sle_xm
- sle_id sle_id
- st_2 st_2
- st_1 st_1
- cb_end cb_end
- cb_del cb_del
- cb_mod cb_mod
- cb_add cb_add
- ln_bar ln_bar
- ln_bar2 ln_bar2
- r_bar r_bar
- end type
- global w_userinfo_def w_userinfo_def
- type prototypes
- subroutine keybd_event(uint bVk,uint bScan,long dwFlags,long dwExtraInfo ) library 'user32.dll'
- Function long GetCursor () Library "user32.dll" Alias for "GetCursor"
- Function long LoadCursor (long hInstance, long lpCursorName) Library "user32.dll" Alias for "LoadCursorW"
- end prototypes
- type variables
- boolean modisign=false //编辑、增加标志
- boolean dw_edit_mode=false //可编辑状态标志
- long deep=0,deep_area = 0
- string is_id //当前操作员id
- string copy_rightstring=''
- long ins_empid=0
- uo_usergroup uo_user
- treeview tv_func,tv_cusarea
- datawindow dw_5,dw_4,dw_3,dw_2,dw_6,dw_7,dw_8,dw_9,dw_10
- long il_handle_arr[], il_state_arr[]
- long il_max = 0
- s_sys_user s_user_copy
- long tv_func_cur_handle
- long tmp_chflag = 1
- end variables
- forward prototypes
- public function integer wf_lockface ()
- public function string wf_getright ()
- public subroutine wf_refresh ()
- public subroutine wf_copyright ()
- public subroutine wf_pasteright ()
- public function string wf_get_storage ()
- public function string wf_get_sc ()
- public function integer wf_build_functree ()
- public function integer pf_treegrowth (long arg_handl, long arg_funcid, integer arg_lp)
- public subroutine wf_refresh_tvchild (long arg_handl, string arg_rightstr)
- public subroutine wf_refresh_tvnext (long arg_handl, string arg_rightstr)
- public subroutine wf_getright_tvchild (long arg_handl, ref string arg_rightstr)
- public subroutine wf_getright_tvnext (long arg_handl, ref string arg_rightstr)
- public subroutine wf_set_tvparent (long arg_handl)
- public subroutine wf_set_tvchild (long arg_handl)
- public subroutine wf_set_tvnext (long arg_handl)
- public subroutine wf_clear_tvnext (long arg_handl)
- public subroutine wf_clear_tvchild (long arg_handl)
- public function integer wf_build_areatree ()
- public function integer pf_treegrowth_area (long arg_handl, long arg_parentid, integer arg_lp)
- public subroutine wf_refresh_tvchild_area (long arg_handl, string arg_areastr)
- public subroutine wf_refresh_tvnext_area (long arg_handl, string arg_areastr)
- public subroutine wf_getarea_tvchild (long arg_handl, ref string arg_areastr)
- public subroutine wf_getarea_tvnext (long arg_handl, ref string arg_areastr)
- public function string wf_getarea ()
- public subroutine wf_set_tvchild_area (long arg_handl, integer arg_index)
- public subroutine wf_set_tvnext_area (long arg_handl, integer arg_index)
- public subroutine wf_set_tvparent_area (long arg_handl)
- public subroutine wf_clear_tvchild_area (long arg_handl)
- public subroutine wf_clear_tvnext_area (long arg_handl)
- public subroutine wf_get_class (ref string arg_classedit, ref string arg_classview)
- public subroutine wf_get_xlspowerstr (ref string arg_xls_printstr, ref string arg_xls_sendstr)
- public function string wf_get_spttype ()
- public subroutine wf_get_plugins (ref string arg_str)
- public subroutine wf_get_report (ref string arg_str)
- public subroutine wf_set_sendout_tvnext (long arg_handl, integer arg_flag, integer arg_type)
- public subroutine wf_set_sendout_tvchild (long arg_handl, integer arg_flag, integer arg_type)
- public subroutine wf_set_sendout (integer arg_flag, integer arg_type)
- public function long wf_gethandlestate (long arg_handle)
- public subroutine wf_sethandlestate (long arg_handle, long arg_state)
- public subroutine wf_get_account (ref string arg_str)
- public subroutine wf_get_outrep (ref string arg_str)
- public subroutine wf_refresh_mx (s_sys_user arg_s_user)
- public subroutine wf_set_tvchild_son (long arg_handl, integer arg_index)
- public subroutine wf_set_tvchild_son_all (long arg_handl, integer arg_index)
- public subroutine wf_select_all (datawindow arg_dw, dwobject dwo)
- end prototypes
- event ue_print_report();wf_set_sendout(1,1)
- end event
- event ue_print_report_cancle();wf_set_sendout(0,1)
- end event
- event ue_sendout();wf_set_sendout(1,0)
- end event
- event ue_sendout_cancle();wf_set_sendout(0,0)
- end event
- event ue_save();String ls_str,ls_storage_str,ls_sc_str,ls_areastr
- String ls_id,ls_name,ls_pass,ls_dscrp,ls_cardno,ls_showdate
- Long ll_row,i,ll_findrow
- String arg_msg
- String ls_classeditstr,ls_classviewstr
- String ls_xls_printstr,ls_xls_sendstr
- String ls_spttypestr
- String ls_plugins_str
- String ls_reportstr
- String ls_accountstr
- string ls_outrepstr
- Int li_ifnotin = 0
- Int li_dlflag = 0
- Int li_ifphone = 0
- ls_id = Trim(sle_id.Text)
- IF ls_id = "" THEN
- MessageBox("提示","必须填写用户代码!", Information!, OK! )
- sle_id.SetFocus()
- RETURN
- END IF
- ls_name = Trim(sle_xm.Text)
- IF ls_name = "" THEN
- MessageBox("提示","必须填写用户姓名!", Information!, OK! )
- sle_xm.SetFocus()
- RETURN
- END IF
- ls_dscrp = Trim(sle_dscrp.Text)
- ls_cardno = Trim(sle_cardno.Text)
- CHOOSE CASE ddlb_dlflag.Text
- CASE '单口令'
- li_dlflag = 0
- CASE '单指纹'
- li_dlflag = 1
- CASE '口令+指纹'
- li_dlflag = 2
- END CHOOSE
- ls_str = wf_getright() //get the user-right string
- ls_areastr = wf_getarea() //get the user-area string
- IF sys_option_cusarea = 0 THEN ls_areastr = '0'
- IF cbx_ifnotin.Checked THEN li_ifnotin = 1
- IF cbx_ifphone.Checked THEN li_ifphone = 1
- ls_storage_str = wf_get_storage() //get the user-storage string
- ls_sc_str = wf_get_sc()//get the user-sc string
- ls_spttypestr = wf_get_spttype() //get the user-spttype string
- wf_get_class(ls_classeditstr,ls_classviewstr)
- wf_get_xlspowerstr(ls_xls_printstr,ls_xls_sendstr)
- wf_get_plugins(ls_plugins_str)
- wf_get_report(ls_reportstr)
- wf_get_account(ls_accountstr)
- wf_get_outrep(ls_outrepstr)
-
- IF uo_user.saveuser(modisign,sys_scid,ins_empid,ls_id,ls_name,&
- ls_cardno,ls_dscrp,ls_str,ls_storage_str,ls_sc_str,ls_areastr,&
- ls_classeditstr,ls_classviewstr,ls_xls_printstr,ls_xls_sendstr,&
- ls_spttypestr,ls_plugins_str,ls_reportstr,li_ifnotin,li_dlflag,&
- arg_msg,TRUE,ls_accountstr,ls_outrepstr,li_ifphone) = 0 THEN
- MessageBox(publ_operator,arg_msg)
- RETURN
- END IF
- dw_1.Retrieve(sys_scid)
- ll_findrow = dw_1.Find("empid="+String(ins_empid),1,dw_1.RowCount())
- IF ll_findrow > 0 THEN
- dw_1.SelectRow(0,FALSE)
- dw_1.SetRow(ll_findrow)
- dw_1.SelectRow(ll_findrow,TRUE)
- END IF
- MessageBox("提示",'用户资料已经成功更新!', Information!, OK! )
- modisign = FALSE
- dw_edit_mode = FALSE
- WF_LOCKFACE()
- end event
- event ue_undo();Long currentrow
- currentrow = dw_1.GetRow()
- IF currentrow >= 1 THEN
- sle_id.Text = dw_1.Object.u_user_userid[currentrow]
- sle_xm.Text = dw_1.Object.username[currentrow]
- sle_dscrp.Text = dw_1.Object.descrp[currentrow]
-
- WF_REFRESH()
- END IF
- dw_edit_mode = FALSE
- WF_LOCKFACE()
- modisign = FALSE
- end event
- event ue_edit();IF Trim(sle_id.Text) = sys_super_id THEN
- MessageBox("提示",'超级用户记录不能修改!', Information!, OK! )
- RETURN
- END IF
- IF dw_1.GetRow() <= 0 THEN
- MessageBox("提示",'没有修改对象!', Information!, OK! )
- RETURN
- END IF
- dw_edit_mode = TRUE
- modisign = TRUE
- wf_lockface()
- is_id = dw_1.Object.u_user_userid[dw_1.GetRow()]
- sle_id.SetFocus()
- end event
- event ue_select_allson();Long Handle
- IF tv_func_cur_handle > 0 THEN
- Handle = tv_func_cur_handle
- ELSE
- Handle = tab_1.tabpage_1.tv_2.FindItem(CurrentTreeItem!, 0)
- END IF
- IF Handle > 0 THEN
- wf_set_tvchild_son(Handle, 2)
- END IF
- RETURN
- end event
- event ue_select_allson_all();Long Handle
- IF tv_func_cur_handle > 0 THEN
- Handle = tv_func_cur_handle
- ELSE
- Handle = tab_1.tabpage_1.tv_2.FindItem(CurrentTreeItem!, 0)
- END IF
- IF Handle > 0 THEN
- wf_set_tvchild_son_all(Handle, 2)
- END IF
- RETURN
- end event
- public function integer wf_lockface ();//wf_lockface
- Int cnt,i,j
- tab_1.tabpage_3.cbx_inuse_storage.Enabled = Not dw_edit_mode
- IF dw_edit_mode THEN
- sle_id.DisplayOnly = False
- sle_xm.DisplayOnly = False
- sle_dscrp.DisplayOnly = False
- sle_cardno.DisplayOnly = False
- cbx_usecard.Enabled = True
- cb_add.Enabled = False
- cb_del.Enabled = False
- // cb_mod.Enabled = FALSE
- // cb_yes.Enabled = TRUE
- cb_undo.Enabled = True
- cb_superpsw.Enabled = False
- cbx_ifnotin.Enabled = True
- cbx_ifphone.Enabled = True
- IF modisign THEN
- cb_select_emp.Enabled = False
- ELSE
- cb_select_emp.Enabled = True
- END IF
-
- dw_2.SetTabOrder('choice',10)
- dw_3.SetTabOrder('choice',10)
- dw_4.SetTabOrder('allow_edit',20)
- dw_4.SetTabOrder('allow_view',10)
- dw_6.SetTabOrder('ch',10)
- dw_7.SetTabOrder('ch',10)
- dw_10.SetTabOrder('choice', 10)
-
- cb_paste.Enabled = True
- cb_copy.Enabled = False
- cb_other_func.Enabled = True
-
- cb_mod.Text = "保存"
- cb_mod.normalpicname = 'Save.bmp'
- ELSE
- cbx_usecard.Enabled = False
- sle_id.DisplayOnly = True
- sle_xm.DisplayOnly = True
- sle_cardno.DisplayOnly = cbx_usecard.Checked
- sle_dscrp.DisplayOnly = True
- cb_add.Enabled = True
- cb_del.Enabled = True
- // cb_mod.Enabled = TRUE
- // cb_yes.Enabled = FALSE
- cb_undo.Enabled = False
- cb_superpsw.Enabled = True
- cb_select_emp.Enabled = False
- cbx_ifnotin.Enabled = False
- cbx_ifphone.Enabled = False
- dw_2.SetTabOrder('choice',0)
- dw_3.SetTabOrder('choice',0)
- dw_4.SetTabOrder('allow_edit',0)
- dw_4.SetTabOrder('allow_view',0)
- dw_6.SetTabOrder('ch',0)
- dw_7.SetTabOrder('ch',0)
- dw_10.SetTabOrder('choice', 0)
- cb_paste.Enabled = False
- cb_copy.Enabled = True
- cb_other_func.Enabled = False
-
- cb_mod.Text = "修改"
- cb_mod.normalpicname = 'open.bmp'
- END IF
- cb_mod.of_init_draw()
- cb_mod.of_paint()
- cb_mod.TriggerEvent('ue_textchange')
- RETURN 0
- end function
- public function string wf_getright ();string ls_ret
- ls_ret=fill("0",5000)
- long ll_handl
- ll_handl = tv_func.finditem(RootTreeItem!,0)
- if ll_handl > 0 then wf_getright_tvchild(ll_handl,ls_ret)
- return ls_ret
- end function
- public subroutine wf_refresh ();//wf_refresh
- Long ll_row
- Long ll_storageid,ll_scid,ll_ClassID,ll_xls_templates_id,ll_spttypeid,ll_fileid
- Long i,li_no,cnt
- String ls_str,ls_storage_str,ls_scstr,ls_areastr, ls_outrepstr
- String ls_classedit_str,ls_classview_str,ls_xls_printstr,ls_xls_sendstr,ls_spttype_str
- String ls_plugins_str
- String ls_reportstr
- Long ll_reportid
- String ls_accountstr
- Long ll_accountsid
- String ls_outrepname
- ll_row = dw_1.GetRow()
- IF ll_row > 0 THEN
- IF is_id = sys_super_id THEN
- ls_str = Fill('1',5000)
- ls_storage_str = '0'
- ls_scstr = '0'
- ls_areastr = '0'
- ls_classedit_str = '0'
- ls_classview_str = '0'
- ls_xls_printstr = '0'
- ls_xls_sendstr = '0'
- ls_spttype_str = '0'
- ls_plugins_str = '0'
- ls_reportstr = '0'
- ls_accountstr = '0'
- ls_outrepstr = '0'
- ELSE
- SELECT rightstring,areastr,classeditstr,classviewstr,
- xls_printstr,xls_sendstr,spttypestr,pluginsstr ,
- reportstr,accountstr, outrepstr,storagestr,scstr
- INTO :ls_str,:ls_areastr,:ls_classedit_str,:ls_classview_str,
- :ls_xls_printstr,:ls_xls_sendstr,:ls_spttype_str,:ls_plugins_str,
- :ls_reportstr,:ls_accountstr, :ls_outrepstr,:ls_storage_str,:ls_scstr
- FROM u_user
- WHERE empid = :ins_empid
- AND scid = :sys_scid;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox('提示','查询复制对象信息失败!', Information!, OK! )
- RETURN
- END IF
- // if sqlca.sqlcode <> 0 or isnull(ls_str) then
- // ls_str = ''
- // end if
- // if sqlca.sqlcode <> 0 or isnull(ls_areastr) then
- // ls_areastr = ''
- // end if
- // ls_str=f_psw_zh(ls_str,1,sys_power_key) //解密
- // ls_storage_str = dw_1.Object.storagestr[ll_row]
- // ls_scstr = dw_1.Object.scstr[ll_row]
- END IF
- END IF
- //**storage_checkbox
- FOR i = 1 TO dw_2.RowCount()
- IF ls_storage_str = '0' THEN
- dw_2.Object.choice[i] = 1
- ELSE
- ll_storageid = dw_2.Object.storageid[i]
- IF Pos(ls_storage_str,','+String(ll_storageid)+',',1) > 0 THEN
- dw_2.Object.choice[i] = 1
- ELSE
- dw_2.Object.choice[i] = 0
- END IF
- END IF
- NEXT
- //**sc_checkbox
- FOR i = 1 TO dw_3.RowCount()
- IF ls_scstr = '0' THEN
- dw_3.Object.choice[i] = 1
- ELSE
- ll_scid = dw_3.Object.scid[i]
- IF Pos(ls_scstr,','+String(ll_scid)+',',1) > 0 THEN
- dw_3.Object.choice[i] = 1
- ELSE
- dw_3.Object.choice[i] = 0
- END IF
- END IF
- NEXT
- // //** classedit _checkbox
- FOR i = 1 TO dw_4.RowCount()
- IF ls_classedit_str = '0' THEN
- dw_4.Object.allow_edit[i] = 1
- ELSE
- ll_ClassID = dw_4.Object.classid[i]
- IF Pos(ls_classedit_str,','+String(ll_ClassID)+',',1) > 0 THEN
- dw_4.Object.allow_edit[i] = 1
- ELSE
- dw_4.Object.allow_edit[i] = 0
- END IF
- END IF
- NEXT
- //** classview _checkbox
- FOR i = 1 TO dw_4.RowCount()
- IF ls_classview_str = '0' THEN
- dw_4.Object.allow_view[i] = 1
- ELSE
- ll_ClassID = dw_4.Object.classid[i]
- IF Pos(ls_classview_str,','+String(ll_ClassID)+',',1) > 0 THEN
- dw_4.Object.allow_view[i] = 1
- ELSE
- dw_4.Object.allow_view[i] = 0
- END IF
- END IF
- NEXT
- //** xls_printstr _checkbox
- FOR i = 1 TO dw_5.RowCount()
- IF ls_xls_printstr = '0' THEN
- dw_5.Object.allow_print[i] = 1
- ELSE
- ll_xls_templates_id = dw_5.Object.u_xls_templates_id[i]
- IF Pos(ls_xls_printstr,','+String(ll_xls_templates_id)+',',1) > 0 THEN
- dw_5.Object.allow_print[i] = 1
- ELSE
- dw_5.Object.allow_print[i] = 0
- END IF
- END IF
- NEXT
- //** xls_sendstr _checkbox
- FOR i = 1 TO dw_5.RowCount()
- IF ls_xls_sendstr = '0' THEN
- dw_5.Object.allow_send[i] = 1
- ELSE
- ll_xls_templates_id = dw_5.Object.u_xls_templates_id[i]
- IF Pos(ls_xls_sendstr,','+String(ll_xls_templates_id)+',',1) > 0 THEN
- dw_5.Object.allow_send[i] = 1
- ELSE
- dw_5.Object.allow_send[i] = 0
- END IF
- END IF
- NEXT
- //** ls_spttype_str _checkbox
- FOR i = 1 TO dw_6.RowCount()
- IF ls_spttype_str = '0' THEN
- dw_6.Object.ch[i] = 1
- ELSE
- ll_spttypeid = dw_6.Object.spttypeid[i]
- IF Pos(ls_spttype_str,','+String(ll_spttypeid)+',',1) > 0 THEN
- dw_6.Object.ch[i] = 1
- ELSE
- dw_6.Object.ch[i] = 0
- END IF
- END IF
- NEXT
- //** plugins_str _checkbox
- FOR i = 1 TO dw_7.RowCount()
- IF ls_plugins_str = '0' THEN
- dw_7.Object.ch[i] = 1
- ELSE
- ll_fileid = dw_7.Object.fileid[i]
- IF Pos(ls_plugins_str,','+String(ll_fileid)+',',1) > 0 THEN
- dw_7.Object.ch[i] = 1
- ELSE
- dw_7.Object.ch[i] = 0
- END IF
- END IF
- NEXT
- //自定义报表
- dw_8.SetRedraw(FALSE)
- FOR i = 1 TO dw_8.RowCount()
- IF ls_reportstr = '0' THEN
- dw_8.Object.ch[i] = 1
- ELSE
- ll_reportid = dw_8.Object.reportid[i]
- IF Pos(ls_reportstr,','+String(ll_reportid)+',',1) > 0 THEN
- dw_8.Object.ch[i] = 1
- ELSE
- dw_8.Object.ch[i] = 0
- END IF
- END IF
- NEXT
- dw_8.SetRedraw(TRUE)
- dw_9.SetRedraw(FALSE)
- FOR i = 1 TO dw_9.RowCount()
- IF ls_accountstr = '0' THEN
- dw_9.Object.ch[i] = 1
- ELSE
- ll_accountsid = dw_9.Object.accountsid[i]
- IF Pos(ls_accountstr,','+String(ll_accountsid)+',',1) > 0 THEN
- dw_9.Object.ch[i] = 1
- ELSE
- dw_9.Object.ch[i] = 0
- END IF
- END IF
- NEXT
- dw_9.SetRedraw(TRUE)
- dw_10.SetRedraw(FALSE)
- FOR i = 1 TO dw_10.RowCount()
- IF ls_outrepstr = '0' THEN
- dw_10.Object.choice[i] = 1
- ELSE
- ls_outrepname = dw_10.Object.outrepname[i]
- IF Pos(ls_outrepstr,','+String(ls_outrepname)+',',1) > 0 THEN
- dw_10.Object.choice[i] = 1
- ELSE
- dw_10.Object.choice[i] = 0
- END IF
- END IF
- NEXT
- dw_10.SetRedraw(TRUE)
- //**tv_checkbox
- //if ls_str = '' then return
- Long ll_handl
- ll_handl = tv_func.FindItem(RootTreeItem!,0)
- IF ll_handl > 0 THEN wf_refresh_tvchild(ll_handl,ls_str)
- //**tv_checkbox
- //if ls_areastr = '' then return
- Long ll_handl_area
- ll_handl_area = tv_cusarea.FindItem(RootTreeItem!,0)
- IF ll_handl_area > 0 THEN wf_refresh_tvchild_area(ll_handl_area,ls_areastr)
- RETURN
- end subroutine
- public subroutine wf_copyright ();Long ll_row
- String ls_str,ls_storage_str,ls_scstr,ls_areastr, ls_outrepstr
- String ls_classedit_str,ls_classview_str,ls_xls_printstr,ls_xls_sendstr,ls_spttype_str
- String ls_plugins_str
- String ls_reportstr
- String ls_accountstr
- String ls_outrepname
- ll_row = dw_1.GetRow()
- IF ll_row <= 0 THEN
- MessageBox('提示','没有复制对象!', Information!, OK! )
- RETURN
- END IF
- Open(w_user_copyright_ch)
- s_user_copy = Message.PowerObjectParm
- IF s_user_copy.copyflag = 0 THEN RETURN
- IF is_id = sys_super_id THEN
- ls_str = Fill('1',5000)
- ls_storage_str = '0'
- ls_scstr = '0'
- ls_areastr = '0'
- ls_classedit_str = '0'
- ls_classview_str = '0'
- ls_xls_printstr = '0'
- ls_xls_sendstr = '0'
- ls_spttype_str = '0'
- ls_plugins_str = '0'
- ls_reportstr = '0'
- ls_accountstr = '0'
- ls_outrepstr = '0'
- ELSE
- SELECT rightstring,areastr,classeditstr,classviewstr,
- xls_printstr,xls_sendstr,spttypestr,pluginsstr ,
- reportstr,accountstr, outrepstr,storagestr,scstr
- INTO :ls_str,:ls_areastr,:ls_classedit_str,:ls_classview_str,
- :ls_xls_printstr,:ls_xls_sendstr,:ls_spttype_str,:ls_plugins_str,
- :ls_reportstr,:ls_accountstr, :ls_outrepstr, :ls_storage_str, :ls_scstr
- FROM u_user
- WHERE empid = :ins_empid
- AND scid = :sys_scid;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox('提示','查询复制对象信息失败!', Information!, OK! )
- RETURN
- END IF
- END IF
- s_user_copy.rightstring = ls_str
- s_user_copy.areastr = ls_areastr
- s_user_copy.scstr = ls_scstr
- s_user_copy.storagestr = ls_storage_str
- s_user_copy.spttypestr = ls_spttype_str
- s_user_copy.classeditstr = ls_classedit_str
- s_user_copy.classviewstr = ls_classview_str
- s_user_copy.pluginsstr = ls_plugins_str
- s_user_copy.xls_printstr = ls_xls_printstr
- s_user_copy.xls_sendstr = ls_xls_sendstr
- s_user_copy.reportstr = ls_reportstr
- s_user_copy.accountstr = ls_accountstr
- s_user_copy.outrepstr = ls_outrepstr
- MessageBox('提示','复制用户:'+String(dw_1.Object.username[dw_1.GetRow()])+'的权限成功', Information!, OK! )
- ////wf_copyright
- //Long ll_row
- //ll_row = dw_1.GetRow()
- //IF ll_row <= 0 THEN
- // MessageBox('提示','没有复制对象!', Information!, OK! )
- // RETURN
- //END IF
- //
- //IF ll_row > 0 THEN
- // IF is_id = sys_super_id THEN
- // copy_rightstring = Fill('1',2000)
- // ELSE
- // SELECT rightstring INTO :copy_rightstring
- // FROM u_user
- // WHERE empid = :ins_empid
- // AND scid = :sys_scid;
- // IF sqlca.SQLCode <> 0 OR IsNull(copy_rightstring) THEN
- // copy_rightstring = ''
- // END IF
- // // copy_rightstring=copy_rightstring,1,sys_power_key) //解密
- // END IF
- //END IF
- //
- //MessageBox('提示','复制用户:'+String(dw_1.Object.username[dw_1.GetRow()])+'的权限成功', Information!, OK! )
- end subroutine
- public subroutine wf_pasteright ();IF s_user_copy.copyflag = 0 THEN
- MessageBox("提示",'没有可粘贴的权限,请先复制权限', Information!, OK! )
- RETURN
- END IF
- Long i
- Long ll_storageid
- Long ll_scid
- Long ll_ClassID
- Long ll_xls_templates_id
- Long ll_spttypeid
- Long ll_fileid
- Long ll_reportid
- Long ll_accountsid
- String ls_outrepname
- //**storage_checkbox
- IF s_user_copy.storage_flag = 1 THEN
- FOR i = 1 TO dw_2.RowCount()
- IF s_user_copy.storagestr = '0' THEN
- dw_2.Object.choice[i] = 1
- ELSE
- ll_storageid = dw_2.Object.storageid[i]
- IF Pos(s_user_copy.storagestr,','+String(ll_storageid)+',',1) > 0 THEN
- dw_2.Object.choice[i] = 1
- ELSE
- dw_2.Object.choice[i] = 0
- END IF
- END IF
- NEXT
- END IF
- //**sc_checkbox
- IF s_user_copy.sc_flag = 1 THEN
- FOR i = 1 TO dw_3.RowCount()
- IF s_user_copy.scstr = '0' THEN
- dw_3.Object.choice[i] = 1
- ELSE
- ll_scid = dw_3.Object.scid[i]
- IF Pos(s_user_copy.scstr,','+String(ll_scid)+',',1) > 0 THEN
- dw_3.Object.choice[i] = 1
- ELSE
- dw_3.Object.choice[i] = 0
- END IF
- END IF
- NEXT
- END IF
- // //** classedit _checkbox
- IF s_user_copy.classedit_flag = 1 THEN
- FOR i = 1 TO dw_4.RowCount()
- IF s_user_copy.classeditstr = '0' THEN
- dw_4.Object.allow_edit[i] = 1
- ELSE
- ll_ClassID = dw_4.Object.classid[i]
- IF Pos(s_user_copy.classeditstr,','+String(ll_ClassID)+',',1) > 0 THEN
- dw_4.Object.allow_edit[i] = 1
- ELSE
- dw_4.Object.allow_edit[i] = 0
- END IF
- END IF
- NEXT
- END IF
- //** classview _checkbox
- IF s_user_copy.classview_flag = 1 THEN
- FOR i = 1 TO dw_4.RowCount()
- IF s_user_copy.classviewstr = '0' THEN
- dw_4.Object.allow_view[i] = 1
- ELSE
- ll_ClassID = dw_4.Object.classid[i]
- IF Pos(s_user_copy.classviewstr,','+String(ll_ClassID)+',',1) > 0 THEN
- dw_4.Object.allow_view[i] = 1
- ELSE
- dw_4.Object.allow_view[i] = 0
- END IF
- END IF
- NEXT
- END IF
- //** xls_printstr _checkbox
- IF s_user_copy.xls_print_flag = 1 THEN
- FOR i = 1 TO dw_5.RowCount()
- IF s_user_copy.xls_printstr = '0' THEN
- dw_5.Object.allow_print[i] = 1
- ELSE
- ll_xls_templates_id = dw_5.Object.u_xls_templates_id[i]
- IF Pos(s_user_copy.xls_printstr,','+String(ll_xls_templates_id)+',',1) > 0 THEN
- dw_5.Object.allow_print[i] = 1
- ELSE
- dw_5.Object.allow_print[i] = 0
- END IF
- END IF
- NEXT
- END IF
- //** xls_sendstr _checkbox
- IF s_user_copy.xls_send_flag = 1 THEN
- FOR i = 1 TO dw_5.RowCount()
- IF s_user_copy.xls_sendstr = '0' THEN
- dw_5.Object.allow_send[i] = 1
- ELSE
- ll_xls_templates_id = dw_5.Object.u_xls_templates_id[i]
- IF Pos(s_user_copy.xls_sendstr,','+String(ll_xls_templates_id)+',',1) > 0 THEN
- dw_5.Object.allow_send[i] = 1
- ELSE
- dw_5.Object.allow_send[i] = 0
- END IF
- END IF
- NEXT
- END IF
- //** s_user_copy.spttypestr _checkbox
- IF s_user_copy.spttype_flag = 1 THEN
- FOR i = 1 TO dw_6.RowCount()
- IF s_user_copy.spttypestr = '0' THEN
- dw_6.Object.ch[i] = 1
- ELSE
- ll_spttypeid = dw_6.Object.spttypeid[i]
- IF Pos(s_user_copy.spttypestr,','+String(ll_spttypeid)+',',1) > 0 THEN
- dw_6.Object.ch[i] = 1
- ELSE
- dw_6.Object.ch[i] = 0
- END IF
- END IF
- NEXT
- END IF
- //** plugins_str _checkbox
- IF s_user_copy.plugins_flag = 1 THEN
- FOR i = 1 TO dw_7.RowCount()
- IF s_user_copy.pluginsstr = '0' THEN
- dw_7.Object.ch[i] = 1
- ELSE
- ll_fileid = dw_7.Object.fileid[i]
- IF Pos(s_user_copy.pluginsstr,','+String(ll_fileid)+',',1) > 0 THEN
- dw_7.Object.ch[i] = 1
- ELSE
- dw_7.Object.ch[i] = 0
- END IF
- END IF
- NEXT
- END IF
- //自定义报表
- IF s_user_copy.report_flag = 1 THEN
- dw_8.SetRedraw(FALSE)
- FOR i = 1 TO dw_8.RowCount()
- IF s_user_copy.reportstr = '0' THEN
- dw_8.Object.ch[i] = 1
- ELSE
- ll_reportid = dw_8.Object.reportid[i]
- IF Pos(s_user_copy.reportstr,','+String(ll_reportid)+',',1) > 0 THEN
- dw_8.Object.ch[i] = 1
- ELSE
- dw_8.Object.ch[i] = 0
- END IF
- END IF
- NEXT
- dw_8.SetRedraw(TRUE)
- END IF
- IF s_user_copy.account_flag = 1 THEN
- dw_9.SetRedraw(FALSE)
- FOR i = 1 TO dw_9.RowCount()
- IF s_user_copy.accountstr = '0' THEN
- dw_9.Object.ch[i] = 1
- ELSE
- ll_accountsid = dw_9.Object.accountsid[i]
- IF Pos(s_user_copy.accountstr,','+String(ll_accountsid)+',',1) > 0 THEN
- dw_9.Object.ch[i] = 1
- ELSE
- dw_9.Object.ch[i] = 0
- END IF
- END IF
- NEXT
- dw_9.SetRedraw(TRUE)
- END IF
- IF s_user_copy.outrep_flag = 1 THEN
- dw_10.SetRedraw(FALSE)
- FOR i = 1 TO dw_10.RowCount()
- IF s_user_copy.outrepstr = '0' THEN
- dw_10.Object.choice[i] = 1
- ELSE
- ls_outrepname = dw_10.Object.outrepname[i]
- IF Pos(s_user_copy.outrepstr,','+String(ls_outrepname)+',',1) > 0 THEN
- dw_10.Object.choice[i] = 1
- ELSE
- dw_10.Object.choice[i] = 0
- END IF
- END IF
- NEXT
- dw_10.SetRedraw(TRUE)
- END IF
- //**tv_checkbox
- IF s_user_copy.right_flag = 1 THEN
- Long ll_handl
- ll_handl = tv_func.FindItem(RootTreeItem!,0)
- IF ll_handl > 0 THEN wf_refresh_tvchild(ll_handl,s_user_copy.rightstring)
- END IF
- //**tv_checkbox
- IF s_user_copy.area_flag = 1 THEN
- Long ll_handl_area
- ll_handl_area = tv_cusarea.FindItem(RootTreeItem!,0)
- IF ll_handl_area > 0 THEN wf_refresh_tvchild_area(ll_handl_area,s_user_copy.areastr)
- END IF
- ////wf_pasteright()
- //
- //IF copy_rightstring = '' THEN
- // MessageBox("提示",'没有可粘贴的权限,请先复制权限', Information!, OK! )
- // RETURN
- //END IF
- //
- //Long ll_handl
- //ll_handl = tv_func.FindItem(RootTreeItem!,0)
- //IF ll_handl > 0 THEN wf_refresh_tvchild(ll_handl,copy_rightstring)
- //RETURN
- end subroutine
- public function string wf_get_storage ();String ls_ret = ''
- Long cnt,i,choicecnt = 0
- cnt = dw_2.RowCount()
- FOR i = 1 TO cnt
- IF dw_2.Object.choice[i] = 1 THEN
- choicecnt++
- ls_ret = ls_ret+','+String(dw_2.Object.storageid[i])
- END IF
- NEXT
- IF choicecnt = cnt THEN
- ls_ret = '0' //全部
- ELSEIF choicecnt <> cnt AND choicecnt > 0 THEN
- ls_ret = ls_ret + ','
- ELSEIF choicecnt = 0 THEN
- ls_ret = '-1' //无
- END IF
- RETURN ls_ret
- end function
- public function string wf_get_sc ();String ls_ret = ''
- Long cnt,i,choicecnt = 0
- cnt = dw_3.RowCount()
- FOR i = 1 TO cnt
- IF dw_3.Object.choice[i] = 1 THEN
- choicecnt++
- ls_ret = ls_ret+','+String(dw_3.Object.scid[i])
- END IF
- NEXT
- IF choicecnt = cnt THEN
- ls_ret = '0' //全部
- ELSEIF choicecnt <> cnt AND choicecnt > 0 THEN
- ls_ret = ls_ret + ','
- ELSEIF choicecnt = 0 THEN
- ls_ret = '-1' //无
- END IF
- RETURN ls_ret
- end function
- public function integer wf_build_functree ();//====================================================================
- // Function: wf_build_functree()
- //--------------------------------------------------------------------
- // Description:
- //--------------------------------------------------------------------
- // Arguments:(None)
- //--------------------------------------------------------------------
- // Returns: integer
- //--------------------------------------------------------------------
- // Author: yyx Date: 2004.11.16
- //--------------------------------------------------------------------
- // Modify History:
- //
- //====================================================================
- Long hand
- deep = 1
- Long tvi_hdl = 0
- DO UNTIL tv_func.FindItem(roottreeitem!, 0) = -1
- tv_func.DeleteItem(tvi_hdl)
- LOOP
- hand = tv_func.InsertItemLast(0,sys_message_title,1)
- pf_treegrowth(hand,0,2)
- //tv_func.ExpandItem(hand)
- tv_func.ExpandItem(1)
- RETURN 1
- end function
- public function integer pf_treegrowth (long arg_handl, long arg_funcid, integer arg_lp);//====================================================================
- // function: pf_treegrowth()
- //--------------------------------------------------------------------
- // description:
- //--------------------------------------------------------------------
- // arguments:
- // value long arg_handl
- // value long arg_funcid
- // value integer arg_lp
- //--------------------------------------------------------------------
- // returns: integer
- //--------------------------------------------------------------------
- // author: yyx date: 2004.11.16
- //--------------------------------------------------------------------
- // modify history:
- //
- //====================================================================
- Int rslt = 1
- s_sys_func ls_s_func[]
- Long count = 0,ls_i
- Long handl
- Long ll_funcid
- String ls_funcid_str
- treeviewitem tvi
- deep++
- IF deep > 4000 THEN //防止死递归
- RETURN 0
- END IF
- String ls_filter
- //Long ll_p_functype
- //String ls_p_name
- //
- //IF arg_funcid = 0 THEN
- // ll_p_functype = 0
- // ls_p_name = ''
- //ELSE
- // ls_filter = ' funcid= '+String(arg_funcid)
- // sys_ds_userinfo.SetFilter(ls_filter)
- // sys_ds_userinfo.Filter()
- // IF sys_ds_userinfo.RowCount() >= 1 THEN
- // ll_p_functype = sys_ds_userinfo.Object.functype[1]
- // ls_p_name = sys_ds_userinfo.Object.treename[1]
- // END IF
- //END IF
- IF sys_if_network = 1 THEN
- ls_filter = ' parentid= '+String(arg_funcid) + ' and worktype <> 1 '
- ELSE
- ls_filter = ' parentid= '+String(arg_funcid) + ' and worktype <> 2 '
- END IF
- IF sys_version_type = 0 THEN
- ls_filter = ls_filter + 'and ( Versiontype = 0 or Versiontype = -1 )'
- ELSEIF sys_version_type = 1 THEN
- ls_filter = ls_filter + 'and ( Versiontype = 1 or Versiontype = -1 )'
- ELSEIF sys_version_type = 2 THEN
- ls_filter = ls_filter + 'and ( Versiontype = 0 or Versiontype = -1 or Versiontype = 2 )'
- END IF
- sys_ds_userinfo.SetFilter(ls_filter)
- sys_ds_userinfo.Filter()
- sys_ds_userinfo.SetSort('sortflag')
- sys_ds_userinfo.Sort()
- ls_funcid_str = ",521,1495,522,1574,1585," // 特殊权限,不做解决方案考虑
- FOR ls_i = 1 To sys_ds_userinfo.RowCount( )
- IF sys_ds_userinfo.Object.if_use[ls_i] = 0 THEN CONTINUE
- IF sys_ds_userinfo.Object.parentid[ls_i] = arg_funcid THEN
-
- ll_funcid = sys_ds_userinfo.Object.funcid[ls_i]
- IF sys_ds_userinfo.Object.functype[ls_i] < 9 THEN
- IF Not Pos(ls_funcid_str,","+String(ll_funcid)+",") > 0 THEN
- IF Mid(sys_pwrstr,ll_funcid,1) <> '1' THEN
- CONTINUE
- END IF
- END IF
- END IF
-
- //
-
- count++
- ls_s_func[count].funcid = ll_funcid //sys_ds_userinfo.Object.funcid[ls_i]
- ls_s_func[count].treename = sys_ds_userinfo.Object.treename[ls_i]
- ls_s_func[count].MenuName = sys_ds_userinfo.Object.MenuName[ls_i]
- ls_s_func[count].parentid = sys_ds_userinfo.Object.parentid[ls_i]
- ls_s_func[count].sortflag = sys_ds_userinfo.Object.sortflag[ls_i]
- ls_s_func[count].functype = sys_ds_userinfo.Object.functype[ls_i]
- ls_s_func[count].mainid = sys_ds_userinfo.Object.mainid[ls_i]
- ls_s_func[count].if_use = sys_ds_userinfo.Object.if_use[ls_i]
- END IF
- NEXT
- FOR ls_i = 1 To count
- IF ls_s_func[ls_i].functype = 0 THEN
- arg_lp = 2
- ELSEIF ls_s_func[ls_i].functype = 8 THEN
- arg_lp = 3
- ELSEIF ls_s_func[ls_i].functype = 9 THEN
- arg_lp = 4
- END IF
-
- handl = tv_func.InsertItemLast(arg_handl,ls_s_func[ls_i].treename,arg_lp) //生成树
-
- // tv_func.ExpandItem(arg_handl)
- tv_func.GetItem(handl,tvi)
- tvi.StatePictureIndex = 2
- tvi.Data = ls_s_func[ls_i].funcid
- tv_func.SetItem(handl,tvi)
-
- pf_treegrowth(handl,ls_s_func[ls_i].funcid,arg_lp+1) //下级生成树
- NEXT
- //IF ll_p_functype = 0 Or ll_p_functype = 1 THEN
- IF cbx_tree.Checked THEN
- tv_func.ExpandItem(arg_handl)
- END IF
- //ELSE
- // tv_func.CollapseItem(arg_handl)
- //END IF
- RETURN rslt
- end function
- public subroutine wf_refresh_tvchild (long arg_handl, string arg_rightstr);long ll_handl
- long ll_funcid
- treeviewitem tvi
- ll_handl = arg_handl
- ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
- do while ll_handl > 0
- tv_func.getitem(ll_handl,tvi)
- ll_funcid = tvi.data
- // messagebox("0",ll_funcid)
- if not ll_funcid = 0 then
- if mid(arg_rightstr,ll_funcid,1)='0' then
- tvi.statepictureindex = 1
- else
- tvi.statepictureindex = 2
- end if
- end if
- tv_func.setitem(ll_handl,tvi)
-
- wf_refresh_tvnext(ll_handl,arg_rightstr)
- ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
- loop
- end subroutine
- public subroutine wf_refresh_tvnext (long arg_handl, string arg_rightstr);long ll_handl
- long ll_funcid
- treeviewitem tvi
- ll_handl = arg_handl
- ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
- do while ll_handl > 0
- tv_func.getitem(ll_handl,tvi)
- ll_funcid = tvi.data
- // messagebox("1",ll_funcid)
- if not ll_funcid = 0 then
- if mid(arg_rightstr,ll_funcid,1)='1' then
- tvi.statepictureindex = 2
- else
- tvi.statepictureindex = 1
- end if
- end if
- tv_func.setitem(ll_handl,tvi)
-
- wf_refresh_tvchild(ll_handl,arg_rightstr)
- ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
- loop
- end subroutine
- public subroutine wf_getright_tvchild (long arg_handl, ref string arg_rightstr);long ll_handl
- long ll_funcid
- treeviewitem tvi
- ll_handl = arg_handl
- ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
- do while ll_handl > 0
- tv_func.getitem(ll_handl,tvi)
- ll_funcid = tvi.data
- // messagebox("0",ll_funcid)
- if not ll_funcid = 0 then
- if tvi.statepictureindex = 2 then
- arg_rightstr=replace(arg_rightstr,ll_funcid,1,"1")
- end if
- end if
-
- wf_getright_tvnext(ll_handl,arg_rightstr)
- ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
- loop
- end subroutine
- public subroutine wf_getright_tvnext (long arg_handl, ref string arg_rightstr);long ll_handl
- long ll_funcid
- treeviewitem tvi
- ll_handl = arg_handl
- ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
- do while ll_handl > 0
- tv_func.getitem(ll_handl,tvi)
- ll_funcid = tvi.data
- // messagebox("1",ll_funcid)
- if not ll_funcid = 0 then
- if tvi.statepictureindex = 2 then
- arg_rightstr=replace(arg_rightstr,ll_funcid,1,"1")
- end if
- end if
- // tv_func.setitem(ll_handl,tvi)
-
- wf_getright_tvchild(ll_handl,arg_rightstr)
- ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
- loop
- end subroutine
- public subroutine wf_set_tvparent (long arg_handl);//====================================================================
- // Function: wf_find_parenttree()
- //--------------------------------------------------------------------
- // Description:
- //--------------------------------------------------------------------
- // Arguments:
- // value long arg_handl
- // value long arg_state
- //--------------------------------------------------------------------
- // Returns: (none)
- //--------------------------------------------------------------------
- // Author: yyx Date: 2004.11.18
- //--------------------------------------------------------------------
- // Modify History:
- //
- //====================================================================
- long ll_handl
- treeviewitem tvi
- ll_handl = arg_handl
- tv_func.getitem(ll_handl,tvi)
- tvi.StatePictureIndex = 2
- tv_func.setitem(ll_handl,tvi)
- ll_handl = tv_func.finditem(ParentTreeItem!,ll_handl)
- do while ll_handl > 0
- tv_func.getitem(ll_handl,tvi)
- tvi.StatePictureIndex = 2
- tv_func.setitem(ll_handl,tvi)
- ll_handl = tv_func.finditem(ParentTreeItem!,ll_handl)
- loop
- end subroutine
- public subroutine wf_set_tvchild (long arg_handl);//====================================================================
- // Function: wf_find_childtree()
- //--------------------------------------------------------------------
- // Description:
- //--------------------------------------------------------------------
- // Arguments:
- // value long arg_handl
- // value long arg_state
- //--------------------------------------------------------------------
- // Returns: integer
- //--------------------------------------------------------------------
- // Author: yyx Date: 2004.11.18
- //--------------------------------------------------------------------
- // Modify History:
- //
- //====================================================================
- long ll_handl
- treeviewitem tvi
- ll_handl = arg_handl
- tv_func.getitem(ll_handl,tvi)
- tvi.StatePictureIndex = 1
- tv_func.setitem(ll_handl,tvi)
- ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
- do while ll_handl > 0
- wf_set_tvnext(ll_handl)
- ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
- loop
- end subroutine
- public subroutine wf_set_tvnext (long arg_handl);//====================================================================
- // Function: wf_find_childtree()
- //--------------------------------------------------------------------
- // Description:
- //--------------------------------------------------------------------
- // Arguments:
- // value long arg_handl
- // value long arg_state
- //--------------------------------------------------------------------
- // Returns: integer
- //--------------------------------------------------------------------
- // Author: yyx Date: 2004.11.18
- //--------------------------------------------------------------------
- // Modify History:
- //
- //====================================================================
- long ll_handl
- treeviewitem tvi
- ll_handl = arg_handl
- tv_func.getitem(ll_handl,tvi)
- tvi.StatePictureIndex = 1
- tv_func.setitem(ll_handl,tvi)
- ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
- do while ll_handl > 0
- wf_set_tvchild(ll_handl)
- ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
- loop
- end subroutine
- public subroutine wf_clear_tvnext (long arg_handl);long ll_handl
- treeviewitem tvi
- ll_handl = arg_handl
- ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
- do while ll_handl > 0
- tv_func.getitem(ll_handl,tvi)
- tvi.statepictureindex = 1
- tv_func.setitem(ll_handl,tvi)
-
- wf_clear_tvchild(ll_handl)
- ll_handl = tv_func.finditem(NextTreeItem!,ll_handl)
- loop
- end subroutine
- public subroutine wf_clear_tvchild (long arg_handl);long ll_handl
- treeviewitem tvi
- ll_handl = arg_handl
- ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
- do while ll_handl > 0
- tv_func.getitem(ll_handl,tvi)
- tvi.statepictureindex = 1
- tv_func.setitem(ll_handl,tvi)
-
- wf_clear_tvnext(ll_handl)
- ll_handl = tv_func.finditem(ChildTreeItem!,ll_handl)
- loop
- end subroutine
- public function integer wf_build_areatree ();//====================================================================
- // Function: wf_build_functree()
- //--------------------------------------------------------------------
- // Description:
- //--------------------------------------------------------------------
- // Arguments:(None)
- //--------------------------------------------------------------------
- // Returns: integer
- //--------------------------------------------------------------------
- // Author: yyx Date: 2004.11.16
- //--------------------------------------------------------------------
- // Modify History:
- //
- //====================================================================
- Long hand
- deep = 1
- Long tvi_hdl = 0
- DO UNTIL tv_cusarea.FindItem(roottreeitem!, 0) = -1
- tv_cusarea.DeleteItem(tvi_hdl)
- LOOP
- hand = tv_cusarea.InsertItemLast(0,'全部地区',1)
- pf_treegrowth_area(hand,0,2)
- //tv_cusarea.expanditem(hand)
- RETURN 1
- end function
- public function integer pf_treegrowth_area (long arg_handl, long arg_parentid, integer arg_lp);//====================================================================
- // Function: pf_treegrowth()
- //--------------------------------------------------------------------
- // Description:
- //--------------------------------------------------------------------
- // Arguments:
- // long arg_handl
- // long arg_parentid
- //--------------------------------------------------------------------
- // Returns: integer
- //--------------------------------------------------------------------
- // Author: yyx Date: 2005.01.28
- //--------------------------------------------------------------------
- // Modify History:
- //
- //====================================================================
- Long rslt = 1
- Long ll_CusareaID,ll_count = 0,ll_i
- String ls_Cusareaname,ls_areaname
- Int li_sonflag
- s_cusarea l_s_pfmx[]
- Long li_handl
- TreeViewItem l_tvi
- deep_area++
- IF deep_area > 4000 THEN //防止死递归
- RETURN 0
- END IF
- DECLARE pf_cur CURSOR FOR
- SELECT u_Cusarea.CusareaID,
- u_Cusarea.Cusareaname,
- u_Cusarea.sonflag
- FROM u_Cusarea
- Where ( u_Cusarea.parentid = :arg_parentid );
- OPEN pf_cur;
- ll_count = 1
- FETCH pf_cur Into :l_s_pfmx[ll_count].CusareaID,:l_s_pfmx[ll_count].Cusareaname,:l_s_pfmx[ll_count].sonflag;
- DO WHILE sqlca.SQLCode = 0
- ll_count++
- FETCH pf_cur Into :l_s_pfmx[ll_count].CusareaID,:l_s_pfmx[ll_count].Cusareaname,:l_s_pfmx[ll_count].sonflag;
- LOOP
- ll_count = ll_count - 1
- CLOSE pf_cur;
- FOR ll_i = 1 To ll_count
- IF l_s_pfmx[ll_i].sonflag = 0 THEN
- arg_lp = 2
- ELSE
- arg_lp = 3
- END IF
-
- li_handl = tv_cusarea.InsertItemSort(arg_handl,l_s_pfmx[ll_i].Cusareaname,arg_lp)
-
- IF tv_cusarea.GetItem ( li_handl, l_tvi) = 1 THEN
- l_tvi.Label = l_s_pfmx[ll_i].Cusareaname
- l_tvi.Data = l_s_pfmx[ll_i].CusareaID
- tv_cusarea.SetItem( li_handl, l_tvi )
- END IF
-
- pf_treegrowth_area(li_handl,l_s_pfmx[ll_i].CusareaID,arg_lp)
- NEXT
- tv_cusarea.ExpandItem(arg_handl)
- RETURN 1
- end function
- public subroutine wf_refresh_tvchild_area (long arg_handl, string arg_areastr);long ll_handl
- long ll_cusareaid
- treeviewitem tvi
- ll_handl = arg_handl
- ll_handl = tv_cusarea.finditem(ChildTreeItem!,ll_handl)
- do while ll_handl > 0
- tv_cusarea.getitem(ll_handl,tvi)
- ll_cusareaid = tvi.data
- if not ll_cusareaid = 0 then
- if pos(arg_areastr,','+string(ll_cusareaid)+',') > 0 or arg_areastr = '0' then
- tvi.statepictureindex = 2
- else
- tvi.statepictureindex = 1
- end if
- end if
- tv_cusarea.setitem(ll_handl,tvi)
-
- wf_refresh_tvnext_area(ll_handl,arg_areastr)
- ll_handl = tv_cusarea.finditem(ChildTreeItem!,ll_handl)
- loop
- end subroutine
- public subroutine wf_refresh_tvnext_area (long arg_handl, string arg_areastr);long ll_handl
- long ll_cusareaid
- treeviewitem tvi
- ll_handl = arg_handl
- ll_handl = tv_cusarea.finditem(NextTreeItem!,ll_handl)
- do while ll_handl > 0
- tv_cusarea.getitem(ll_handl,tvi)
- ll_cusareaid = tvi.data
- if not ll_cusareaid = 0 then
- if pos(arg_areastr,','+string(ll_cusareaid)+',')> 0 or arg_areastr = '0' then
- tvi.statepictureindex = 2
- else
- tvi.statepictureindex = 1
- end if
- end if
- tv_cusarea.setitem(ll_handl,tvi)
-
- wf_refresh_tvchild_area(ll_handl,arg_areastr)
- ll_handl = tv_cusarea.finditem(NextTreeItem!,ll_handl)
- loop
- end subroutine
- public subroutine wf_getarea_tvchild (long arg_handl, ref string arg_areastr);long ll_handl
- long ll_cusareaid
- treeviewitem tvi
- ll_handl = arg_handl
- ll_handl = tv_cusarea.finditem(ChildTreeItem!,ll_handl)
- do while ll_handl > 0
- tv_cusarea.getitem(ll_handl,tvi)
- ll_cusareaid = tvi.data
- if not ll_cusareaid = 0 then
- if tvi.statepictureindex = 2 then
- if len(arg_areastr) = 0 then
- arg_areastr =arg_areastr + ','+string(ll_cusareaid) + ','
- else
- arg_areastr =arg_areastr + string(ll_cusareaid) + ','
- end if
- end if
- end if
-
- wf_getarea_tvnext(ll_handl,arg_areastr)
- ll_handl = tv_cusarea.finditem(ChildTreeItem!,ll_handl)
- loop
- end subroutine
- public subroutine wf_getarea_tvnext (long arg_handl, ref string arg_areastr);long ll_handl
- long ll_cusareaid
- treeviewitem tvi
- ll_handl = arg_handl
- ll_handl = tv_cusarea.finditem(NextTreeItem!,ll_handl)
- do while ll_handl > 0
- tv_cusarea.getitem(ll_handl,tvi)
- ll_cusareaid = tvi.data
- if not ll_cusareaid = 0 then
- if tvi.statepictureindex = 2 then
- if len(arg_areastr) = 0 then
- arg_areastr =arg_areastr + ','+string(ll_cusareaid) + ','
- else
- arg_areastr =arg_areastr + string(ll_cusareaid) + ','
- end if
- end if
- end if
- tv_cusarea.setitem(ll_handl,tvi)
-
- wf_getarea_tvchild(ll_handl,arg_areastr)
- ll_handl = tv_cusarea.finditem(NextTreeItem!,ll_handl)
- loop
- end subroutine
- public function string wf_getarea ();string ls_ret = ''
- long ll_handl
- ll_handl = tv_cusarea.finditem(RootTreeItem!,0)
- if ll_handl > 0 then wf_getarea_tvchild(ll_handl,ls_ret)
- if ls_ret = '' then ls_ret = '-1'
- return ls_ret
- end function
- public subroutine wf_set_tvchild_area (long arg_handl, integer arg_index);long ll_handl
- treeviewitem tvi
- ll_handl = arg_handl
- tv_cusarea.getitem(ll_handl,tvi)
- tvi.StatePictureIndex = arg_index
- tv_cusarea.setitem(ll_handl,tvi)
- ll_handl = tv_cusarea.finditem(ChildTreeItem!,ll_handl)
- do while ll_handl > 0
- wf_set_tvnext_area(ll_handl,arg_index)
- ll_handl = tv_cusarea.finditem(ChildTreeItem!,ll_handl)
- loop
- end subroutine
- public subroutine wf_set_tvnext_area (long arg_handl, integer arg_index);long ll_handl
- treeviewitem tvi
- ll_handl = arg_handl
- tv_cusarea.getitem(ll_handl,tvi)
- tvi.StatePictureIndex = arg_index
- tv_cusarea.setitem(ll_handl,tvi)
- ll_handl = tv_cusarea.finditem(NextTreeItem!,ll_handl)
- do while ll_handl > 0
- wf_set_tvchild_area(ll_handl,arg_index)
- ll_handl = tv_cusarea.finditem(NextTreeItem!,ll_handl)
- loop
- end subroutine
- public subroutine wf_set_tvparent_area (long arg_handl);//====================================================================
- // Function: wf_find_parenttree()
- //--------------------------------------------------------------------
- // Description:
- //--------------------------------------------------------------------
- // Arguments:
- // value long arg_handl
- // value long arg_state
- //--------------------------------------------------------------------
- // Returns: (none)
- //--------------------------------------------------------------------
- // Author: yyx Date: 2004.11.18
- //--------------------------------------------------------------------
- // Modify History:
- //
- //====================================================================
- long ll_handl
- treeviewitem tvi
- ll_handl = arg_handl
- tv_cusarea.getitem(ll_handl,tvi)
- tvi.StatePictureIndex = 2
- tv_cusarea.setitem(ll_handl,tvi)
- ll_handl = tv_cusarea.finditem(ParentTreeItem!,ll_handl)
- do while ll_handl > 0
- tv_cusarea.getitem(ll_handl,tvi)
- tvi.StatePictureIndex = 2
- tv_cusarea.setitem(ll_handl,tvi)
- ll_handl = tv_cusarea.finditem(ParentTreeItem!,ll_handl)
- loop
- end subroutine
- public subroutine wf_clear_tvchild_area (long arg_handl);long ll_handl
- treeviewitem tvi
- ll_handl = arg_handl
- ll_handl = tv_cusarea.finditem(ChildTreeItem!,ll_handl)
- do while ll_handl > 0
- tv_cusarea.getitem(ll_handl,tvi)
- tvi.statepictureindex = 1
- tv_cusarea.setitem(ll_handl,tvi)
-
- wf_clear_tvnext_area(ll_handl)
- ll_handl = tv_cusarea.finditem(ChildTreeItem!,ll_handl)
- loop
- end subroutine
- public subroutine wf_clear_tvnext_area (long arg_handl);long ll_handl
- treeviewitem tvi
- ll_handl = arg_handl
- ll_handl = tv_cusarea.finditem(NextTreeItem!,ll_handl)
- do while ll_handl > 0
- tv_cusarea.getitem(ll_handl,tvi)
- tvi.statepictureindex = 1
- tv_cusarea.setitem(ll_handl,tvi)
-
- wf_clear_tvchild_area(ll_handl)
- ll_handl = tv_cusarea.finditem(NextTreeItem!,ll_handl)
- loop
- end subroutine
- public subroutine wf_get_class (ref string arg_classedit, ref string arg_classview);String ls_retedit = '',ls_retview = ''
- Long cnt,i,choicecnt = 0,choicecnt1 = 0
- arg_classedit = ''
- arg_classview = ''
- cnt = dw_4.RowCount()
- FOR i = 1 TO cnt
- IF dw_4.Object.allow_edit[i] = 1 THEN
- choicecnt++
- ls_retedit = ls_retedit+','+String(dw_4.Object.classid[i])
- END IF
- IF dw_4.Object.allow_view[i] = 1 THEN
- choicecnt1++
- ls_retview = ls_retview+','+String(dw_4.Object.classid[i])
- END IF
- NEXT
- IF choicecnt = cnt THEN
- ls_retedit = '0' //全部
- ELSEIF choicecnt <> cnt AND choicecnt > 0 THEN
- ls_retedit = ls_retedit + ','
- ELSEIF choicecnt = 0 THEN
- ls_retedit = '-1' //无
- END IF
- IF choicecnt1 = cnt THEN
- ls_retview = '0' //全部
- ELSEIF choicecnt1 <> cnt AND choicecnt1 > 0 THEN
- ls_retview = ls_retview + ','
- ELSEIF choicecnt1 = 0 THEN
- ls_retview = '-1' //无
- END IF
- arg_classview = ls_retview
- arg_classedit = ls_retedit
- end subroutine
- public subroutine wf_get_xlspowerstr (ref string arg_xls_printstr, ref string arg_xls_sendstr);String ls_retprintstr = '',ls_retsendstr = ''
- Long cnt,i,choicecnt = 0,choicecnt1 = 0
- arg_xls_printstr = ''
- arg_xls_sendstr = ''
- cnt = dw_5.RowCount()
- FOR i = 1 TO cnt
- IF dw_5.Object.allow_print[i] = 1 THEN
- choicecnt++
- ls_retprintstr = ls_retprintstr+','+String(dw_5.Object.u_xls_templates_id [i])
- END IF
- IF dw_5.Object.allow_send[i] = 1 THEN
- choicecnt1++
- ls_retsendstr = ls_retsendstr+','+String(dw_5.Object.u_xls_templates_id [i])
- END IF
- NEXT
- IF choicecnt = cnt THEN
- ls_retprintstr = '0' //全部
- ELSEIF choicecnt <> cnt AND choicecnt > 0 THEN
- ls_retprintstr = ls_retprintstr + ','
- ELSEIF choicecnt = 0 THEN
- ls_retprintstr = '-1' //无
- END IF
- IF choicecnt1 = cnt THEN
- ls_retsendstr = '0' //全部
- ELSEIF choicecnt1 <> cnt AND choicecnt1 > 0 THEN
- ls_retsendstr = ls_retsendstr + ','
- ELSEIF choicecnt1 = 0 THEN
- ls_retsendstr = '-1' //无
- END IF
- arg_xls_sendstr = ls_retsendstr
- arg_xls_printstr = ls_retprintstr
- end subroutine
- public function string wf_get_spttype ();String ls_ret = ''
- Long cnt,i,choicecnt = 0
- cnt = dw_6.RowCount()
- FOR i = 1 TO cnt
- IF dw_6.Object.ch[i] = 1 THEN
- choicecnt++
- ls_ret = ls_ret+','+String(dw_6.Object.spttypeid[i])
- END IF
- NEXT
- IF choicecnt = cnt THEN
- ls_ret = '0' //全部
- ELSEIF choicecnt <> cnt AND choicecnt > 0 THEN
- ls_ret = ls_ret + ','
- ELSEIF choicecnt = 0 THEN
- ls_ret = '-1' //无
- END IF
- RETURN ls_ret
- end function
- public subroutine wf_get_plugins (ref string arg_str);//wf_get_plugins arg_str
- String ls_ret = ''
- Long cnt,i,choicecnt = 0
- dw_7.accepttext()
- cnt = dw_7.RowCount()
- FOR i = 1 TO cnt
- IF dw_7.Object.ch[i] = 1 THEN
- choicecnt++
- arg_str = arg_str+','+String(dw_7.Object.fileid[i])
- END IF
- NEXT
- IF choicecnt = cnt THEN
- arg_str = '0' //全部
- ELSEIF choicecnt <> cnt AND choicecnt > 0 THEN
- arg_str = arg_str + ','
- ELSEIF choicecnt = 0 THEN
- arg_str = '-1' //无
- END IF
- end subroutine
- public subroutine wf_get_report (ref string arg_str);String ls_ret = ''
- Long cnt,i,choicecnt = 0
- dw_8.accepttext()
- cnt = dw_8.RowCount()
- FOR i = 1 TO cnt
- IF dw_8.Object.ch[i] = 1 THEN
- choicecnt++
- arg_str = arg_str+','+String(dw_8.Object.reportid[i])
- END IF
- NEXT
- IF choicecnt = cnt THEN
- arg_str = '0' //全部
- ELSEIF choicecnt <> cnt AND choicecnt > 0 THEN
- arg_str = arg_str + ','
- ELSEIF choicecnt = 0 THEN
- arg_str = '-1' //无
- END IF
- end subroutine
- public subroutine wf_set_sendout_tvnext (long arg_handl, integer arg_flag, integer arg_type);Long ll_handl
- Long ll_funcid
- string ls_treename
- long ll_row
- string ls_filter
- treeviewitem tvi
- ll_handl = arg_handl
- ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl)
- DO WHILE ll_handl > 0
- tv_func.GetItem(ll_handl,tvi)
- ll_funcid = tvi.Data
- IF NOT ll_funcid = 0 THEN
- ls_filter = 'funcid = '+String(ll_funcid)
- sys_ds_userinfo.SetFilter(ls_filter)
- sys_ds_userinfo.Filter()
- IF sys_ds_userinfo.RowCount() = 0 THEN
- tvi.StatePictureIndex = 1
- ELSE
- ls_treename = sys_ds_userinfo.Object.treename[1]
- IF arg_type = 0 THEN //设置报表数据发送权限
- IF ls_treename = '报表数据发送' THEN
- IF arg_flag = 0 THEN //取消
- tvi.StatePictureIndex = 1
- ELSE
- tvi.StatePictureIndex = 2
- END IF
- END IF
- ELSE
- IF ls_treename = '报表打印' THEN
- IF arg_flag = 0 THEN
- tvi.StatePictureIndex = 1
- ELSE
- tvi.StatePictureIndex = 2
- END IF
- END IF
- END IF
- END IF
- END IF
- tv_func.SetItem(ll_handl,tvi)
-
- wf_set_sendout_tvchild(ll_handl,arg_flag,arg_type)
- ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl)
- LOOP
- end subroutine
- public subroutine wf_set_sendout_tvchild (long arg_handl, integer arg_flag, integer arg_type);Long ll_handl
- Long ll_funcid
- String ls_treename
- Long ll_row
- String ls_filter
- treeviewitem tvi
- ll_handl = arg_handl
- ll_handl = tv_func.FindItem(ChildTreeItem!,ll_handl)
- DO WHILE ll_handl > 0
- tv_func.GetItem(ll_handl,tvi)
- ll_funcid = tvi.Data
-
- IF NOT ll_funcid = 0 THEN
- ls_filter = 'funcid = '+String(ll_funcid)
- sys_ds_userinfo.SetFilter(ls_filter)
- sys_ds_userinfo.Filter()
- IF sys_ds_userinfo.RowCount() = 0 THEN
- tvi.StatePictureIndex = 1
- ELSE
- ls_treename = sys_ds_userinfo.Object.treename[1]
- IF arg_type = 0 THEN //设置报表数据发送权限
- IF ls_treename = '报表数据发送' THEN
- IF arg_flag = 0 THEN //取消
- tvi.StatePictureIndex = 1
- ELSE
- tvi.StatePictureIndex = 2
- END IF
- END IF
- ELSE
- IF ls_treename = '报表打印' THEN
- IF arg_flag = 0 THEN
- tvi.StatePictureIndex = 1
- ELSE
- tvi.StatePictureIndex = 2
- END IF
- END IF
- END IF
- END IF
- END IF
- tv_func.SetItem(ll_handl,tvi)
- // wf_set_sendout_tvnext(ll_handl,arg_flag,arg_type)
- // ll_handl = tv_func.FindItem(ChildTreeItem!,ll_handl)
-
- wf_set_sendout_tvchild(ll_handl,arg_flag,arg_type)
- ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl)
- LOOP
- end subroutine
- public subroutine wf_set_sendout (integer arg_flag, integer arg_type);IF NOT dw_edit_mode THEN
- MessageBox('提示','非编辑状态下不可用', Information!, OK! )
- RETURN
- END IF
- Long ll_handl
- ll_handl = tv_func.FindItem(RootTreeItem!,0)
- //arg_flag 0 - 取消 1 - 设置
- //arg_type 0 - 报表发送 1 - 报表打印
- tv_func.setredraw(false)
- IF ll_handl > 0 THEN wf_set_sendout_tvchild(ll_handl,arg_flag,arg_type)
- tv_func.setredraw(true)
- RETURN
- end subroutine
- public function long wf_gethandlestate (long arg_handle);long i
- for i = 1 to il_max
- if il_handle_arr[i] = arg_handle then
- return il_state_arr[i]
- end if
- next
- return 0
- end function
- public subroutine wf_sethandlestate (long arg_handle, long arg_state);long i
- for i = 1 to il_max
- if il_handle_arr[i] = arg_handle then
- il_state_arr[i] = arg_state
- return
- end if
- next
- il_max ++
- il_handle_arr[il_max] = arg_handle
- il_state_arr[il_max] = arg_state
- end subroutine
- public subroutine wf_get_account (ref string arg_str);
- String ls_ret = ''
- Long cnt,i,choicecnt = 0
- dw_9.accepttext()
- cnt = dw_9.RowCount()
- FOR i = 1 TO cnt
- IF dw_9.Object.ch[i] = 1 THEN
- choicecnt++
- arg_str = arg_str+','+String(dw_9.Object.accountsid[i])
- END IF
- NEXT
- IF choicecnt = cnt THEN
- arg_str = '0' //全部
- ELSEIF choicecnt <> cnt AND choicecnt > 0 THEN
- arg_str = arg_str + ','
- ELSEIF choicecnt = 0 THEN
- arg_str = '-1' //无
- END IF
- end subroutine
- public subroutine wf_get_outrep (ref string arg_str);
- arg_str = ''
- Long cnt,i,choicecnt = 0
- dw_10.accepttext()
- cnt = dw_10.RowCount()
- FOR i = 1 TO cnt
- IF dw_10.Object.choice[i] = 1 THEN
- choicecnt++
- arg_str = arg_str+','+String(dw_10.Object.outrepname[i])
- END IF
- NEXT
- IF choicecnt = cnt THEN
- arg_str = '0' //全部
- ELSEIF choicecnt <> cnt AND choicecnt > 0 THEN
- arg_str = arg_str + ','
- ELSEIF choicecnt = 0 THEN
- arg_str = '-1' //无
- END IF
- end subroutine
- public subroutine wf_refresh_mx (s_sys_user arg_s_user);//wf_refresh
- long i
- long ll_storageid
- long ll_scid
- long ll_ClassID
- long ll_xls_templates_id
- long ll_spttypeid
- long ll_fileid
- long ll_reportid
- long ll_accountsid
- string ls_outrepname
- //**storage_checkbox
- FOR i = 1 TO dw_2.RowCount()
- IF arg_s_user.storagestr = '0' THEN
- dw_2.Object.choice[i] = 1
- ELSE
- ll_storageid = dw_2.Object.storageid[i]
- IF Pos(arg_s_user.storagestr,','+String(ll_storageid)+',',1) > 0 THEN
- dw_2.Object.choice[i] = 1
- ELSE
- dw_2.Object.choice[i] = 0
- END IF
- END IF
- NEXT
- //**sc_checkbox
- FOR i = 1 TO dw_3.RowCount()
- IF arg_s_user.scstr = '0' THEN
- dw_3.Object.choice[i] = 1
- ELSE
- ll_scid = dw_3.Object.scid[i]
- IF Pos(arg_s_user.scstr,','+String(ll_scid)+',',1) > 0 THEN
- dw_3.Object.choice[i] = 1
- ELSE
- dw_3.Object.choice[i] = 0
- END IF
- END IF
- NEXT
- // //** classedit _checkbox
- FOR i = 1 TO dw_4.RowCount()
- IF arg_s_user.classeditstr = '0' THEN
- dw_4.Object.allow_edit[i] = 1
- ELSE
- ll_ClassID = dw_4.Object.classid[i]
- IF Pos(arg_s_user.classeditstr,','+String(ll_ClassID)+',',1) > 0 THEN
- dw_4.Object.allow_edit[i] = 1
- ELSE
- dw_4.Object.allow_edit[i] = 0
- END IF
- END IF
- NEXT
- //** classview _checkbox
- FOR i = 1 TO dw_4.RowCount()
- IF arg_s_user.classviewstr = '0' THEN
- dw_4.Object.allow_view[i] = 1
- ELSE
- ll_ClassID = dw_4.Object.classid[i]
- IF Pos(arg_s_user.classviewstr,','+String(ll_ClassID)+',',1) > 0 THEN
- dw_4.Object.allow_view[i] = 1
- ELSE
- dw_4.Object.allow_view[i] = 0
- END IF
- END IF
- NEXT
- //** xls_printstr _checkbox
- FOR i = 1 TO dw_5.RowCount()
- IF arg_s_user.xls_printstr = '0' THEN
- dw_5.Object.allow_print[i] = 1
- ELSE
- ll_xls_templates_id = dw_5.Object.u_xls_templates_id[i]
- IF Pos(arg_s_user.xls_printstr,','+String(ll_xls_templates_id)+',',1) > 0 THEN
- dw_5.Object.allow_print[i] = 1
- ELSE
- dw_5.Object.allow_print[i] = 0
- END IF
- END IF
- NEXT
- //** xls_sendstr _checkbox
- FOR i = 1 TO dw_5.RowCount()
- IF arg_s_user.xls_sendstr = '0' THEN
- dw_5.Object.allow_send[i] = 1
- ELSE
- ll_xls_templates_id = dw_5.Object.u_xls_templates_id[i]
- IF Pos(arg_s_user.xls_sendstr,','+String(ll_xls_templates_id)+',',1) > 0 THEN
- dw_5.Object.allow_send[i] = 1
- ELSE
- dw_5.Object.allow_send[i] = 0
- END IF
- END IF
- NEXT
- //** arg_s_user.spttypestr _checkbox
- FOR i = 1 TO dw_6.RowCount()
- IF arg_s_user.spttypestr = '0' THEN
- dw_6.Object.ch[i] = 1
- ELSE
- ll_spttypeid = dw_6.Object.spttypeid[i]
- IF Pos(arg_s_user.spttypestr,','+String(ll_spttypeid)+',',1) > 0 THEN
- dw_6.Object.ch[i] = 1
- ELSE
- dw_6.Object.ch[i] = 0
- END IF
- END IF
- NEXT
- //** plugins_str _checkbox
- FOR i = 1 TO dw_7.RowCount()
- IF arg_s_user.pluginsstr = '0' THEN
- dw_7.Object.ch[i] = 1
- ELSE
- ll_fileid = dw_7.Object.fileid[i]
- IF Pos(arg_s_user.pluginsstr,','+String(ll_fileid)+',',1) > 0 THEN
- dw_7.Object.ch[i] = 1
- ELSE
- dw_7.Object.ch[i] = 0
- END IF
- END IF
- NEXT
- //自定义报表
- dw_8.SetRedraw(FALSE)
- FOR i = 1 TO dw_8.RowCount()
- IF arg_s_user.reportstr = '0' THEN
- dw_8.Object.ch[i] = 1
- ELSE
- ll_reportid = dw_8.Object.reportid[i]
- IF Pos(arg_s_user.reportstr,','+String(ll_reportid)+',',1) > 0 THEN
- dw_8.Object.ch[i] = 1
- ELSE
- dw_8.Object.ch[i] = 0
- END IF
- END IF
- NEXT
- dw_8.SetRedraw(TRUE)
- dw_9.SetRedraw(FALSE)
- FOR i = 1 TO dw_9.RowCount()
- IF arg_s_user.accountstr = '0' THEN
- dw_9.Object.ch[i] = 1
- ELSE
- ll_accountsid = dw_9.Object.accountsid[i]
- IF Pos(arg_s_user.accountstr,','+String(ll_accountsid)+',',1) > 0 THEN
- dw_9.Object.ch[i] = 1
- ELSE
- dw_9.Object.ch[i] = 0
- END IF
- END IF
- NEXT
- dw_9.SetRedraw(TRUE)
- dw_10.SetRedraw(FALSE)
- FOR i = 1 TO dw_10.RowCount()
- IF arg_s_user.outrepstr = '0' THEN
- dw_10.Object.choice[i] = 1
- ELSE
- ls_outrepname = dw_10.Object.outrepname[i]
- IF Pos(arg_s_user.outrepstr,','+String(ls_outrepname)+',',1) > 0 THEN
- dw_10.Object.choice[i] = 1
- ELSE
- dw_10.Object.choice[i] = 0
- END IF
- END IF
- NEXT
- dw_10.SetRedraw(TRUE)
- //**tv_checkbox
- //if ls_str = '' then return
- Long ll_handl
- ll_handl = tv_func.FindItem(RootTreeItem!,0)
- IF ll_handl > 0 THEN wf_refresh_tvchild(ll_handl,arg_s_user.rightstring)
- //**tv_checkbox
- //if arg_s_user.areastr = '' then return
- Long ll_handl_area
- ll_handl_area = tv_cusarea.FindItem(RootTreeItem!,0)
- IF ll_handl_area > 0 THEN wf_refresh_tvchild_area(ll_handl_area,arg_s_user.areastr)
- RETURN
- end subroutine
- public subroutine wf_set_tvchild_son (long arg_handl, integer arg_index);//==============================================================================
- // 函数: w_userinfo_def::wf_set_tvchild_son()
- //------------------------------------------------------------------------------
- // 描述:
- //------------------------------------------------------------------------------
- // 参数:
- // value long arg_handl
- // value integer arg_index
- //------------------------------------------------------------------------------
- // 返回值: (none)
- //------------------------------------------------------------------------------
- // 作者: HD Lee 日期: 2012.06.22
- //------------------------------------------------------------------------------
- // 修改历史:
- //
- //==============================================================================
- //====================================================================
- Long ll_handl
- treeviewitem tvi
- ll_handl = arg_handl
- tv_func.GetItem(ll_handl,tvi)
- tvi.StatePictureIndex = arg_index
- tv_func.SetItem(ll_handl,tvi)
- ll_handl = tv_func.FindItem(ChildTreeItem!,ll_handl)
- DO WHILE ll_handl > 0
- // wf_set_tvchild_son(ll_handl, arg_index)
-
- tv_func.GetItem(ll_handl,tvi)
- tvi.StatePictureIndex = arg_index
- tv_func.SetItem(ll_handl,tvi)
-
- ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl)
- LOOP
- end subroutine
- public subroutine wf_set_tvchild_son_all (long arg_handl, integer arg_index);//==============================================================================
- // 函数: w_userinfo_def::wf_set_tvchild_son()
- //------------------------------------------------------------------------------
- // 描述:
- //------------------------------------------------------------------------------
- // 参数:
- // value long arg_handl
- // value integer arg_index
- //------------------------------------------------------------------------------
- // 返回值: (none)
- //------------------------------------------------------------------------------
- // 作者: HD Lee 日期: 2012.06.22
- //------------------------------------------------------------------------------
- // 修改历史:
- //
- //==============================================================================
- //====================================================================
- Long ll_handl
- treeviewitem tvi
- ll_handl = arg_handl
- tv_func.GetItem(ll_handl,tvi)
- tvi.StatePictureIndex = arg_index
- tv_func.SetItem(ll_handl,tvi)
- ll_handl = tv_func.FindItem(ChildTreeItem!,ll_handl)
- DO WHILE ll_handl > 0
-
- tv_func.GetItem(ll_handl,tvi)
- tvi.StatePictureIndex = arg_index
- tv_func.SetItem(ll_handl,tvi)
-
- wf_set_tvchild_son_all(ll_handl, arg_index)
-
- ll_handl = tv_func.FindItem(NextTreeItem!,ll_handl)
- LOOP
- end subroutine
- public subroutine wf_select_all (datawindow arg_dw, dwobject dwo);String str_clickedobjecttype
- String column_title_name, column_name
- String column_title_text
- str_clickedobjecttype = Lower(Left(dwo.Type,4))
- IF str_clickedobjecttype = 'text' THEN
- column_title_name = dwo.Name
- IF Right(column_title_name, 2) = "_t" THEN
- column_name = Left(column_title_name, Len(column_title_name) - 2)
- column_title_text = arg_dw.Describe(column_title_name+ ".text")
-
- IF Left( arg_dw.Describe( column_name+ ".coltype"),4) = "long" THEN
-
- Long i, OldTabNum
-
- OldTabNum = arg_dw.SetTabOrder(column_name, 0)
-
- IF OldTabNum > 0 THEN
- arg_dw.setredraw(false)
- FOR i = 1 To arg_dw.RowCount()
- arg_dw.SetItem(i, column_name, tmp_chflag)
- NEXT
- arg_dw.setredraw(true)
- tmp_chflag = 1 - tmp_chflag
- arg_dw.SetTabOrder(column_name, OldTabNum)
- END IF
-
- END IF
-
- END IF
-
- END IF
- end subroutine
- on w_userinfo_def.create
- this.cbx_tree=create cbx_tree
- this.cbx_ifphone=create cbx_ifphone
- this.ddlb_dlflag=create ddlb_dlflag
- this.st_5=create st_5
- this.cb_other_func=create cb_other_func
- this.cbx_ifnotin=create cbx_ifnotin
- this.cbx_usecard=create cbx_usecard
- this.cb_help=create cb_help
- this.sle_cardno=create sle_cardno
- this.st_4=create st_4
- this.tab_1=create tab_1
- this.cb_superpsw=create cb_superpsw
- this.cb_undo=create cb_undo
- this.cb_paste=create cb_paste
- this.cb_copy=create cb_copy
- this.cb_setpws=create cb_setpws
- this.cb_select_emp=create cb_select_emp
- this.dw_1=create dw_1
- this.sle_dscrp=create sle_dscrp
- this.st_3=create st_3
- this.sle_xm=create sle_xm
- this.sle_id=create sle_id
- this.st_2=create st_2
- this.st_1=create st_1
- this.cb_end=create cb_end
- this.cb_del=create cb_del
- this.cb_mod=create cb_mod
- this.cb_add=create cb_add
- this.ln_bar=create ln_bar
- this.ln_bar2=create ln_bar2
- this.r_bar=create r_bar
- this.Control[]={this.cbx_tree,&
- this.cbx_ifphone,&
- this.ddlb_dlflag,&
- this.st_5,&
- this.cb_other_func,&
- this.cbx_ifnotin,&
- this.cbx_usecard,&
- this.cb_help,&
- this.sle_cardno,&
- this.st_4,&
- this.tab_1,&
- this.cb_superpsw,&
- this.cb_undo,&
- this.cb_paste,&
- this.cb_copy,&
- this.cb_setpws,&
- this.cb_select_emp,&
- this.dw_1,&
- this.sle_dscrp,&
- this.st_3,&
- this.sle_xm,&
- this.sle_id,&
- this.st_2,&
- this.st_1,&
- this.cb_end,&
- this.cb_del,&
- this.cb_mod,&
- this.cb_add,&
- this.ln_bar,&
- this.ln_bar2,&
- this.r_bar}
- end on
- on w_userinfo_def.destroy
- destroy(this.cbx_tree)
- destroy(this.cbx_ifphone)
- destroy(this.ddlb_dlflag)
- destroy(this.st_5)
- destroy(this.cb_other_func)
- destroy(this.cbx_ifnotin)
- destroy(this.cbx_usecard)
- destroy(this.cb_help)
- destroy(this.sle_cardno)
- destroy(this.st_4)
- destroy(this.tab_1)
- destroy(this.cb_superpsw)
- destroy(this.cb_undo)
- destroy(this.cb_paste)
- destroy(this.cb_copy)
- destroy(this.cb_setpws)
- destroy(this.cb_select_emp)
- destroy(this.dw_1)
- destroy(this.sle_dscrp)
- destroy(this.st_3)
- destroy(this.sle_xm)
- destroy(this.sle_id)
- destroy(this.st_2)
- destroy(this.st_1)
- destroy(this.cb_end)
- destroy(this.cb_del)
- destroy(this.cb_mod)
- destroy(this.cb_add)
- destroy(this.ln_bar)
- destroy(this.ln_bar2)
- destroy(this.r_bar)
- end on
- event open;
- //tab_1.tabpage_2.enabled = sys_option_cusarea = 1
- //tab_1.tabpage_8.enabled = sys_option_outrep = 1
- tab_1.tabpage_2.visible = sys_option_cusarea = 1
- tab_1.tabpage_8.visible = sys_option_outrep = 1
- tv_func = tab_1.tabpage_1.tv_2
- tv_cusarea = tab_1.tabpage_2.tv_1
- dw_6 = tab_1.tabpage_3.dw_6
- dw_5 = tab_1.tabpage_5.dw_5
- dw_4 = tab_1.tabpage_4.dw_4
- dw_3 = tab_1.tabpage_3.dw_3
- dw_2 = tab_1.tabpage_3.dw_2
- dw_7 = tab_1.tabpage_4.dw_7
- dw_8 = tab_1.tabpage_6.dw_8
- dw_9 = tab_1.tabpage_7.dw_9
- dw_10 = tab_1.tabpage_8.dw_10
- dw_1.settransobject(sqlca)
- dw_1.retrieve(sys_scid)
- dw_2.settransobject(sqlca)
- int li_inuse
- if tab_1.tabpage_3.cbx_inuse_storage.checked then
- li_inuse = 1
- else
- li_inuse = -1
- end if
- dw_2.retrieve(li_inuse)
- dw_3.settransobject(sqlca)
- dw_3.retrieve()
- dw_4.settransobject(sqlca)
- dw_4.retrieve()
- dw_5.settransobject(sqlca)
- dw_5.retrieve()
- dw_6.settransobject(sqlca)
- dw_6.retrieve()
- dw_7.settransobject(sqlca)
- dw_7.retrieve()
- dw_8.settransobject(sqlca)
- dw_8.retrieve()
- dw_9.settransobject(sqlca)
- dw_9.retrieve()
- dw_10.settransobject(sqlca)
- dw_10.retrieve()
- wf_build_functree()
- wf_build_areatree()
- wf_refresh()
- wf_lockface()
- uo_user=create uo_usergroup
- end event
- event key;IF Key = KeyEnter! OR Key = KeyDownArrow! THEN //
- keybd_event ( 9, 0, 0 , 0 ) // 按下tab
- keybd_event ( 9, 0, 2, 0 ) // 释放tab
- RETURN 1
- END IF
- end event
- event resize;ln_bar.endx = this.width
- ln_bar2.endx = this.width
- r_bar.width = this.width
- long w_width,w_height
- w_width = 3600
- w_height = 2300
- dw_1.height = this.height - dw_1.y - 140
- tab_1.width = this.width - tab_1.x - 40
- tab_1.height = this.height - tab_1.y - 140
- tv_func.width = tab_1.width - tv_func.x - 40
- tv_func.height = tab_1.height - tv_func.y - 100
- tv_cusarea.width = tab_1.width - tv_cusarea.x - 40
- tv_cusarea.height = tab_1.height - tv_cusarea.y - 100
- tab_1.tabpage_8.dw_10.width = tv_cusarea.width
- tab_1.tabpage_8.dw_10.height = tv_cusarea.height
- tab_1.tabpage_3.dw_2.height = tv_cusarea.height - 92
- tab_1.tabpage_3.dw_3.height = tv_cusarea.height
- tab_1.tabpage_3.dw_6.height = tv_cusarea.height
- tab_1.tabpage_3.dw_3.width = tab_1.tabpage_3.width / 3 - 4
- tab_1.tabpage_3.dw_2.x = tab_1.tabpage_3.dw_3.x + tab_1.tabpage_3.dw_3.width + 4
- tab_1.tabpage_3.dw_2.width = tab_1.tabpage_3.width / 3 - 4
- tab_1.tabpage_3.cbx_inuse_storage.x = tab_1.tabpage_3.dw_2.x + 10
- tab_1.tabpage_3.dw_6.x = tab_1.tabpage_3.dw_2.x + tab_1.tabpage_3.dw_2.width + 4
- tab_1.tabpage_3.dw_6.width = tab_1.tabpage_3.width / 3 - 4
- tab_1.tabpage_4.dw_4.height = tv_cusarea.height
- tab_1.tabpage_4.dw_7.height = tv_cusarea.height
- tab_1.tabpage_4.dw_4.width = tab_1.tabpage_4.width / 2 - 4
- tab_1.tabpage_4.dw_7.x = tab_1.tabpage_4.dw_4.x + tab_1.tabpage_4.dw_4.width + 4
- tab_1.tabpage_4.dw_7.width = tab_1.tabpage_4.width / 2 - 4
- tab_1.tabpage_5.dw_5.width = tv_cusarea.width
- tab_1.tabpage_5.dw_5.height = tv_cusarea.height
- tab_1.tabpage_6.dw_8.width = tv_cusarea.width
- tab_1.tabpage_6.dw_8.height = tv_cusarea.height
- tab_1.tabpage_7.dw_9.width = tv_cusarea.width
- tab_1.tabpage_7.dw_9.height = tv_cusarea.height
- end event
- type cbx_tree from checkbox within w_userinfo_def
- integer x = 2889
- integer y = 64
- integer width = 576
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "进入窗口展开权限树"
- end type
- event clicked;Int li_iftree
- IF THIS.Checked THEN
- li_iftree = 1
- ELSE
- li_iftree = 0
- END IF
- f_SetProfileString (sys_empid,'w_userinfo_def', "iftree", String(li_iftree))
- end event
- event constructor;this.backcolor = 14215660
- Int li_iftree
- li_iftree = Integer(f_ProfileString (sys_empid,'w_userinfo_def', "iftree", '0'))
- IF li_iftree = 0 THEN
- THIS.Checked = FALSE
- ELSE
- THIS.Checked = TRUE
- END IF
- end event
- type cbx_ifphone from checkbox within w_userinfo_def
- integer x = 827
- integer y = 280
- integer width = 361
- integer height = 92
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "移动端用户"
- end type
- type ddlb_dlflag from dropdownlistbox within w_userinfo_def
- integer x = 270
- integer y = 384
- integer width = 530
- integer height = 300
- integer taborder = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string item[] = {"单口令","单指纹","口令+指纹"}
- borderstyle borderstyle = stylelowered!
- end type
- type st_5 from statictext within w_userinfo_def
- integer x = 23
- integer y = 384
- integer width = 293
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 16711680
- long backcolor = 134217739
- boolean enabled = false
- string text = "登陆模式:"
- boolean focusrectangle = false
- end type
- type cb_other_func from uo_imflatbutton within w_userinfo_def
- integer x = 919
- integer width = 261
- integer height = 172
- integer taborder = 30
- string text = "辅助功能"
- string normalpicname = "other.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;m_Dfc_Control_PopupMenu dmPopupMenu
- String menustr
- menustr = "Text=批设置报表数据发送权限~tEvent=ue_sendout"
- menustr = menustr + "|" + "Text=批设置报表打印权限~tEvent=ue_print_report"
- menustr = menustr + "|" + "Text=-"
- menustr = menustr + "|" + "Text=批取消报表数据发送权限~tEvent=ue_sendout_cancle"
- menustr = menustr + "|" + "Text=批取消报表打印权限~tEvent=ue_print_report_cancle"
- IF Len(Trim(menustr)) <> 0 THEN
- dmPopupMenu = CREATE m_Dfc_Control_PopupMenu
- dmPopupMenu.mf_BuildMenu(THIS, menustr)
- dmPopupMenu.mf_PopMenu()
- DESTROY dmPopupMenu
- END IF
- end event
- type cbx_ifnotin from checkbox within w_userinfo_def
- integer x = 827
- integer y = 188
- integer width = 210
- integer height = 92
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "禁用"
- end type
- type cbx_usecard from checkbox within w_userinfo_def
- boolean visible = false
- integer x = 1275
- integer y = 372
- integer width = 219
- integer height = 92
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "刷卡"
- end type
- event clicked;if this.checked=false then
- sle_cardno.enabled=false
- else
- sle_cardno.enabled=true
- end if
- end event
- type cb_help from uo_imflatbutton within w_userinfo_def
- string tag = "帮助[F1]"
- integer x = 1961
- integer width = 165
- integer height = 172
- integer taborder = 70
- boolean bringtotop = true
- string text = "帮助"
- string normalpicname = "help.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- type sle_cardno from singlelineedit within w_userinfo_def
- boolean visible = false
- integer x = 270
- integer y = 372
- integer width = 987
- integer height = 92
- integer taborder = 50
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean enabled = false
- boolean autohscroll = false
- integer limit = 10
- boolean displayonly = true
- borderstyle borderstyle = stylelowered!
- end type
- type st_4 from statictext within w_userinfo_def
- boolean visible = false
- integer x = 23
- integer y = 388
- integer width = 293
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 16711680
- long backcolor = 134217739
- boolean enabled = false
- string text = "卡 号:"
- boolean focusrectangle = false
- end type
- type tab_1 from tab within w_userinfo_def
- integer x = 1518
- integer y = 192
- integer width = 2363
- integer height = 1980
- integer taborder = 20
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 134217739
- boolean raggedright = true
- boolean focusonbuttondown = true
- integer selectedtab = 1
- tabpage_1 tabpage_1
- tabpage_2 tabpage_2
- tabpage_3 tabpage_3
- tabpage_7 tabpage_7
- tabpage_8 tabpage_8
- tabpage_4 tabpage_4
- tabpage_5 tabpage_5
- tabpage_6 tabpage_6
- end type
- on tab_1.create
- this.tabpage_1=create tabpage_1
- this.tabpage_2=create tabpage_2
- this.tabpage_3=create tabpage_3
- this.tabpage_7=create tabpage_7
- this.tabpage_8=create tabpage_8
- this.tabpage_4=create tabpage_4
- this.tabpage_5=create tabpage_5
- this.tabpage_6=create tabpage_6
- this.Control[]={this.tabpage_1,&
- this.tabpage_2,&
- this.tabpage_3,&
- this.tabpage_7,&
- this.tabpage_8,&
- this.tabpage_4,&
- this.tabpage_5,&
- this.tabpage_6}
- end on
- on tab_1.destroy
- destroy(this.tabpage_1)
- destroy(this.tabpage_2)
- destroy(this.tabpage_3)
- destroy(this.tabpage_7)
- destroy(this.tabpage_8)
- destroy(this.tabpage_4)
- destroy(this.tabpage_5)
- destroy(this.tabpage_6)
- end on
- event doubleclicked;cb_superpsw.visible = not cb_superpsw.visible
- end event
- type tabpage_1 from userobject within tab_1
- integer x = 18
- integer y = 96
- integer width = 2327
- integer height = 1868
- long backcolor = 134217739
- string text = "权限"
- long tabtextcolor = 33554432
- long tabbackcolor = 134217739
- long picturemaskcolor = 536870912
- tv_2 tv_2
- end type
- on tabpage_1.create
- this.tv_2=create tv_2
- this.Control[]={this.tv_2}
- end on
- on tabpage_1.destroy
- destroy(this.tv_2)
- end on
- type tv_2 from treeview within tabpage_1
- event afterclicked ( long handle, boolean arg_changed )
- integer width = 1957
- integer height = 1820
- integer taborder = 40
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- boolean disabledragdrop = false
- boolean hideselection = false
- boolean tooltips = false
- boolean checkboxes = true
- boolean trackselect = true
- string picturename[] = {"application.ico","graphics\Shell32 005.ico","graphics\blue folder.ico","graphics\Shell32 025.ico"}
- long picturemaskcolor = 536870912
- long statepicturemaskcolor = 536870912
- end type
- event afterclicked(long handle, boolean arg_changed);treeviewitem tvi
- long laststate
- laststate = wf_gethandlestate(handle)
- if laststate = 0 then return
- IF tv_func.GetItem(Handle,tvi) = 1 THEN
- IF arg_changed THEN // 状态更改
-
- IF NOT dw_edit_mode THEN
- tvi.StatePictureIndex = lastState
- THIS.SetItem(Handle, tvi)
- ELSE
- IF Handle > 0 THEN
- IF lastState = 2 THEN //孩子全部取消
- wf_set_tvchild(Handle)
- ELSEIF lastState = 1 THEN //父亲选定
- wf_set_tvparent(Handle)
- END IF
- END IF
- END IF
- wf_sethandlestate(handle, 0)
- END IF
- END IF
- end event
- event clicked;//if not dw_edit_mode then return
- //
- //int ls_state
- //treeviewitem tvi
- //
- //tv_func.getitem(handle,tvi)
- //ls_state = tvi.StatePictureIndex
- //
- //if handle > 0 then
- // if ls_state = 2 then //孩子全部取消
- // wf_set_tvchild(handle)
- // elseif ls_state = 1 then//父亲选定
- // wf_set_tvparent(handle)
- // end if
- //end if
- //
- //
- Int ls_state
- treeviewitem tvi
- Boolean lb_changed = False
- IF getCursor() = LoadCursor(0, 32649) THEN
- lb_changed = True
- END IF
- IF tv_func.GetItem(Handle,tvi) = 1 THEN
- ls_state = tvi.StatePictureIndex
- IF wf_gethandlestate(Handle) = 0 THEN
- wf_sethandlestate(Handle, ls_state)
- END IF
- This.Event Post afterclicked(Handle, lb_changed)
- END IF
- end event
- event key;Int ls_state
- treeviewitem tvi
- Long Handle
- IF Key = keyspacebar! THEN
- Handle = tv_func.FindItem(CurrentTreeItem!, 0)
-
- IF tv_func.GetItem(Handle,tvi) = 1 THEN
- ls_state = tvi.StatePictureIndex
- IF wf_gethandlestate(Handle) = 0 THEN
- wf_sethandlestate(Handle, ls_state)
- END IF
- THIS.EVENT POST afterclicked(Handle, TRUE)
- END IF
- END IF
- end event
- event rightclicked;IF dw_edit_mode THEN
-
- tv_func_cur_handle = Handle
-
- m_Dfc_Control_PopupMenu dmPopupMenu
- String menustr
-
-
- menustr = "Text=全选下一级~tEvent=ue_select_allson"
- menustr = menustr + "|" + "Text=全选下级~tEvent=ue_select_allson_all"
- //menustr = menustr + "|" + "Text=-"
-
- IF Len(Trim(menustr)) <> 0 THEN
- dmPopupMenu = Create m_Dfc_Control_PopupMenu
- dmPopupMenu.mf_BuildMenu(This, menustr)
- dmPopupMenu.mf_PopMenu()
- Destroy dmPopupMenu
- END IF
- END IF
- end event
- type tabpage_2 from userobject within tab_1
- integer x = 18
- integer y = 96
- integer width = 2327
- integer height = 1868
- long backcolor = 134217739
- string text = "区域"
- long tabtextcolor = 33554432
- long tabbackcolor = 134217739
- long picturemaskcolor = 536870912
- tv_1 tv_1
- end type
- on tabpage_2.create
- this.tv_1=create tv_1
- this.Control[]={this.tv_1}
- end on
- on tabpage_2.destroy
- destroy(this.tv_1)
- end on
- type tv_1 from treeview within tabpage_2
- integer width = 1957
- integer height = 1852
- integer taborder = 50
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- borderstyle borderstyle = stylelowered!
- boolean disabledragdrop = false
- boolean hideselection = false
- boolean tooltips = false
- boolean checkboxes = true
- boolean trackselect = true
- string picturename[] = {"application.ico","graphics\Shell32 005.ico","graphics\blue folder.ico"}
- long picturemaskcolor = 536870912
- long statepicturemaskcolor = 536870912
- end type
- event clicked;if not dw_edit_mode then return
- int ls_state
- treeviewitem tvi
- tv_cusarea.getitem(handle,tvi)
- ls_state = tvi.StatePictureIndex
- if handle > 0 then
- if ls_state = 2 then
- wf_set_tvchild_area(handle,1)
- elseif ls_state = 1 then
- wf_set_tvchild_area(handle,2)
- wf_set_tvparent_area(handle)
- end if
- end if
- end event
- type tabpage_3 from userobject within tab_1
- integer x = 18
- integer y = 96
- integer width = 2327
- integer height = 1868
- long backcolor = 134217739
- string text = "分部&仓库&供应商"
- long tabtextcolor = 33554432
- long tabbackcolor = 134217739
- long picturemaskcolor = 536870912
- cbx_inuse_storage cbx_inuse_storage
- dw_6 dw_6
- dw_2 dw_2
- dw_3 dw_3
- end type
- on tabpage_3.create
- this.cbx_inuse_storage=create cbx_inuse_storage
- this.dw_6=create dw_6
- this.dw_2=create dw_2
- this.dw_3=create dw_3
- this.Control[]={this.cbx_inuse_storage,&
- this.dw_6,&
- this.dw_2,&
- this.dw_3}
- end on
- on tabpage_3.destroy
- destroy(this.cbx_inuse_storage)
- destroy(this.dw_6)
- destroy(this.dw_2)
- destroy(this.dw_3)
- end on
- type cbx_inuse_storage from checkbox within tabpage_3
- integer x = 969
- integer y = 16
- integer width = 402
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 134217739
- string text = "只显示有效"
- boolean checked = true
- end type
- event clicked;Int li_inuse
- IF Checked THEN
- li_inuse = 1
- ELSE
- li_inuse = -1
- END IF
- dw_2.Retrieve(li_inuse)
- end event
- type dw_6 from datawindow within tabpage_3
- integer x = 1742
- integer width = 782
- integer height = 1844
- integer taborder = 70
- string title = "none"
- string dataobject = "dw_user_spttype"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event rbuttondown;wf_select_all(this, dwo)
- end event
- type dw_2 from datawindow within tabpage_3
- integer x = 786
- integer y = 92
- integer width = 951
- integer height = 1760
- integer taborder = 30
- string title = "none"
- string dataobject = "dw_user_storage_sp1"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event rbuttondown;wf_select_all(this, dwo)
- end event
- type dw_3 from datawindow within tabpage_3
- integer width = 782
- integer height = 1852
- integer taborder = 40
- string title = "none"
- string dataobject = "dw_user_sc_sp1"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event rbuttondown;wf_select_all(this, dwo)
- end event
- type tabpage_7 from userobject within tab_1
- integer x = 18
- integer y = 96
- integer width = 2327
- integer height = 1868
- long backcolor = 134217739
- string text = "出纳帐号"
- long tabtextcolor = 33554432
- long tabbackcolor = 134217739
- long picturemaskcolor = 536870912
- dw_9 dw_9
- end type
- on tabpage_7.create
- this.dw_9=create dw_9
- this.Control[]={this.dw_9}
- end on
- on tabpage_7.destroy
- destroy(this.dw_9)
- end on
- type dw_9 from u_dw_rbtnfilter within tabpage_7
- integer width = 2240
- integer height = 1772
- string dataobject = "dw_user_accountstr_sp1"
- boolean hscrollbar = true
- boolean vscrollbar = true
- end type
- event rbuttondown;call super::rbuttondown;wf_select_all(this, dwo)
- end event
- type tabpage_8 from userobject within tab_1
- integer x = 18
- integer y = 96
- integer width = 2327
- integer height = 1868
- long backcolor = 134217739
- string text = "业务员"
- long tabtextcolor = 33554432
- long tabbackcolor = 134217739
- long picturemaskcolor = 536870912
- dw_10 dw_10
- end type
- on tabpage_8.create
- this.dw_10=create dw_10
- this.Control[]={this.dw_10}
- end on
- on tabpage_8.destroy
- destroy(this.dw_10)
- end on
- type dw_10 from datawindow within tabpage_8
- integer width = 2327
- integer height = 1852
- integer taborder = 50
- string title = "none"
- string dataobject = "dw_user_outrep"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event rbuttondown;wf_select_all(this, dwo)
- end event
- type tabpage_4 from userobject within tab_1
- integer x = 18
- integer y = 96
- integer width = 2327
- integer height = 1868
- long backcolor = 134217739
- string text = "附件&外挂"
- long tabtextcolor = 33554432
- long tabbackcolor = 134217739
- long picturemaskcolor = 536870912
- dw_4 dw_4
- dw_7 dw_7
- end type
- on tabpage_4.create
- this.dw_4=create dw_4
- this.dw_7=create dw_7
- this.Control[]={this.dw_4,&
- this.dw_7}
- end on
- on tabpage_4.destroy
- destroy(this.dw_4)
- destroy(this.dw_7)
- end on
- type dw_4 from u_dw_rbtnfilter within tabpage_4
- integer y = 12
- integer width = 1312
- integer height = 1836
- integer taborder = 20
- string dataobject = "dw_user_fileclass_sp1"
- boolean hscrollbar = true
- boolean vscrollbar = true
- end type
- event rbuttondown;call super::rbuttondown;wf_select_all(this, dwo)
- end event
- type dw_7 from u_dw_rbtnfilter within tabpage_4
- integer x = 1312
- integer y = 12
- integer width = 1001
- integer height = 1840
- integer taborder = 20
- string dataobject = "dw_user_plugins_sp1"
- boolean hscrollbar = true
- boolean vscrollbar = true
- end type
- event rbuttondown;call super::rbuttondown;wf_select_all(this, dwo)
- end event
- type tabpage_5 from userobject within tab_1
- integer x = 18
- integer y = 96
- integer width = 2327
- integer height = 1868
- long backcolor = 134217739
- string text = "Excel打印格式"
- long tabtextcolor = 33554432
- long tabbackcolor = 134217739
- long picturemaskcolor = 536870912
- dw_5 dw_5
- end type
- on tabpage_5.create
- this.dw_5=create dw_5
- this.Control[]={this.dw_5}
- end on
- on tabpage_5.destroy
- destroy(this.dw_5)
- end on
- type dw_5 from datawindow within tabpage_5
- integer width = 1961
- integer height = 1852
- integer taborder = 50
- string title = "none"
- string dataobject = "dw_user_xlsbillprint_sp1"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- event rbuttondown;wf_select_all(this, dwo)
- end event
- type tabpage_6 from userobject within tab_1
- integer x = 18
- integer y = 96
- integer width = 2327
- integer height = 1868
- long backcolor = 134217739
- string text = "自定义报表"
- long tabtextcolor = 33554432
- long tabbackcolor = 134217739
- long picturemaskcolor = 536870912
- dw_8 dw_8
- end type
- on tabpage_6.create
- this.dw_8=create dw_8
- this.Control[]={this.dw_8}
- end on
- on tabpage_6.destroy
- destroy(this.dw_8)
- end on
- type dw_8 from u_dw_rbtnfilter within tabpage_6
- integer width = 2135
- integer height = 1772
- integer taborder = 20
- string dataobject = "dw_user_report_sp1"
- boolean hscrollbar = true
- boolean vscrollbar = true
- end type
- event rbuttondown;call super::rbuttondown;wf_select_all(this, dwo)
- end event
- type cb_superpsw from uo_imflatbutton within w_userinfo_def
- boolean visible = false
- integer x = 2290
- integer width = 530
- integer height = 172
- integer taborder = 150
- string text = "超级删除数据密码"
- string normalpicname = "delete.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;string superpsw,arg_msg
- open(w_super_psw)
- superpsw=message.stringparm
- if superpsw='' then return
- uo_getdbinfo uo_dbinfo
- uo_dbinfo = create uo_getdbinfo
- if uo_dbinfo.set_superpsw(superpsw,arg_msg)=0 then
- messagebox("提示",arg_msg, Information!, OK! )
- return
- else
- messagebox("提示",'设定超级密码成功', Information!, OK! )
- sys_superpsw=superpsw
- return
- end if
- end event
- type cb_undo from uo_imflatbutton within w_userinfo_def
- integer x = 329
- integer width = 165
- integer height = 172
- integer taborder = 120
- boolean enabled = false
- string text = "放弃"
- string normalpicname = "undo.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;Long currentrow
- currentrow = dw_1.GetRow()
- IF currentrow >= 1 THEN
- sle_id.Text = dw_1.Object.u_user_userid[currentrow]
- sle_xm.Text = dw_1.Object.username[currentrow]
- sle_dscrp.Text = dw_1.Object.descrp[currentrow]
-
- WF_REFRESH()
- END IF
- dw_edit_mode = FALSE
- WF_LOCKFACE()
- modisign = FALSE
- end event
- type cb_paste from uo_imflatbutton within w_userinfo_def
- integer x = 1440
- integer width = 261
- integer height = 172
- integer taborder = 90
- string text = "粘贴权限"
- string normalpicname = "paste.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;wf_pasteright()
- end event
- type cb_copy from uo_imflatbutton within w_userinfo_def
- integer x = 1179
- integer width = 261
- integer height = 172
- integer taborder = 80
- string text = "复制权限"
- string normalpicname = "copy.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;wf_copyright()
- end event
- type cb_setpws from uo_imflatbutton within w_userinfo_def
- integer x = 1701
- integer width = 261
- integer height = 172
- integer taborder = 100
- string text = "恢复密码"
- string normalpicname = "update.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;IF Trim(sle_id.Text) = sys_super_id THEN
- MessageBox("提示",'超级用户记录不能修改!', Information!, OK! )
- RETURN
- END IF
- Int i
- i = MessageBox("提示",'你确定将用户'+is_id+ '的密码恢复吗?',Question!,yesno!,2)
- IF i = 2 THEN
- RETURN 1
- END IF
- String arg_msg
- uo_user.reset_userpwd(sys_scid,ins_empid,Trim(sle_id.Text),arg_msg)
- MessageBox("提示",arg_msg, Information!, OK! )
- end event
- type cb_select_emp from uo_imflatbutton within w_userinfo_def
- integer x = 658
- integer width = 261
- integer height = 172
- integer taborder = 70
- string text = "选择员工"
- string normalpicname = "find2.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;if not isvalid(w_empinfo_choice) then
- s_empselect_open strans
- OPENwithparm(w_empinfo_choice,strans)
- s_empselect s_select
- s_select=Message.PowerObjectParm //接受返回结构
- IF s_select.empid>0 THEN
- ins_empid=s_select.empid
- sle_id.text=s_select.empcode
- sle_xm.text=s_select.empname
- END IF
- end if
- end event
- type dw_1 from u_dw_rbtnfilter within w_userinfo_def
- integer y = 564
- integer width = 1513
- integer height = 1612
- string dataobject = "dw_userdef_sp1"
- boolean hscrollbar = true
- boolean vscrollbar = true
- end type
- event clicked;call super::clicked;if not dw_edit_mode then THIS.SETROW(ROW)
- end event
- event rowfocuschanged;IF currentrow <= 0 THEN RETURN
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(currentrow,TRUE)
- IF dw_1.GetRow() > 0 THEN
- is_id = THIS.Object.u_user_userid[dw_1.GetRow()]
- ins_empid = THIS.Object.empid[dw_1.GetRow()]
- sle_id.Text = is_id
- sle_xm.Text = THIS.Object.username[dw_1.GetRow()]
- sle_dscrp.Text = THIS.Object.descrp[dw_1.GetRow()]
- sle_cardno.Text = f_psw_bczh(THIS.Object.cardno[dw_1.GetRow()],1,sys_power_key)
- cbx_usecard.Checked = THIS.Object.ifusecard[dw_1.GetRow()] = 1
- cbx_ifnotin.Checked = THIS.Object.ifnotin[dw_1.GetRow()] = 1
- cbx_ifphone.Checked = THIS.Object.ifphone[dw_1.GetRow()] = 1
-
- CHOOSE CASE THIS.Object.dlflag[dw_1.GetRow()]
- CASE 0
- ddlb_dlflag.text = '单口令'
- case 1
- ddlb_dlflag.text = '单指纹'
- case 2
- ddlb_dlflag.text = '口令+指纹'
- END CHOOSE
- wf_refresh()
- END IF
- end event
- event rowfocuschanging;if dw_edit_mode then return 1
- end event
- event constructor;call super::constructor; titleclick_sort_use=true //单击标题排序功能开关
- RBUTTON_FILTER_USE=true //右键查询功能开关
- end event
- type sle_dscrp from singlelineedit within w_userinfo_def
- integer x = 270
- integer y = 464
- integer width = 1230
- integer height = 92
- integer taborder = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean autohscroll = false
- borderstyle borderstyle = stylelowered!
- end type
- type st_3 from statictext within w_userinfo_def
- integer x = 23
- integer y = 480
- integer width = 261
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 16711680
- long backcolor = 134217739
- boolean enabled = false
- string text = "备 注:"
- boolean focusrectangle = false
- end type
- type sle_xm from singlelineedit within w_userinfo_def
- integer x = 270
- integer y = 284
- integer width = 530
- integer height = 92
- integer taborder = 40
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean autohscroll = false
- integer limit = 10
- boolean displayonly = true
- borderstyle borderstyle = stylelowered!
- end type
- type sle_id from singlelineedit within w_userinfo_def
- integer x = 270
- integer y = 188
- integer width = 530
- integer height = 92
- integer taborder = 30
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean autohscroll = false
- integer limit = 10
- boolean displayonly = true
- borderstyle borderstyle = stylelowered!
- end type
- type st_2 from statictext within w_userinfo_def
- integer x = 23
- integer y = 300
- integer width = 293
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 16711680
- long backcolor = 134217739
- boolean enabled = false
- string text = "用户姓名:"
- boolean focusrectangle = false
- end type
- type st_1 from statictext within w_userinfo_def
- integer x = 23
- integer y = 204
- integer width = 288
- integer height = 60
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 16711680
- long backcolor = 134217739
- boolean enabled = false
- string text = "用户代码:"
- boolean focusrectangle = false
- end type
- type cb_end from uo_imflatbutton within w_userinfo_def
- integer x = 2126
- integer width = 165
- integer height = 172
- integer taborder = 110
- boolean bringtotop = true
- string text = "退出"
- string normalpicname = "exit.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;close(parent)
- end event
- type cb_del from uo_imflatbutton within w_userinfo_def
- integer x = 494
- integer width = 165
- integer height = 172
- integer taborder = 140
- string text = "删除"
- string normalpicname = "delete.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;int i
- if trim(sle_id.text)=sys_super_id then
- messagebox(publ_operator,'超级用户记录不能删除!')
- return
- END IF
- i=messagebox(publ_operator,'你确定将用户'+is_id+ '删除吗?',Question!,yesno!,2)
- if i=2 then
- return 1
- end if
- long ll_row
- string arg_msg
- ll_row=dw_1.getrow()
- if ll_row=0 then return
- if uo_user.deluser(false,sys_scid,ins_empid,arg_msg,true)=0 then
- messagebox('错误','删除用户'+is_id+'资料失败>>'+arg_msg, StopSign!, OK! )
- return
- end if
- dw_1.deleterow(0)
- dw_1.triggerevent(rowfocuschanged!)
- end event
- type cb_mod from uo_imflatbutton within w_userinfo_def
- integer x = 165
- integer width = 165
- integer height = 172
- integer taborder = 160
- string text = "修改"
- string normalpicname = "open.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;
- IF dw_edit_mode THEN //保存
- String ls_str,ls_storage_str,ls_sc_str,ls_areastr
- String ls_id,ls_name,ls_pass,ls_dscrp,ls_cardno,ls_showdate
- Long ll_row,i,ll_findrow
- String arg_msg
- String ls_classeditstr,ls_classviewstr
- String ls_xls_printstr,ls_xls_sendstr
- String ls_spttypestr
- String ls_plugins_str
- String ls_reportstr
- String ls_accountstr
- String ls_outrepstr
- Int li_ifnotin = 0
- Int li_dlflag = 0
- Int li_ifphone = 0
-
- ls_id = Trim(sle_id.Text)
- IF ls_id = "" THEN
- MessageBox("提示","必须填写用户代码!", Information!, OK! )
- sle_id.SetFocus()
- RETURN
- END IF
-
- ls_name = Trim(sle_xm.Text)
- IF ls_name = "" THEN
- MessageBox("提示","必须填写用户姓名!", Information!, OK! )
- sle_xm.SetFocus()
- RETURN
- END IF
- ls_dscrp = Trim(sle_dscrp.Text)
- ls_cardno = Trim(sle_cardno.Text)
-
- CHOOSE CASE ddlb_dlflag.Text
- CASE '单口令'
- li_dlflag = 0
- CASE '单指纹'
- li_dlflag = 1
- CASE '口令+指纹'
- li_dlflag = 2
- END CHOOSE
-
-
- ls_str = wf_getright() //get the user-right string
- ls_areastr = wf_getarea() //get the user-area string
-
- IF sys_option_cusarea = 0 THEN ls_areastr = '0'
- IF cbx_ifnotin.Checked THEN li_ifnotin = 1
- IF cbx_ifphone.Checked THEN li_ifphone = 1
-
- ls_storage_str = wf_get_storage() //get the user-storage string
- ls_sc_str = wf_get_sc()//get the user-sc string
- ls_spttypestr = wf_get_spttype() //get the user-spttype string
-
- wf_get_class(ls_classeditstr,ls_classviewstr)
- wf_get_xlspowerstr(ls_xls_printstr,ls_xls_sendstr)
- wf_get_plugins(ls_plugins_str)
- wf_get_report(ls_reportstr)
- wf_get_account(ls_accountstr)
- wf_get_outrep(ls_outrepstr)
-
- IF uo_user.saveuser(modisign,sys_scid,ins_empid,ls_id,ls_name,&
- ls_cardno,ls_dscrp,ls_str,ls_storage_str,ls_sc_str,ls_areastr,&
- ls_classeditstr,ls_classviewstr,ls_xls_printstr,ls_xls_sendstr,&
- ls_spttypestr,ls_plugins_str,ls_reportstr,li_ifnotin,li_dlflag,&
- arg_msg,TRUE,ls_accountstr,ls_outrepstr,li_ifphone) = 0 THEN
- MessageBox(publ_operator,arg_msg)
- RETURN
- END IF
-
- dw_1.Retrieve(sys_scid)
- ll_findrow = dw_1.Find("empid="+String(ins_empid),1,dw_1.RowCount())
- IF ll_findrow > 0 THEN
- dw_1.SelectRow(0,FALSE)
- dw_1.SetRow(ll_findrow)
- dw_1.SelectRow(ll_findrow,TRUE)
- END IF
- MessageBox("提示",'用户资料已经成功更新!', Information!, OK! )
-
- modisign = FALSE
- dw_edit_mode = FALSE
- WF_LOCKFACE()
-
- ELSE //修改
- IF Trim(sle_id.Text) = sys_super_id THEN
- MessageBox("提示",'超级用户记录不能修改!', Information!, OK! )
- RETURN
- END IF
-
- IF dw_1.GetRow() <= 0 THEN
- MessageBox("提示",'没有修改对象!', Information!, OK! )
- RETURN
- END IF
-
- dw_edit_mode = TRUE
- modisign = TRUE
- wf_lockface()
-
- // is_id = dw_1.Object.u_user_userid[dw_1.GetRow()]
- sle_id.SetFocus()
- END IF
- end event
- type cb_add from uo_imflatbutton within w_userinfo_def
- integer width = 165
- integer height = 172
- integer taborder = 170
- string text = "增加"
- string normalpicname = "new.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- event clicked;call super::clicked;int cnt,i,j,k
- long ll_handl
- ll_handl = tv_func.finditem(RootTreeItem!,0)
- if ll_handl > 0 then wf_clear_tvchild(ll_handl)
- ll_handl = tv_cusarea.finditem(RootTreeItem!,0)
- if ll_handl > 0 then wf_clear_tvchild_area(ll_handl)
- for j=1 to dw_2.rowcount()
- dw_2.object.choice[j]=0
- next
- for k=1 to dw_3.rowcount()
- dw_3.object.choice[k]=0
- next
- dw_edit_mode=true
- wf_lockface()
- sle_id.text=""
- sle_xm.text=""
- sle_cardno.TEXT=''
- sle_dscrp.text=""
- sle_id.setfocus()
- cb_select_emp.triggerevent(clicked!)
- end event
- type ln_bar from line within w_userinfo_def
- long linecolor = 268435456
- integer linethickness = 4
- integer beginy = 176
- integer endx = 3323
- integer endy = 176
- end type
- type ln_bar2 from line within w_userinfo_def
- long linecolor = 16777215
- integer linethickness = 4
- integer beginy = 180
- integer endx = 3323
- integer endy = 180
- end type
- type r_bar from rectangle within w_userinfo_def
- long linecolor = 16777215
- long fillcolor = 1073741824
- integer x = 3122
- integer width = 73
- integer height = 172
- end type
- event constructor;this.fillcolor = 14215660
- this.linecolor = 14215660
- this.x = -1
- this.y = -1
- this.height = ln_bar2.beginy - 5
- end event
|