public static void createTaxDepPartner(Row taxDepRow) {
String ns = "TAX";
String co = ObjectUtil.findNewCell(taxDepRow, "TAXDEP", "CO").getColumnValue().toString();
String taxDep = ObjectUtil.findNewCell(taxDepRow, "TAXDEP", "TAXDEP").getColumnValue().toString();
String p = co + "." + taxDep;
DAO dao = DAO.getInstance();
dao.update(Resources.INSERT_P_SQL);
dao.setString(1, ns);
dao.setString(2, p);
dao.setObject(3, null);
dao.setObject(4, null);
dao.setObject(5, null);
dao.setObject(6, null);
dao.setString(7, co);
dao.executeUpdate();
String defpa = "1";
String ownername = p;
String apLD = UserClass.getDEFLD("AP");
String txt256 = TxtManager.getTxt("VIEW.OBJECTEDIT.RUSER.DEFAULTACCOUNT");
PrivateKey prikey = null;
PublicKey pubkey = null;
try {
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
keyGen.initialize(1024);
KeyPair key = keyGen.generateKeyPair();
prikey = key.getPrivate();
pubkey = key.getPublic();
} catch (Exception e) {
e.printStackTrace();
}
boolean block = false;
dao.update(Resources.INSERT_PA_SQL);
dao.setObject(1, ns);
dao.setObject(2, p);
dao.setObject(3, defpa);
dao.setObject(4, ownername);
dao.setObject(5, null);
dao.setObject(6, apLD);
dao.setObject(7, txt256);
dao.setObject(8, prikey);
dao.setObject(9, pubkey);
dao.setObject(10, block);
dao.executeUpdate();
}