{
result r = E_SUCCESS;
- DateTime changedDate;
- DateTime currentDate;
- SystemTime::GetCurrentTime(currentDate);
-
- __pPresentationModel->GetBirthday(changedDate);
-
- if (changedDate.CompareTo(currentDate) > 0)
+ r = SaveContactData();
+ if (r != E_SUCCESS)
{
- int modalResult;
- MessageBox invalidBirthYear;
- invalidBirthYear.Construct(L"", ResourceManager::GetString(L"IDS_SAPPS_POP_INVALID_DATE_OF_BIRTH"), MSGBOX_STYLE_OK, MESSAGE_BOX_TIMEOUT_MS);
- invalidBirthYear.ShowAndWait(modalResult);
- __pPresentationModel->SetBirthday(currentDate);
- __pTableView->RefreshItem(TABLE_VIEW_BIRTHDAY_FIELD_INDEX, 0, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
+ return;
}
- else
- {
- r = SaveContactData();
- if (r != E_SUCCESS)
- {
- return;
- }
- SetFocus();
+ SetFocus();
- __isSaved = true;
- }
+ __isSaved = true;
}
break;
case IDA_BUTTON_THUMBNAIL_ADD:
break;
case TABLE_VIEW_BIRTHDAY_FIELD_INDEX:
{
- int min;
- int max;
- DateTime birthdayDate;
EditDate* pBirthday = static_cast<EditDate *>(pItem->GetControl(1));
-
if (pBirthday == null)
{
return;
}
-
- __pPresentationModel->GetBirthday(birthdayDate);
-
- pBirthday->GetYearRange(min, max);
- max = birthdayDate.GetYear();
- pBirthday->SetYearRange(max - BIRTHDAY_MIN_YEAR_DIFF, max);
- pBirthday->SetDate(birthdayDate);
pBirthday->Invalidate(false);
}
break;
int max;
pBirthday->GetYearRange(min, max);
max = currentDate.GetYear();
- pBirthday->SetYearRange(max - BIRTHDAY_MIN_YEAR_DIFF, max);
+ pBirthday->SetYearRange(max - BIRTHDAY_MIN_YEAR_DIFF, max + BIRTHDAY_MAX_YEAR_DIFF);
if (birthdayDate.GetYear() < (currentDate.GetYear() - BIRTHDAY_MIN_YEAR_DIFF))
{
DateTime currentDate;
Tizen::System::SystemTime::GetCurrentTime(currentDate);
- if(bday > currentDate)
- {
- __pPresentationModel->SetBirthday(currentDate);
- __pTableView->RefreshItem(TABLE_VIEW_BIRTHDAY_FIELD_INDEX, 0, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
- }
+ __pTableView->RefreshItem(TABLE_VIEW_BIRTHDAY_FIELD_INDEX, 0, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
}
}
}
}
+ Footer* pFooter = GetFooter();
+
+ int modifiedItems = 0;
+ int itemCount = __pListView->GetItemCount();
+
+ for(int count = 0; count < itemCount; count++)
+ {
+ if(__pGroupListPresentationModel->IsContactInCategory(*__pGroupIdList, count) != __pListView->IsItemChecked(count))
+ {
+ modifiedItems++;
+ }
+ }
+
+ if (pFooter != null)
+ {
+ if(modifiedItems > 0)
+ {
+ pFooter->SetItemEnabled(1, true);
+ }
+ else
+ {
+ pFooter->SetItemEnabled(1, false);
+ }
+
+ pFooter->Invalidate(true);
+ }
+
__pListView->Invalidate(true);
UpdateBottomLabel();
}