Home > database >  This event is wrong in where?
This event is wrong in where?

Time:09-27

/*
Magnetic card patient handling
*/
String ls_ckh
Ls_ckh=trim (this text)
Long ll_brid
A decimal ldc_ghidck

//
If ls_ckh="or" IsNull (ls_ckh) then
This. The text=""
Return
End the if

The select brid into: ll_brid
The from xt_brxx
Where CKH=: ls_ckh and tybz=0;

If not the sqlca. Sqlcode=0 then
MessageBox (" error ", "invalid card number!" , StopSign!)
This. The text=""
This. Post setfocus ()
Return
End the if

The select Max (ghid) into: ldc_ghidck
The from gh_ghxx
Where the brid=: ll_brid
And (yghid=0 or yghid is null)
And ghyxq & gt;=getdate ();

If (not the sqlca. Sqlcode=0) or isnull (ldc_ghidck) or ldc_ghidck=0 then
Messagebox (" prompt ", "the card the patient did not register!" )
This. The text=""
This. Post setfocus ()
Return
End the if



W_mys_ysgzz w

//w=this. Parentwindow
W.w f_select_br (ldc_ghidck)
================================
After the operation, the "Null object reference at the line" mistake,,,,, the compiler can compile,

CodePudding user response:

W_mys_ysgzz w

//w=this. Parentwindow
W.w f_select_br (ldc_ghidck)

The last line of code wrong, you blocked w=this. Parentwindow, w just defines hasn't been initialized, so it was a null object, must instantiate it or point to a window to just go ~ ~

CodePudding user response:

//w=this. Parentwindow
Without blocking the line, the "incomptible property parentwindow for type sle_ckh" mistake,,,,

CodePudding user response:

Don't know you this. What's the relationship between parentwindow and w_mys_ysgzz

W_mys_ysgzz w

W=Create w_mys_ysgzz
W.w f_select_br (ldc_ghidck)
Destory w

So write should can solve your problem, feel so use function high coupling efficiency lowers

In addition: this. Use parentwindow so right, don't see there is such a property?

F1 inside to the function of syntax is
The Description

Obtains the parent window of a window.

Controls,

The Window objects

Syntax

Windowname. ParentWindow ()

CodePudding user response:

All events is a single line edit (sle_ckh) user events ue_change inside,,,,,,,
  • Related