| 12345678910111213141516171819202122232425262728293031323334 |
- #include "../pch/pch.h"
- #include "OrderListUI.h"
- void OrderListUI::Refresh()
- {
- COptionUI* waimai_open_op = static_cast<COptionUI*>(m_pManager->FindControl(L"waimai_open_switch"));
- if (waimai_open_op->IsSelected())
- {
- //请求外卖的未处理订单
- std::map<string, string> params;
- params["page"] = "1";
- std::string response;
- CZhipuziHttpClient::RequestOld("/waimaiorder/getopenlist", params, response);
- }
- CDialogBuilder builder;
- CContainerUI* pDesk = static_cast<CContainerUI*>(builder.Create(_T("desk.xml"), (UINT)0));
- if (pDesk != NULL) {
- for (int i = 0; i < 20; ++i)
- {
- if (pDesk == NULL) pDesk = static_cast<CContainerUI*>(builder.Create());
- if (pDesk != NULL) {
- this->Add(pDesk);
- pDesk = NULL;
- }
- else {
- this->RemoveAll();
- return;
- }
- }
- }
- }
|