#include <WScom.h>
#include <WSCfunctionList.h>
#include <WSCbase.h>
//----------------------------------------------------------
//Function for the event procedure
//----------------------------------------------------------
#include <newwin000.h>

void dbselect(WSCbase* object){
  //do something...
  long val  = newradi_011->getProperty(WSNvalue);
  if (val == 0 || val== 1){
    newvlab_002->setProperty(WSNlabelString,"DSN:");
    newvifi_004->setSensitive(False);
    newvifi_004->setProperty(WSNbackColor,WS_DF_BACKCOLOR);
    newvifi_001->setSensitive(False);
    newvifi_001->setProperty(WSNbackColor,WS_DF_BACKCOLOR);
    newvdb__000->setProperty(WSNtype,WS_DB_ODBC);
  }else{
    newvlab_002->setProperty(WSNlabelString,"HostName:");
    newvifi_004->setSensitive(True);
    newvifi_004->setProperty(WSNbackColor,WS_DF_WORKBACKCOLOR);
    newvifi_001->setSensitive(True);
    newvifi_001->setProperty(WSNbackColor,WS_DF_WORKBACKCOLOR);
    newvdb__000->setProperty(WSNtype,WS_DB_POSTGRES);
  }
}
static WSCfunctionRegister  op("dbselect",(void*)dbselect);
