Quintiq file version 2.0
#parent: #root
Method EditFeedback (
  internal[GUIComponent] parent,
  structured[Feedback] feedbacks
) id:Method_DialogCreateEditFeedback_EditFeedback
{
  #keys: '[113694.1.447460577]'
  Body:
  [*
    // Edit feedback from feedback list
    
    isbatchedit := feedbacks.Size() > 1;
    Dialog.ShowHideComponents( isbatchedit );
    
    feedback := feedbacks.Element( 0 );
    data := shadow( feedback );
    
    Dialog.Data( data );
    
    Dialog.InitializeDialog( feedback.Process_MP() );
    
    result := this.DoModal( parent );
    
    if( result > 0 )
    {
      Feedback::Update( feedbacks,
                        not isbatchedit or CheckBoxBatchEditFeedbackQuantity.Checked(),
                        data.FeedbackQuantity(),
                        not isbatchedit or CheckBoxBatchEditDescription.Checked(),
                        data.Description() );
    }
  *]
}
