Beispiel #1
0
        public static String getLabel(int id)
        {
            CodeDescription temp = getCodeDesc(id);

            if (temp == null)
            {
                return("");
            }
            return((Constants.isThaiLanguage()) ? temp.descriptionTH : temp.descriptionEN);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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;
        }
Beispiel #4
0
        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;
        }