use of org.openmrs.ui.framework.fragment.action.FailureResult in project openmrs-module-pihcore by PIH.
the class AccountFragmentController method unlock.
public FragmentActionResult unlock(@RequestParam("personId") Person person, @SpringBean("accountService") AccountService accountService, UiUtils ui) {
try {
AccountDomainWrapper account = accountService.getAccountByPerson(person);
account.unlock();
return new SuccessResult(ui.message("emr.account.unlocked.successMessage"));
} catch (Exception e) {
return new FailureResult(ui.message("emr.account.unlock.failedMessage"));
}
}
Aggregations