Package realcix20.guis.utils

Source Code of realcix20.guis.utils.TxtManager

/*���ܼ�飄1�7
*��TXT���ڹ�ʻ���TxtManager���ID�����Դ�TXT��4ȡ�ù�ʻ��ı��ᅣ1�7
*/
package realcix20.guis.utils;

import java.sql.ResultSet;

import realcix20.utils.DAO;
import realcix20.utils.GlobalValueManager;
import realcix20.utils.Resources;

public class TxtManager {  
   
    //���TXTID��ָ������4ȡ�ù�ʻ��ı��ᅣ1�7
    public static String getTxt(String txtId, String lang) {
        String txt = txtId;      
        final DAO dao = DAO.getInstance();                 
        dao.query(Resources.SELECT_TXT_TABLE_SQL);
        dao.setString(1, txtId);
        dao.setString(2, lang);
        ResultSet rs = dao.executeQuery();
        try {
            if (rs.next()) {
                txt = rs.getString("LONG");
            } else {
                dao.query(Resources.SELECT_TXT_TABLE_SQL);
                dao.setString(1, txtId);
                dao.setString(2, "EN");
                rs = dao.executeQuery();
                if (rs.next()) {
                    txt = rs.getString("LONG");
                }
            }
            rs.close();
        } catch (Exception e) {
            e.printStackTrace();
        }      
        return txt;
    }
   
    //���TXTID��ϵͳ����4ȡ�ù�ʻ��ı��ᅣ1�7
    public static String getTxt(String txtId) {
        String txt = getTxt(txtId, GlobalValueManager.getApplicationLang());
        return txt;
    }       
   
}
TOP

Related Classes of realcix20.guis.utils.TxtManager

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.