| 12345678910111213141516171819202122232425262728293031323334353637 |
- #include "../pch/pch.h"
- #include "CWaimaiOrderInfoUI.h"
- #include "ControlEx.h"
- void CWaimaiOrderInfoUI::DoEvent(TEventUI& event)
- {
- CHorizontalLayoutUI::DoEvent(event);
- }
- void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
- {
- std::wstring liushuihao_show = L"#" + CLewaimaiString::UTF8ToUnicode(order.m_restaurant_number);
- this->FindSubControl(_T("waimai_order_info_page_liushuihao"))->SetText(liushuihao_show.c_str());
- std::wstring order_no_show = L"订单号:" + CLewaimaiString::UTF8ToUnicode(order.m_order_no);
- this->FindSubControl(_T("waimai_order_info_page_order_no"))->SetText(order_no_show.c_str());
- //CListUI* pUserList = static_cast<CListUI*>(this->FindSubControl(_T("waimai_order_info_page_foodlist")));
- //pUserList->SetTextCallback(this);
- //for (int i = 0; i < 400; i++) {
- // CListTextElementUI* pListElement = new CListTextElementUI;
- // pUserList->Add(pListElement);
- //}
- std::wstring name_show = L"姓名:" + CLewaimaiString::UTF8ToUnicode(order.m_customer_name);
- this->FindSubControl(_T("waimai_order_info_page_name"))->SetText(name_show.c_str());
- std::wstring phone_show = L"电话:" + CLewaimaiString::UTF8ToUnicode(order.m_phone);
- this->FindSubControl(_T("waimai_order_info_page_phone"))->SetText(phone_show.c_str());
- std::wstring address_show = L"地址:" + CLewaimaiString::UTF8ToUnicode(order.m_address);
- this->FindSubControl(_T("waimai_order_info_page_address"))->SetText(address_show.c_str());
- std::wstring order_date_show = L"下单时间:" + CLewaimaiString::UTF8ToUnicode(order.m_order_date);
- this->FindSubControl(_T("waimai_order_info_page_init_date"))->SetText(order_date_show.c_str());
- }
|