calendarui/editors/src/calendbfield.cpp
branchRCL_3
changeset 13 1984aceb8774
parent 0 f979ecb2b13e
child 14 21239b3bcd78
--- a/calendarui/editors/src/calendbfield.cpp	Mon Mar 15 12:40:18 2010 +0200
+++ b/calendarui/editors/src/calendbfield.cpp	Wed Mar 31 21:29:10 2010 +0300
@@ -18,6 +18,7 @@
 // system includes
 #include <AknPopupField.h>
 #include <AknQueryValueText.h>
+#include <AknQueryDialog.h>
 #include <badesca.h>
 #include <calentry.h>
 #include <centralrepository.h>
@@ -219,6 +220,25 @@
             ReadDataFromFormL( continueOnError );
             iUnifiedEditor.EditorDataHandler().SetCalendarFieldEditedL(IsCalendarEdited()
                                                             ,iPreviousColId,iCurrentColId);
+            //Check the child entries for the repeated entry
+            //The entry which is changing the calendar having any childs 
+            //show this information note to the user.  
+            CCalEntry& originalEntry = iUnifiedEditor.EditorDataHandler().Entry();
+            RPointerArray<CCalEntry> childEntries;
+            CleanupClosePushL(childEntries);
+            iServices->EntryViewL(iPreviousColId)->FetchL(originalEntry.UidL(), childEntries);            
+            if(IsCalendarEdited() && (childEntries.Count() > 1))
+                {
+                CAknQueryDialog* dlg = CAknQueryDialog::NewL();
+                if( !dlg->ExecuteLD( R_CALEN_DB_CHANGE_QUERY ) )
+                    {
+                    iCurrentColId = iPreviousColId;
+                    SetDataToEditorL();                    
+                    iUnifiedEditor.UpdateFormL();
+                    }
+                }            
+            CleanupStack::PopAndDestroy( &childEntries );
+            
             break;
             }
         default: