CWaimaiOrderInfoUI.cpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #include "../pch/pch.h"
  2. #include "CWaimaiOrderInfoUI.h"
  3. #include "ControlEx.h"
  4. void CWaimaiOrderInfoUI::DoEvent(TEventUI& event)
  5. {
  6. CHorizontalLayoutUI::DoEvent(event);
  7. }
  8. void CWaimaiOrderInfoUI::Refresh(CWaimaiOrder& order)
  9. {
  10. std::wstring liushuihao_show = L"#" + CLewaimaiString::UTF8ToUnicode(order.m_restaurant_number);
  11. this->FindSubControl(_T("waimai_order_info_page_liushuihao"))->SetText(liushuihao_show.c_str());
  12. std::wstring order_no_show = L"订单号:" + CLewaimaiString::UTF8ToUnicode(order.m_order_no);
  13. this->FindSubControl(_T("waimai_order_info_page_order_no"))->SetText(order_no_show.c_str());
  14. //CListUI* pUserList = static_cast<CListUI*>(this->FindSubControl(_T("waimai_order_info_page_foodlist")));
  15. //pUserList->SetTextCallback(this);
  16. //for (int i = 0; i < 400; i++) {
  17. // CListTextElementUI* pListElement = new CListTextElementUI;
  18. // pUserList->Add(pListElement);
  19. //}
  20. std::wstring name_show = L"姓名:" + CLewaimaiString::UTF8ToUnicode(order.m_customer_name);
  21. this->FindSubControl(_T("waimai_order_info_page_name"))->SetText(name_show.c_str());
  22. std::wstring phone_show = L"电话:" + CLewaimaiString::UTF8ToUnicode(order.m_phone);
  23. this->FindSubControl(_T("waimai_order_info_page_phone"))->SetText(phone_show.c_str());
  24. std::wstring address_show = L"地址:" + CLewaimaiString::UTF8ToUnicode(order.m_address);
  25. this->FindSubControl(_T("waimai_order_info_page_address"))->SetText(address_show.c_str());
  26. std::wstring order_date_show = L"下单时间:" + CLewaimaiString::UTF8ToUnicode(order.m_order_date);
  27. this->FindSubControl(_T("waimai_order_info_page_init_date"))->SetText(order_date_show.c_str());
  28. }