public static String getLabel(int id) { CodeDescription temp = getCodeDesc(id); if (temp == null) { return(""); } return((Constants.isThaiLanguage()) ? temp.descriptionTH : temp.descriptionEN); }
public static CodeDescription getCodeDesc(int id) { CodeDescription temp = TempDB.codeDescriptions.Find(s => s.id == id); if (temp == null) { temp = TempDB.codeDescriptions.Find(s => s.id == Constants.ERROR_DEFAULT_ID); } return(temp); }
public UIReturn(bool isSuccess, int id) { this.id = id; this.isSuccess = isSuccess; CodeDescription codeDesc = Utils.getCodeDesc(id); this.code = codeDesc.code; this.codeValue = codeDesc.codeValue; this.descriptionTH = codeDesc.descriptionTH; this.descriptionEN = codeDesc.descriptionEN; }
public UIReturn(HeaderResponse header) { this.id = header.id; this.isSuccess = header.isSuccess; CodeDescription codeDesc = Utils.getCodeDesc(header.id); this.code = codeDesc.code; this.codeValue = codeDesc.codeValue; this.descriptionTH = codeDesc.descriptionTH; this.descriptionEN = codeDesc.descriptionEN; }