<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>¼ÆËã»úÊÀ½çÈ«ÎļìË÷½á¹û</TITLE>
<META NAME="GENERATOR" CONTENT="Mozilla/3.0Gold (WinNT; I) [Netscape]">
</HEAD>
<BODY TEXT="#237654" BGCOLOR="#FFFFFF" LINK="#237654" VLINK="#990076">
<DIV ALIGN=right><P>1996Äê .µÚ50ÆÚ
.Èí¼þÓë±à³Ì
</P></DIV>
<P>
<HR size=5></P>
<P><I>±à³Ì¼¼ÇÉ </I></P>
<P>
<HR></P>
<H2 ALIGN=CENTER>PowerBuilderÓ¦Óÿª·¢ÏµÁн²×ù(7)
</H2>
<H1 ALIGN=CENTER>ÀûÓÃSetActionCodeº¯Êý¿ØÖÆDataWindow
</H1>
<DIV ALIGN=right><P><I>»ªÌìм¼Êõ¿ª·¢¹«Ë¾¡¡ÕŽ¡×Ë
</I></P></DIV>
<DD>DataWindow¿Ø¼þµÄһЩʼþÓÐÒ»¸ö¶¯×÷Âë²Ù×ÝÕâ¸öʼþÖ®ºóµÄȱʡ¶¯×÷¡£ÔÚPow-erBuilder
4.0ÖÐÎÒÃÇ¿ÉÒÔʹÓÃSetAction-Codeº¯Êý,À´ÉèÖÃÕâ¸ö¶¯×÷ÂëµÄÖµÒÔ¿ØÖÆÔÚÕâЩʼþ·¢ÉúºóµÄ´¦Àí¹ý³Ì¡£(ÔÚPowerBuilder
5.0ÖÐ,ÓÉÓÚʼþ¿ÉÒÔÓзµ»ØÊýÖµ,ËùÒÔ²ÉÓ÷µ»ØÒ»¸öÕûÐÍÊýÖµÀ´È¡´úSetActionCodeº¯Êý,±ÈÈçʹÓÃreturn
1È¡´úSetActionCode(1),µ«»ù±¾µÄʹÓùæÔòÁ½ÕßÊÇÏàͬµÄ¡£)DataWindow¿Ø¼þÖÐÏÂÁÐʼþʹÓö¯×÷Âë:</DD>
<DD>CLICKED</DD>
<DD>DBERROR</DD>
<DD>ITEMCHANGED</DD>
<DD>ITEMERROR</DD>
<DD>PRINTPAGE</DD>
<DD>RETRIEVEROW</DD>
<DD>RETRIEVESTART</DD>
<DD>UPDATESTART</DD>
<DD>ÓÐЧµÄ¶¯×÷ÂëÖµºÍÓ¦µ±µÄ´¦Àí¹ý³ÌËæʼþµÄ²»Í¬¶ø²»Í¬¡£</DD>
<H4 ALIGN=CENTER>Clicked Event </H4>
<DD>ÎÞÂÛºÎʱ,µ±Óû§ÔÚDataWindow¿Ø¼þÉϵã»÷ʱ,CLICKEDʼþ±»´¥·¢¡£Èç¹ûµã»÷ÔÚÒ»¸öÓÐЧµÄÐÐÉÏ,ÄÇôDataWindow½«×Ô¶¯°Ñ´ËÐÐ×÷Ϊµ±Ç°ÐС£Èç¹ûÄã²»Ïë»»ÐÐ,¾Í¿ÉÒÔʹÓÃSetActionCodeÀ´Í£Ö¹¡£</DD>
<DD>0 ½øÐл»ÐкÍCLICKEDʼþ¡£(ȱʡ)</DD>
<DD>1 Í£Ö¹´¦ÀíCLICKEDʼþ¡£</DD>
<DD>ÀýÈç:ÏÂÃæÒ»¶Î´úÂëÖ»ÔÊÐíÓû§µã»÷ÔÚ×Ô¼ºµÄÓû§ºÅÉÏ¡£</DD>
<DD>//Clicked Event</DD>
<DD>//We'll assume there is an instance variable with the current user's</DD>
<DD>//User ID:string is_user_id</DD>
<DD>long ll_row</DD>
<DD>string ls_user_id</DD>
<DD>ll_row =GetClickedRow()</DD>
<DD>//No need to continue if the user didn't click on a valid row</DD>
<DD>if ll_row£¼1 then</DD>
<DD>return</DD>
<DD>end if</DD>
<DD>ls_user_id=GetItemString(11_row,"user_id")</DD>
<DD>//If the user_id is not the current user then disallow row change</DD>
<DD>if ls-user-id£¼£¾is-user-id then</DD>
<DD>beep(1)</DD>
<DD>SetActionCode(1)</DD>
<DD>return</DD>
<DD>end if</DD>
<H4 ALIGN=CENTER>ItemChanged Event </H4>
<DD>DataWindow ITEMCHANGEDʼþ¿ÉÒÔÓм¸ÖÖ²»Í¬µÄ²Ù×÷:½ÓÊÜÇ°Ò»×ֶεÄÐÂÖµ,ÒòÓдíÎó¶ø¾Ü¾ø½ÓÊÜÐÂÖµ,¾Ü¾øÐÂÖµµ«ÊǼÌÐøÆäËüµÄ´¦Àí¹ý³Ì¡£ÕâЩֵÈçÏÂ:</DD>
<DD>0 ½ÓÊÜеÄÊý¾ÝÖµ¡£(ȱʡ)</DD>
<DD>1 ¾Ü¾øеÄÊý¾ÝÖµ¡£(Æô¶¯ItemEr-rorʼþ)</DD>
<DD>2 ¾Ü¾øеÄÊý¾ÝÖµµ«Êǽ¹µã¸Ä±ä¡£</DD>
<DD>ÔÚITEMCHANGEDʼþÖÐʹÓÃSetAction-Codeº¯Êý¿ÉÒÔ½øÐжà×ֶεĽ»²æÈ·ÈÏ¡£ÀýÈç,ÒøÐÐϵͳÖÐΪȷÈÏAccount
StatusÊÇ·ñ¿ÉÒÔתΪInactive,¾ÍÐè¼ìÑ&e