{
case ID_FOOTER_SAVE:
{
- SaveContact(__selectedTabId);
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ AppAssert(pSceneManager);
+
+ result r = E_SUCCESS;
+ r = SaveContact(__selectedTabId);
+ if (IsFailed(r))
+ {
+ MessageBox messageBox;
+ messageBox.Construct(L"Error", "Failed to update contact", MSGBOX_STYLE_OK, 0);
+ int doModal;
+ messageBox.ShowAndWait(doModal);
+
+ pSceneManager->GoBackward(BackwardSceneTransition(SCENE_MAIN_FORM));
+ }
ArrayList* pPersonIdList = new (std::nothrow) ArrayList();
AppAssert(pPersonIdList);
- result r = E_SUCCESS;
+
r = pPersonIdList->Construct();
TryReturnVoid(!IsFailed(r), "Failed to construct person list (%s).", GetErrorMessage(r));
r = pPersonIdList->Add(*new (std::nothrow) Integer(__personId));
TryReturnVoid(!IsFailed(r), "Failed to get add contact record id (%s).", GetErrorMessage(r));
- SceneManager* pSceneManager = SceneManager::GetInstance();
- AppAssert(pSceneManager);
pSceneManager->GoBackward(BackwardSceneTransition(SCENE_DETAIL_VIEW_FORM), pPersonIdList);
break;
}
r = __pAddressbookMgr->UpdateContact(*pContact);
-
- if(IsFailed(r))
- {
- MessageBox messageBox;
- messageBox.Construct(L"Error", "Failed to update contact", MSGBOX_STYLE_OK, 0);
- int doModal;
- messageBox.ShowAndWait(doModal);
- }
-
TryReturn(!IsFailed(r), r, "Failed to update Contact (%s)", GetErrorMessage(r));
return r;