&& (clsId != 190)
&& (clsId != 539)
&& (clsId != 230)
&& (clsId != 270) ) {
XTable objectViewTable = container.getObjectViewTable();
CacheTableModel model = (CacheTableModel)objectViewTable.getTable().getModel();
int selectedRowNumber = objectViewTable.getTable().getSelectedRow();
//fix give all selections to Reg delete
int[] selectedRowNumbers = objectViewTable.getTable().getSelectedRows();
if ( (selectedRowNumber != -1) && (!model.isNoRow()) ) {
Vector values = new Vector();
for (int i = 1; i < model.getColumnCount(); i++) {
String tableName = model.getColumn(i).getTableName();
String columnName = model.getColumn(i).getColumnName();
Item item = (Item)model.getValueAt(selectedRowNumber, i);
Cell cell = new Cell(tableName, columnName, item.getFactValue());
values.add(cell);
}
Row row = new Row(values, container.getCurrentObject().getRowType());
//specify,used by BudgetSettingClass
if (getContainer().getCurrentObject() instanceof BudgetSettingClass) {
if ((DialogManager.showYesNoDialog(getContainer(), TxtManager.getTxt("BUDGETSETTING.DELETEALERT"))) == 0) {
container.getCurrentObject().classDelete_WholeObject(row);
((BudgetSettingClass)getContainer().getCurrentObject()).deleteAllRelateItems(row);
container.updateObjectViewTable();
}
}
//specify,used by TaxTypeClass
else if (getContainer().getCurrentObject() instanceof TaxTypeClass) {
if ( ((TaxTypeClass)getContainer().getCurrentObject()).validateDelete(row, getContainer()) ) {
if ( (DialogManager.showYesNoDialog(getContainer(), TxtManager.getTxt("MAINFRAME.DELETE.CONFIRM"))) == 0) {
getContainer().getCurrentObject().classDelete_WholeObject(row);
container.updateObjectViewTable();
}
}
}
//specify,used by UserClass
else if (getContainer().getCurrentObject() instanceof UserClass) {
if ( ((UserClass)getContainer().getCurrentObject()).validateDelete(row, getContainer()) ) {
if ( (DialogManager.showYesNoDialog(getContainer(), TxtManager.getTxt("MAINFRAME.DELETE.CONFIRM"))) == 0) {
((UserClass)getContainer().getCurrentObject()).deleteDependThings(row);
getContainer().getCurrentObject().classDelete_WholeObject(row);
container.updateObjectViewTable();
}
}
}
//specify,used by AnaTypeClass
else if (getContainer().getCurrentObject() instanceof AnaTypeClass) {
if ( ((AnaTypeClass)getContainer().getCurrentObject()).validateDelete(row, getContainer()) ) {
if ( (DialogManager.showYesNoDialog(getContainer(), TxtManager.getTxt("MAINFRAME.DELETE.CONFIRM"))) == 0) {
((AnaTypeClass)getContainer().getCurrentObject()).deleteDependThings(row);
getContainer().getCurrentObject().classDelete_WholeObject(row);
container.updateObjectViewTable();
}
}
}
//specify,used by UomClass
else if (getContainer().getCurrentObject() instanceof UomClass) {
if ( ((UomClass)getContainer().getCurrentObject()).validateDelete(row, getContainer()) ) {
if ( (DialogManager.showYesNoDialog(getContainer(), TxtManager.getTxt("MAINFRAME.DELETE.CONFIRM"))) == 0) {
getContainer().getCurrentObject().classDelete_WholeObject(row);
container.updateObjectViewTable();
}
}
}
//specify,used by LedgerClass
else if (getContainer().getCurrentObject() instanceof LedgerClass) {
if ( ((LedgerClass)getContainer().getCurrentObject()).validateDelete(row, getContainer()) ) {
if ( (DialogManager.showYesNoDialog(getContainer(), TxtManager.getTxt("MAINFRAME.DELETE.CONFIRM"))) == 0) {
getContainer().getCurrentObject().classDelete_WholeObject(row);
container.updateObjectViewTable();
}
}
}
//specify,used by FixedAssetClass
else if (getContainer().getCurrentObject() instanceof FixedAssetClass) {
if ( ((FixedAssetClass)getContainer().getCurrentObject()).validateDelete(row, getContainer()) ) {
if ( (DialogManager.showYesNoDialog(getContainer(), TxtManager.getTxt("MAINFRAME.DELETE.CONFIRM"))) == 0) {
getContainer().getCurrentObject().classDelete_WholeObject(row);
container.updateObjectViewTable();
}
}
}
//specify,used by NameSpaceClass
else if (getContainer().getCurrentObject() instanceof NameSpaceClass) {
if ( ((NameSpaceClass)getContainer().getCurrentObject()).validateDelete(row, getContainer()) ) {
if ( (DialogManager.showYesNoDialog(getContainer(), TxtManager.getTxt("MAINFRAME.DELETE.CONFIRM"))) == 0) {
getContainer().getCurrentObject().classDelete_WholeObject(row);
container.updateObjectViewTable();
}
}
}
//specify,used by PartnerClass
else if (getContainer().getCurrentObject() instanceof PartnerClass) {
if ( ((PartnerClass)getContainer().getCurrentObject()).validateDelete(row, getContainer()) ) {
if ( (DialogManager.showYesNoDialog(getContainer(), TxtManager.getTxt("MAINFRAME.DELETE.CONFIRM"))) == 0) {
((PartnerClass)getContainer().getCurrentObject()).deleteDependThings(row);
getContainer().getCurrentObject().classDelete_WholeObject(row);
container.updateObjectViewTable();
}
}
}
//specify,used by TaxDepClass
else if (getContainer().getCurrentObject() instanceof TaxDepClass) {
if ( ((TaxDepClass)getContainer().getCurrentObject()).validateDelete(row, getContainer()) ) {
if ( (DialogManager.showYesNoDialog(getContainer(), TxtManager.getTxt("MAINFRAME.DELETE.CONFIRM"))) == 0) {
((TaxDepClass)getContainer().getCurrentObject()).deleteDependThings(row);
getContainer().getCurrentObject().classDelete_WholeObject(row);
container.updateObjectViewTable();
}
}
}
//specify,used by InvestMarketClass
else if (getContainer().getCurrentObject() instanceof InvestMarketClass) {
if ( ((InvestMarketClass)getContainer().getCurrentObject()).validateDelete(row, getContainer()) ) {
if ( (DialogManager.showYesNoDialog(getContainer(), TxtManager.getTxt("MAINFRAME.DELETE.CONFIRM"))) == 0) {
getContainer().getCurrentObject().classDelete_WholeObject(row);
container.updateObjectViewTable();
}
}
}
//specify,used by InvestProductClass
else if (getContainer().getCurrentObject() instanceof InvestProductClass) {
if ( ((InvestProductClass)getContainer().getCurrentObject()).validateDelete(row, getContainer()) ) {
if ( (DialogManager.showYesNoDialog(getContainer(), TxtManager.getTxt("MAINFRAME.DELETE.CONFIRM"))) == 0) {
getContainer().getCurrentObject().classDelete_WholeObject(row);
container.updateObjectViewTable();
}
}
}
//specify,used by RegClass
//fix add batch delete
else if (getContainer().getCurrentObject() instanceof RegClass) {
if ((!model.isNoRow())&&(selectedRowNumbers.length>0)) {
Vector tablerows=new Vector();
deleteSelectSet.clear();
for (int j = 0; j < selectedRowNumbers.length; j++) {
Vector tablerow=new Vector();
Vector cells = new Vector();
for (int i = 1; i < model.getColumnCount(); i++) {
String tableName = model.getColumn(i).getTableName();
String columnName = model.getColumn(i).getColumnName();
Item item = (Item)model.getValueAt(selectedRowNumbers[j], i);
Cell cell = new Cell(tableName, columnName, item.getFactValue());
cells.add(cell);
}
Row regrow = new Row(cells, container.getCurrentObject().getRowType());
//TODO !!