hongji.li
2023-11-07 1a1ba3ad5ed9e4380185aa1ccad20204a0e5f115
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Quintiq file version 2.0
#parent: #root
Method AddEdit () id:Method_SWF_DialogCreateEditActivityDefinition_AddEdit
{
  #keys: '[136682.0.1021918776]'
  Body:
  [*
    // Add or Edit data
    //DataholderDialogData will be empty for add 
    
    data := DataHolderDialogData.Data();
    selected_authorization := SWF_AuthorizationBase::GetSelectedAuthorizationFromStringSelections( SWF_WorkflowDataset,
                                                                                                   selstrAssignedTo.Text(),
                                                                                                   Form.GetAuthorizeElement());
                                                                                                       
    service := SWF_WorkflowDataset.Service();
    service.TR_CreateUpdateActivityDefinition( guard( data.ID(), Key::ZeroKey() ), // Zerokey when null data
                                               edtName.Text(),
                                               [Number]numpduedateoffset.Number(),
                                               edtDescription.Text(),
                                               guard( selected_authorization.DisplayName(), '' ),
                                               selParentStepDefinition.Data().ID(),
                                               guard( data.CanGenerateActivity(), true ), // default to can generate activity
                                               guard( data.ViewLink(), '' ),
                                               guard( DropDownListView.Data().Id(), '' ) );
  *]
}