Person* pPerson = static_cast <Person*> (__pPersonList->GetAt(index));
AppAssert(pPerson);
+ Person* pCheckPerson = AddressbookManager::GetInstance()->GetPersonN(pPerson->GetId());
+ if (pCheckPerson == null)
+ {
+ MessageBox messageBox;
+ int doModal;
+
+ if (GetLastResult() == E_USER_NOT_CONSENTED)
+ {
+ messageBox.Construct(L"Error", "No permission to use Contact.", MSGBOX_STYLE_OK, 0);
+ messageBox.ShowAndWait(doModal);
+ }
+ else
+ {
+ messageBox.Construct(L"Error", "The person doesn't exist.", MSGBOX_STYLE_OK, 0);
+ messageBox.ShowAndWait(doModal);
+ }
+
+ return;
+ }
+ delete pCheckPerson;
+
ArrayList* pPersonList = new (std::nothrow) ArrayList();
AppAssert(pPersonList);