/**
* Create database structures and save initial data.
*/
private boolean saveSettings() {
DbConnVO dbConnVO = createConn();
dbConnVO.setCompanyCode(companyCodeTF.getText().trim());
dbConnVO.setCompanyDescription(companyDescrTF.getText().trim());
dbConnVO.setLanguageCode(languageCodeTF.getText().trim());
dbConnVO.setLanguageDescription(languageDescrTF.getText().trim());
dbConnVO.setCurrencyCodeREG03(currencyCodeTF.getText().toUpperCase().trim());
dbConnVO.setCurrencySymbolREG03(symbTF.getText().trim().length()>3?symbTF.getText().trim().substring(0,3):symbTF.getText().trim());
dbConnVO.setDecimalsREG03(new BigDecimal(decTF.getText().trim()));
dbConnVO.setDecimalSymbolREG03(decSymTF.getText().trim().substring(0,1));
dbConnVO.setThousandSymbolREG03(thTF.getText().trim().substring(0,1));
if (controlVar1.getValue()==null || controlVar1.getValue().toString().trim().equals(""))
dbConnVO.setVariant1("*");
else
dbConnVO.setVariant1(controlVar1.getValue().toString().trim());
if (controlVar2.getValue()==null || controlVar2.getValue().toString().trim().equals(""))
dbConnVO.setVariant2("*");
else
dbConnVO.setVariant2(controlVar2.getValue().toString().trim());
if (controlVar3.getValue()==null || controlVar3.getValue().toString().trim().equals(""))
dbConnVO.setVariant3("*");
else
dbConnVO.setVariant3(controlVar3.getValue().toString().trim());
if (controlVar4.getValue()==null || controlVar4.getValue().toString().trim().equals(""))
dbConnVO.setVariant4("*");
else
dbConnVO.setVariant4(controlVar4.getValue().toString().trim());
if (controlVar5.getValue()==null || controlVar5.getValue().toString().trim().equals(""))
dbConnVO.setVariant5("*");
else
dbConnVO.setVariant5(controlVar5.getValue().toString().trim());
dbConnVO.setUseVariantType1(varCheckBox1.isSelected()?"Y":"N");
dbConnVO.setUseVariantType2(varCheckBox2.isSelected()?"Y":"N");
dbConnVO.setUseVariantType3(varCheckBox3.isSelected()?"Y":"N");
dbConnVO.setUseVariantType4(varCheckBox4.isSelected()?"Y":"N");
dbConnVO.setUseVariantType5(varCheckBox5.isSelected()?"Y":"N");
if (clientLanguageCodeComboBox.getSelectedIndex()==0)
dbConnVO.setClientLanguageCode("EN");
else if (clientLanguageCodeComboBox.getSelectedIndex()==1)
dbConnVO.setClientLanguageCode("IT");
else if (clientLanguageCodeComboBox.getSelectedIndex()==2)
dbConnVO.setClientLanguageCode("ES");
else if (clientLanguageCodeComboBox.getSelectedIndex()==3)
dbConnVO.setClientLanguageCode("PTBR");
else if (clientLanguageCodeComboBox.getSelectedIndex()==4)
dbConnVO.setClientLanguageCode("DE");
else if (clientLanguageCodeComboBox.getSelectedIndex()==5)
dbConnVO.setClientLanguageCode("HR");
else
dbConnVO.setClientLanguageCode("RU");
dbConnVO.setAdminPassword(adminPasswdTF.getText().trim());
Response response = ClientUtils.getData("createConfigFile",dbConnVO);
if (response.isError()) {
JOptionPane.showMessageDialog(
this,
response.getErrorMessage(),