Example #1
0
/////////////////////////////////////////////////////////////////////////////
//
//    OPERATION: zwTZERRORD_SetCountError
//
//
/////////////////////////////////////////////////////////////////////////////
zOPER_EXPORT zSHORT /*DIALOG */  OPERATION
zwTZERRORD_SetCountError( zVIEW vSubtask )
{
   zVIEW     vTZERROR;
   zLONG     lCountError;
   zLONG     lCountWarning;
   zSHORT    nRC;
   zCHAR     szCount[ 10 ];
   zCHAR     szControlText[ 100 ];

   if ( GetViewByName( &vTZERROR, "TZERROR", vSubtask, zLEVEL_TASK ) < 0 )
      return( -1 );

   if ( CheckExistenceOfEntity( vTZERROR, "ErrorList" ) >= zCURSOR_SET )
   {
      // Set Count Errors to Textfield
      lCountError   = 0;
      lCountWarning = 0;

      for ( nRC = SetCursorFirstEntity( vTZERROR, "ErrorMsg", "" );
            nRC >= zCURSOR_SET;
            nRC = SetCursorNextEntity( vTZERROR, "ErrorMsg", "" ) )
      {
         if ( CompareAttributeToInteger( vTZERROR, "ErrorMsg", "Error",
                                         1 ) == 0 )
            lCountError++;
         else
            lCountWarning++;
      }

      zltoa( lCountError, szCount );
      zstrcpy( szControlText, "  " );
      zstrcat( szControlText, szCount );
      zstrcat( szControlText, " Error(s) " );

      if ( lCountWarning > 0 )
      {
         zltoa( lCountWarning, szCount );
         zstrcat( szControlText, ",  " );
         zstrcat( szControlText, szCount );
         zstrcat( szControlText, " Warning(s) " );
      }

      zstrcat( szControlText, "found" );
   }
   else
   {
      zstrcpy( szControlText, "  No Errors" );
   }

   SetCtrlText( vSubtask, "txtCountError", szControlText );
   return( 0 );

} // zwTZERRORD_SetCountError
Example #2
0
LRESULT CMainDlg::OnShowListCtrl(WPARAM wParam, LPARAM lParam)
{
	
		//更新数据
		if (wParam == WM_UPWALLET)
		{
			//隐藏"钱包正在同步"static
//			GetDlgItem(IDC_STATIC_WALLET)->ShowWindow(SW_HIDE);
		}else{
			SetCtrlText();
		}
		return 0 ;
}
Example #3
0
/////////////////////////////////////////////////////////////////////////////
//
//    OPERATION: zwTZCMRPTD_SetCPLR_Desc
//
//
/////////////////////////////////////////////////////////////////////////////
zOPER_EXPORT zSHORT /*DIALOG */  OPERATION
zwTZCMRPTD_SetCPLR_Desc( zVIEW vSubtask )
{
   zVIEW   vTZCMRPTO;
   zCHAR   szDesc[ 255 ];
   zCHAR   szControlText[270];

   if ( GetViewByName( &vTZCMRPTO, "TZCMRPTO", vSubtask, zLEVEL_TASK ) < 0 )
      return( -1 );

   GetStringFromAttribute( szDesc, vTZCMRPTO, "CPLR", "Desc" );
   zstrcpy( szControlText, " Desc: " );
   zstrcat( szControlText, szDesc );

   SetCtrlText( vSubtask, "txtDesc", szControlText );

   return( 0 );
} // zwTZCMRPTD_SetCPLR_Desc
Example #4
0
/////////////////////////////////////////////////////////////////////////////
//
//    OPERATION: zwTZCMRPTD_LoadNewAudittrail
//
/////////////////////////////////////////////////////////////////////////////
zOPER_EXPORT zSHORT /*DIALOG */  OPERATION
zwTZCMRPTD_LoadNewAudittrail( zVIEW vSubtask )
{
   zVIEW   vTZCMCPL;
   zVIEW   vTZBRAU2O;
   zVIEW   vParentWindow;
   zULONG  ulZKey;
   zULONG  ulZKeyCPLR;
   zCHAR   szName[ 33 ];
   zCHAR   szControlText[40];

   GetViewByName( &vTZCMCPL, "TZCMCPL", vSubtask, zLEVEL_TASK );

   GetIntegerFromAttribute( (zPLONG) &ulZKey, vTZCMCPL, "CPLR", "ZKey" );
   GetStringFromAttribute( szName, vTZCMCPL, "CPLR", "Name" );

   if ( GetViewByName( &vTZBRAU2O, "TZBRAU2O", vSubtask, zLEVEL_TASK ) > 0 )
   {
      GetIntegerFromAttribute( (zPLONG) &ulZKeyCPLR, vTZBRAU2O, "CPLR", "ZKey" );
      if ( ulZKey == ulZKeyCPLR )
         return( 0 );
      else
         DropObjectInstance( vTZBRAU2O );
   }

   if ( zwfnTZCMRPTD_LoadNewAudittrail( vSubtask, &vTZBRAU2O ) < 0 )
   {
      return( -1 );
   }

   GetStringFromAttribute( szName, vTZCMCPL, "CPL", "Name" );
   zstrcpy( szControlText, " CPL: " );
   zstrcat( szControlText, szName );
   SetCtrlText( vSubtask, "txtCPL", szControlText );

   GetParentWindow( &vParentWindow, vSubtask );
   RefreshCtrl( vParentWindow, "lbCPLRList" );

   return( 0 );
} // zwTZCMRPTD_LoadNewAudittrail