| | |
| | | |
| | | void CPageRecipe::OnBnClickedButtonNew() |
| | | { |
| | | // TODO: 在此添加控件通知处理程序代码 |
| | | //CComboBox* pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_EQUIPMENT); |
| | | //int nSel = pComboBox->GetCurSel(); |
| | | //SERVO::CEquipment* pEq = (SERVO::CEquipment*)pComboBox->GetItemDataPtr(nSel); |
| | | //if (pEq == nullptr) { |
| | | // return; |
| | | //} |
| | | int rc = UX_CanExecute(L"recipe"); |
| | | if (rc != 1) { |
| | | AfxMessageBox("操作权限不足,请联系管理人员!"); |
| | | return; |
| | | } |
| | | UX_RecordAction(L"recipe"); |
| | | |
| | | CRecipeDeviceBindDlg dlg(this); |
| | | if (dlg.DoModal() == IDOK) { |
| | |
| | | |
| | | void CPageRecipe::OnBnClickedButtonModify() |
| | | { |
| | | int rc = UX_CanExecute(L"recipe"); |
| | | if (rc != 1) { |
| | | AfxMessageBox("操作权限不足,请联系管理人员!"); |
| | | return; |
| | | } |
| | | UX_RecordAction(L"recipe"); |
| | | |
| | | // TODO: 在此添加控件通知处理程序代码 |
| | | CComboBox* pComboBox = (CComboBox*)GetDlgItem(IDC_COMBO_EQUIPMENT); |
| | | if (pComboBox == nullptr || !::IsWindow(pComboBox->m_hWnd)) { |
| | |
| | | |
| | | void CPageRecipe::OnBnClickedButtonDelete() |
| | | { |
| | | int rc = UX_CanExecute(L"recipe"); |
| | | if (rc != 1) { |
| | | AfxMessageBox("操作权限不足,请联系管理人员!"); |
| | | return; |
| | | } |
| | | UX_RecordAction(L"recipe"); |
| | | |
| | | // TODO: 在此添加控件通知处理程序代码 |
| | | POSITION pos = m_listPPID.GetFirstSelectedItemPosition(); |
| | | if (!pos) { |
| | |
| | | |
| | | void CPageRecipe::OnBnClickedButtonDeleteAll() |
| | | { |
| | | int rc = UX_CanExecute(L"recipe"); |
| | | if (rc != 1) { |
| | | AfxMessageBox("操作权限不足,请联系管理人员!"); |
| | | return; |
| | | } |
| | | UX_RecordAction(L"recipe"); |
| | | |
| | | // TODO: 在此添加控件通知处理程序代码 |
| | | if (IDYES != AfxMessageBox(_T("确定要删除全部配方记录吗?"), MB_YESNO | MB_ICONWARNING)) { |
| | | return; |
| | |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | BOOL CPageRecipe::PreTranslateMessage(MSG* pMsg) |
| | | { |
| | | if (pMsg->wParam == VK_RETURN || pMsg->wParam == VK_ESCAPE) { |
| | | return TRUE; |
| | | } |
| | | |
| | | return CDialogEx::PreTranslateMessage(pMsg); |
| | | } |