浏览代码

修复翻页的bug

zhangyang 7 年之前
父节点
当前提交
7f4d373acf
共有 2 个文件被更改,包括 11 次插入0 次删除
  1. 二进制
      bin/Win32/Debug/zhipuzi_pos_windows/zhipuzi_pos_windows.exe
  2. 11 0
      zhipuzi_pos_windows/control/OrderListUI.cpp

二进制
bin/Win32/Debug/zhipuzi_pos_windows/zhipuzi_pos_windows.exe


+ 11 - 0
zhipuzi_pos_windows/control/OrderListUI.cpp

@@ -141,6 +141,17 @@ void OrderListUI::DoRefresh()
 		pControl->SetEnabled(false);
 	}
 
+	if (m_page > 1)
+	{
+		CButtonUI* pControl = static_cast<CButtonUI*>(m_pManager->FindControl(_T("waimai_order_list_last")));
+		pControl->SetEnabled(true);
+	}
+	if (m_page < m_total_page)
+	{
+		CButtonUI* pControl = static_cast<CButtonUI*>(m_pManager->FindControl(_T("waimai_order_list_next")));
+		pControl->SetEnabled(true);
+	}
+
 	CLabelUI* pControl = static_cast<CLabelUI*>(m_pManager->FindControl(_T("waimai_order_list_page")));
 	wstring pageinfo = _T("第 ") + CLewaimaiString::ANSIToUnicode(to_string(m_page)) + _T("页/共 ") + CLewaimaiString::ANSIToUnicode(to_string(m_total_page)) + _T("页");
 	pControl->SetText(pageinfo.c_str());