| | |
| | | package com.bsk.zhangbo.demoforbsk.service;
|
| | |
|
| | | import com.bsk.zhangbo.demoforbsk.ui.fragment.RegisterFragment;
|
| | | import com.bsk.zhangbo.demoforbsk.ui.fragment.VisitorRegisterFragment;
|
| | | import com.bsk.zhangbo.demoforbsk.util.AppApi;
|
| | |
|
| | | import org.xutils.http.RequestParams;
|
| | |
| | | public static List<String> countryWordList = new ArrayList<String>();
|
| | | public static HashMap<String,List<String>> countryData = new HashMap<String,List<String>>();
|
| | | public static String[] countryWordData = new String[]{};
|
| | | public static List<String> visitPurposeList = new ArrayList<String>();
|
| | |
|
| | | public void loadAllDictionaryData() {
|
| | | loadCountries();
|
| | | loadCredentialsList();
|
| | | loadSexList();
|
| | | loadVisitPurposeList();
|
| | | }
|
| | |
|
| | | public void loadCountries() {
|
| | |
| | |
|
| | | }
|
| | |
|
| | | private void loadVisitPurposeList() {
|
| | | RequestParams params = new RequestParams(AppApi.BASEURL+AppApi.DICTIONARY_TYPE_LIST);
|
| | | params.addParameter(Dictionary.FieldNames.type, CommonVariables.DictionaryType.VISIT_PURPOSE);
|
| | | x.http().get(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | List<Dictionary> items = getList(Dictionary.class);
|
| | | for (Dictionary item : items) {
|
| | | idMap.put(CommonVariables.DictionaryType.VISIT_PURPOSE+item.getName(), item.getId()+"");
|
| | | visitPurposeList.add(item.getName());
|
| | | }
|
| | | VisitorRegisterFragment.getInstance().setVisitPurposeList(visitPurposeList);
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | |
|
| | | }
|