| ÎļþÃû´Ó SourceCode/Bond/BondEq/UserManagerDlg.cpp ÐÞ¸Ä |
| | |
| | | #include "afxdialogex.h" |
| | | #include "UserManagerDlg.h" |
| | | #include "InputDialog.h" |
| | | #include "UserManager.h" |
| | | #include "NewCellTypes/GridCellCombo.h" |
| | | #include "NewCellTypes/GridCellNumeric.h" |
| | | |
| | |
| | | |
| | | CString inputText = inputDialog.GetInputText(); |
| | | if (inputText.IsEmpty()) { |
| | | AfxMessageBox(_T("ç¨æ·åä¸è½ä¸ºç©ºï¼"), MB_OK | MB_ICONEXCLAMATION); |
| | | AfxMessageBox(_T("ç¨æ·åä¸è½ä¸ºç©ºï¼")); |
| | | return; |
| | | } |
| | | |
| | | if (IsUsernameDuplicate(inputText)) { |
| | | AfxMessageBox(_T("ç¨æ·åéå¤ï¼"), MB_OK | MB_ICONEXCLAMATION); |
| | | AfxMessageBox(_T("ç¨æ·åéå¤ï¼")); |
| | | return; |
| | | } |
| | | |
| | |
| | | pGridCtrl->ExpandLastColumn(); |
| | | pGridCtrl->Invalidate(); |
| | | pGridCtrl->UpdateWindow(); |
| | | |
| | | CString cstrMessage; |
| | | cstrMessage.Format(_T("颿·»å ç¨æ· [%s]ï¼"), inputText); |
| | | std::string strMessage = CT2A(cstrMessage); |
| | | SystemLogManager::getInstance().log(SystemLogManager::LogType::Operation, strMessage); |
| | | } |
| | | |
| | | void CUserManagerDlg::DeleteSelectedRow(CGridCtrl* pGridCtrl) |
| | |
| | | if (selectedUser == currentUser) { |
| | | CString message; |
| | | message.Format(_T("ç¨æ· [%s] æ¯å½åç»å½ç¨æ·ï¼ä¸è½å é¤ï¼"), currentUser); |
| | | AfxMessageBox(message, MB_OK | MB_ICONEXCLAMATION); |
| | | AfxMessageBox(message); |
| | | return; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | if (rowsToDelete.empty()) { |
| | | AfxMessageBox(_T("请å
éæ©è¦å é¤çè¡ï¼"), MB_OK | MB_ICONINFORMATION); |
| | | AfxMessageBox(_T("请å
éæ©è¦å é¤çè¡ï¼")); |
| | | return; |
| | | } |
| | | |
| | |
| | | if (rowsToDelete.size() == 1) { |
| | | CString selectedUser = pGridCtrl->GetItemText(rowsToDelete[0], 1); |
| | | message.Format(_T("ç¡®å®è¦å é¤éä¸ç¨æ· [%s] åï¼"), selectedUser); |
| | | |
| | | CString cstrMessage; |
| | | cstrMessage.Format(_T("é¢å é¤ç¨æ· [%s]ï¼"), selectedUser); |
| | | std::string strMessage = CT2A(cstrMessage); |
| | | SystemLogManager::getInstance().log(SystemLogManager::LogType::Operation, strMessage); |
| | | } |
| | | else { |
| | | message.Format(_T("ç¡®å®è¦å é¤éä¸ç %d ä¸ªç¨æ·åï¼"), rowsToDelete.size()); |
| | |
| | | } |
| | | } |
| | | else { |
| | | AfxMessageBox(_T("请å
éæ©è¦å é¤çç¨æ·ï¼"), MB_OK | MB_ICONINFORMATION); |
| | | AfxMessageBox(_T("请å
éæ©è¦å é¤çç¨æ·ï¼")); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | CCellRange selectedRange = m_gridUserManager.GetSelectedCellRange(); |
| | | if (!selectedRange.IsValid()) { |
| | | AfxMessageBox(_T("请å
éæ©è¦æå
¥çä½ç½®ï¼"), MB_OK | MB_ICONINFORMATION); |
| | | AfxMessageBox(_T("请å
éæ©è¦æå
¥çä½ç½®ï¼")); |
| | | return; |
| | | } |
| | | |
| | | int minRow = selectedRange.GetMinRow(); |
| | | int maxRow = selectedRange.GetMaxRow(); |
| | | if (minRow < 1) { |
| | | AfxMessageBox(_T("è¯·éæ©ææçè¡ï¼"), MB_OK | MB_ICONEXCLAMATION); |
| | | AfxMessageBox(_T("è¯·éæ©ææçè¡ï¼")); |
| | | return; |
| | | } |
| | | |