|  |  | 
 |  |  |       else | 
 |  |  |       { | 
 |  |  |          KXMLDOMElement xframeElement = GetElement(); | 
 |  |  |          KXMLDOMElement agent = xframeElement.selectSingleNode(L"agent/" + xfNodeAgentArea + L"[1]/*"); | 
 |  |  |          //alert(m_configDoc.xml()); | 
 |  |  |          KXMLDOMElement agent = m_configDoc.selectSingleNode(L"Config/" + xfNodeAgentArea + L"[1]/*"); | 
 |  |  |          if (agent) | 
 |  |  |          { | 
 |  |  |             xstring s = agent.xml(); | 
 |  |  | 
 |  |  |             xml xi; | 
 |  |  |  | 
 |  |  |             xaserverarg argi; | 
 |  |  |             argi.setNativePointer(argi.CreateInstance()); | 
 |  |  | 				 | 
 |  |  |             if (xurl::get(L"QuickCode/ExchangeRate/import", argi.GetString(), xi) != 1) | 
 |  |  |             { | 
 |  |  |                trace(xi.text()); | 
 |  |  | 
 |  |  |       { | 
 |  |  |          p += L"&"; | 
 |  |  |          int i = 1; | 
 |  |  |          while (p.find(L"=L", 0) > 0) | 
 |  |  |          while (p.find(L"=", 0) > 0) | 
 |  |  |          { | 
 |  |  |             xstring name = p.mid(0, p.find(L"=L", 0)); | 
 |  |  |             xstring value = p.mid(p.find(L"=L", 0) + 1, p.find(L"&", 0) - p.find(L"=L", 0) - 1); | 
 |  |  |             xstring name = p.mid(0, p.find(L"=", 0)); | 
 |  |  |             xstring value = p.mid(p.find(L"=", 0) + 1, p.find(L"&", 0) - p.find(L"=", 0) - 1); | 
 |  |  |             if (name == n) return L"" + value; | 
 |  |  |             i += 1; | 
 |  |  |             p = p.mid(p.find(L"&", 0) + 1, p.length()); | 
 |  |  | 
 |  |  |    } | 
 |  |  |    int loaded() | 
 |  |  |    { | 
 |  |  | 		 | 
 |  |  |       getURLParam(); | 
 |  |  |       KXMLDOMDocument    ee = m_configDoc; | 
 |  |  |       xstring id = m_id; | 
 |  |  | 
 |  |  |  | 
 |  |  |       } | 
 |  |  |       m_dbmap = dbmap; | 
 |  |  |       dw_list = new xdwgrid; | 
 |  |  |       dw_list.setNativePointer(GetControl(dwname)); | 
 |  |  |       dw_list = GetControl(dwname); | 
 |  |  |       dw_list.openUrl(vface + L"/" + tpl); | 
 |  |  |       //dw_list.SetSelectionMode(4);                      | 
 |  |  |       return 1; | 
 |  |  | 
 |  |  |       xml x1; | 
 |  |  |  | 
 |  |  |       xaserverarg arg1; | 
 |  |  |       arg1.setNativePointer(arg1.CreateInstance()); | 
 |  |  | 		 | 
 |  |  |       arg1.AddArg(L"id", L"地区"); | 
 |  |  |       if (xurl::get(L"/sale/data/QuickCode/entity/list", arg1.GetString(), x1) != 1) | 
 |  |  |       { | 
 |  |  | 
 |  |  |       xml x2; | 
 |  |  |  | 
 |  |  |       xaserverarg arg2; | 
 |  |  |       arg2.setNativePointer(arg2.CreateInstance()); | 
 |  |  | 		 | 
 |  |  |       arg2.AddArg(L"id", L"FND_Currency"); | 
 |  |  |       if (xurl::get(L"/sale/data/QuickCode/entity/list", arg2.GetString(), x2) != 1) | 
 |  |  |       { | 
 |  |  | 
 |  |  |       xml x3; | 
 |  |  |  | 
 |  |  |       xaserverarg arg3; | 
 |  |  |       arg3.setNativePointer(arg3.CreateInstance()); | 
 |  |  | 		 | 
 |  |  |       arg3.AddArg(L"id", L"FND_Country"); | 
 |  |  |       if (xurl::get(L"/sale/data/QuickCode/entity/list", arg3.GetString(), x3) != 1) | 
 |  |  |       { | 
 |  |  | 
 |  |  |    } | 
 |  |  |    int onload() | 
 |  |  |    { | 
 |  |  | 		 | 
 |  |  |       SetArg(); | 
 |  |  |       m_config = L"QuickCode.config"; | 
 |  |  |       m_agent = L""; |