*
* @throws InterruptedException
*/
private void doDelete() throws InterruptedException {
final SecUser anUser = getUser();
// Show a confirm box
String msg = Labels.getLabel("message.Question.Are_you_sure_to_delete_this_record") + "\n\n --> " + anUser.getUsrLoginname() + " | " + anUser.getUsrFirstname() + " ,"
+ anUser.getUsrLastname();
String title = Labels.getLabel("message.Deleting.Record");
MultiLineMessageBox.doSetTemplate();
if (MultiLineMessageBox.show(msg, title, MultiLineMessageBox.YES | MultiLineMessageBox.NO, MultiLineMessageBox.QUESTION, true, new EventListener() {
@Override
public void onEvent(Event evt) {
switch (((Integer) evt.getData()).intValue()) {
case MultiLineMessageBox.YES:
deleteUser();
case MultiLineMessageBox.NO:
break; //
}
}
private void deleteUser() {
/**
* Prevent the deleting of the demo users
*/
try {
if (anUser.getId() <= 14 && anUser.getId() >= 10) {
ZksampleMessageUtils.doShowNotAllowedForDemoRecords();
return;
} else {
// delete from database