loadExcems();
StateSaver.attachTo(this);
}
private void loadExcems() throws ClipsException {
ClientExemptionData chunk = clientLoc.getExemption();
if (chunk == null) {
labExemp.setText("Нет категории льготности");
return;
}
DirectoryExcemptionItem exemp = chunk.getExemption();
if (exemp != null && exemp.getID() != 0) {
labExemp.setText(exemp != null ? exemp.toString() : "...");
}
String ss = chunk.getDocName();
if (ss != null && !ss.trim().isEmpty()) {
labDocName.setText(ss);
}
ss = chunk.getDocSN();
if (ss != null && !ss.trim().isEmpty()) {
labDocSN.setText(ss);
}
if (chunk.getGspBegin() != null) {
labGspBegin.setText(Converter.dateToString(chunk.getGspBegin()));
}
if (chunk.getGspEnd() != null) {
labGspEnd.setText(Converter.dateToString(chunk.getGspEnd()));
}
if (chunk.hasRightNSU()) {
labNsuFlag.setText("Получает");
}
else {
labNsuFlag.setText("Не получает");
}
if (chunk.getNsuBegin() != null) {
labNsuBegin.setText(Converter.dateToString(chunk.getNsuBegin()));
}
if (chunk.getNsuEnd() != null) {
labNsuEnd.setText(Converter.dateToString(chunk.getNsuEnd()));
}
if (chunk.getRegBegin() != null) {
labRegBegin.setText(Converter.dateToString(chunk.getRegBegin()));
}
if (chunk.getRegEnd() != null) {
labRegEnd.setText(Converter.dateToString(chunk.getRegEnd()));
}
}