calendarui/editors/src/calendbfield.cpp
branchRCL_3
changeset 13 1984aceb8774
parent 0 f979ecb2b13e
child 14 21239b3bcd78
equal deleted inserted replaced
11:0f07cd1b5772 13:1984aceb8774
    16 */
    16 */
    17 
    17 
    18 // system includes
    18 // system includes
    19 #include <AknPopupField.h>
    19 #include <AknPopupField.h>
    20 #include <AknQueryValueText.h>
    20 #include <AknQueryValueText.h>
       
    21 #include <AknQueryDialog.h>
    21 #include <badesca.h>
    22 #include <badesca.h>
    22 #include <calentry.h>
    23 #include <calentry.h>
    23 #include <centralrepository.h>
    24 #include <centralrepository.h>
    24 #include <CalenDefaultEditorsData.rsg>
    25 #include <CalenDefaultEditorsData.rsg>
    25 #include <calsession.h>
    26 #include <calsession.h>
   217             {
   218             {
   218             TBool continueOnError = EFalse;
   219             TBool continueOnError = EFalse;
   219             ReadDataFromFormL( continueOnError );
   220             ReadDataFromFormL( continueOnError );
   220             iUnifiedEditor.EditorDataHandler().SetCalendarFieldEditedL(IsCalendarEdited()
   221             iUnifiedEditor.EditorDataHandler().SetCalendarFieldEditedL(IsCalendarEdited()
   221                                                             ,iPreviousColId,iCurrentColId);
   222                                                             ,iPreviousColId,iCurrentColId);
       
   223             //Check the child entries for the repeated entry
       
   224             //The entry which is changing the calendar having any childs 
       
   225             //show this information note to the user.  
       
   226             CCalEntry& originalEntry = iUnifiedEditor.EditorDataHandler().Entry();
       
   227             RPointerArray<CCalEntry> childEntries;
       
   228             CleanupClosePushL(childEntries);
       
   229             iServices->EntryViewL(iPreviousColId)->FetchL(originalEntry.UidL(), childEntries);            
       
   230             if(IsCalendarEdited() && (childEntries.Count() > 1))
       
   231                 {
       
   232                 CAknQueryDialog* dlg = CAknQueryDialog::NewL();
       
   233                 if( !dlg->ExecuteLD( R_CALEN_DB_CHANGE_QUERY ) )
       
   234                     {
       
   235                     iCurrentColId = iPreviousColId;
       
   236                     SetDataToEditorL();                    
       
   237                     iUnifiedEditor.UpdateFormL();
       
   238                     }
       
   239                 }            
       
   240             CleanupStack::PopAndDestroy( &childEntries );
       
   241             
   222             break;
   242             break;
   223             }
   243             }
   224         default: 
   244         default: 
   225             break;
   245             break;
   226         }               
   246         }