| | |
| | | { |
| | | DefaultText: 'There are duplicate three digit codes present' |
| | | } |
| | | InfoMessage MP_ChangeLossSetting_CheckNull |
| | | { |
| | | DefaultText: 'The required field is blank.' |
| | | } |
| | | InfoMessage MP_ChangeLossSetting_Exist |
| | | { |
| | | DefaultText: 'The same data already exists.' |
| | | } |
| | | InfoMessage MP_LibCal_EventType_Exist |
| | | { |
| | | DefaultText: 'The ID or name is the same.' |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod ValidateInput ( |
| | | MacroPlan owner, |
| | | ChangeLossSetting old, |
| | | Unit unit, |
| | | Product_MP product1, |
| | | Product_MP product2, |
| | | Number number |
| | | ) as Boolean |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-5-2024 (created) |
| | | feedback := ''; |
| | | if( isnull( unit ) or isnull( product1 ) or isnull( product2 ) or number < 1 ){ |
| | | feedback := Translations::MP_ChangeLossSetting_CheckNull(); |
| | | } |
| | | if( exists( owner, ChangeLossSetting, cls, cls <> old and cls.Unit() = unit and cls.ProductFirst() = product1 and cls.ProductSecond() = product2 ) ){ |
| | | feedback := Translations::MP_ChangeLossSetting_Exist() |
| | | } |
| | | |
| | | return feedback = ''; |
| | | *] |
| | | } |
| | |
| | | { |
| | | #keys: '[415136.0.735612418]' |
| | | BaseType: 'WebDropDownList' |
| | | Databinding: 'Unit' |
| | | Children: |
| | | [ |
| | | Component deUnit |
| | |
| | | { |
| | | #keys: '[415136.0.738250065]' |
| | | BaseType: 'WebDropDownList' |
| | | Databinding: 'Product_MP' |
| | | Children: |
| | | [ |
| | | Component deProductFirst |
| | |
| | | { |
| | | #keys: '[415136.0.738250142]' |
| | | BaseType: 'WebDropDownList' |
| | | Databinding: 'Product_MP' |
| | | Children: |
| | | [ |
| | | Component deProductSecond |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method Edit ( |
| | | ChangeLossSetting selection |
| | | ) id:Method_DialogCreateEditChangeLossSetting_Edit |
| | | { |
| | | #keys: '[415136.0.746200731]' |
| | | Body: |
| | | [* |
| | | // Edit Product(s) |
| | | |
| | | data := shadow( selection ); |
| | | dhDialogData.Data( &data ); |
| | | |
| | | ApplicationMacroPlanner.ShowFormModal( this ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method New ( |
| | | FormChangeLossSetting form |
| | | ) id:Method_DialogCreateEditChangeLossSetting_New |
| | | { |
| | | #keys: '[415136.0.746200358]' |
| | | Body: |
| | | [* |
| | | // To create a new product |
| | | owner := LibCal_GlobalState.dhGlobalCalendarRegistry().Data(); |
| | | obj := MacroPlan.ChangeLossSetting( relshadow, Line := '', Product1 := '', Product2 := '' ); |
| | | |
| | | dhDialogData.Data( &obj ); |
| | | |
| | | dhForm.Data( form ); |
| | | |
| | | ApplicationMacroPlanner.ShowFormModal( this ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method OnOK () id:Method_DialogCreateEditChangeLossSetting_OnOK |
| | | { |
| | | #keys: '[415136.0.746200837]' |
| | | Body: |
| | | [* |
| | | // onOK for ProductDialog |
| | | // When the user clicks ok, |
| | | // we either create or edit the data |
| | | this.ApplyChanges(); |
| | | |
| | | data := dhDialogData.Data(); |
| | | |
| | | if( isnull( data.WrappedInstance() ) ) // New |
| | | { |
| | | data.Commit(); |
| | | dhForm.Data().ListChangeLossSetting().SelectByKey( data.WrappedInstance().Key() ); |
| | | } |
| | | else |
| | | { |
| | | data.Commit(); |
| | | } |
| | | |
| | | this.Close(); |
| | | *] |
| | | } |
| | |
| | | #keys: '[415136.0.735612174]' |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | GroupServerCalls: true |
| | | Precondition: |
| | | [* |
| | | return ChangeLossSetting::ValidateInput( MacroPlan, dhDialogData.Data().WrappedInstance(), ddlUnit.Data(), ddlProduct1.Data(), ddlProduct2.Data(), [Number]npChangeLossNr.Number() ); |
| | | *] |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | Form.ApplyChanges(); |
| | | Form.Close(); |
| | | Form.OnOK(); |
| | | *] |
| | | } |
| | | } |
| | |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | ResponseDefinitions: |
| | | [ |
| | | DelegatedResponseDefinition OnClick id:Responsedef_ListChangeLossSetting_WebMenu_OnClick |
| | | { |
| | | #keys: '[415136.0.747540770]' |
| | | Initiator: 'WebMenu' |
| | | IsInherited: false |
| | | ResponseType: 'OnClick' |
| | | Arguments: |
| | | [ |
| | | ResponseDefinitionArgument selection |
| | | { |
| | | #keys: '[913.0.7765768]' |
| | | Binding: 'this.Selection()' |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: ListChangeLossSetting |
| | | Response OnClick ( |
| | | structured[ChangeLossSetting] selection |
| | | ) id:Response_ListChangeLossSetting_MenuDelete_OnClick |
| | | { |
| | | #keys: '[415136.0.747541132]' |
| | | CanBindMultiple: false |
| | | DefinitionID => /ListChangeLossSetting/Responsedef_ListChangeLossSetting_WebMenu_OnClick |
| | | Initiator: 'MenuDelete' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | traverse( selection, Elements, e ){ |
| | | e.Delete(); |
| | | } |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: ListChangeLossSetting |
| | | Response OnClick ( |
| | | ChangeLossSetting selection |
| | | ) id:Response_ListChangeLossSetting_MenuEdit_OnClick |
| | | { |
| | | #keys: '[415136.0.747540962]' |
| | | CanBindMultiple: false |
| | | DefinitionID => /ListChangeLossSetting/Responsedef_ListChangeLossSetting_WebMenu_OnClick |
| | | Initiator: 'MenuEdit' |
| | | Precondition: |
| | | [* |
| | | return MacroPlan::HasMacroPlan( MacroPlan, feedback ); |
| | | *] |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | dlg := construct( DialogCreateEditChangeLossSetting ); |
| | | dlg.Edit( selection ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: ListChangeLossSetting |
| | | Response OnClick () id:Response_ListChangeLossSetting_MenuNew_OnClick |
| | | { |
| | | #keys: '[415136.0.747540787]' |
| | | CanBindMultiple: false |
| | | DefinitionID => /ListChangeLossSetting/Responsedef_ListChangeLossSetting_WebMenu_OnClick |
| | | Initiator: 'MenuNew' |
| | | Precondition: |
| | | [* |
| | | return MacroPlan::HasMacroPlan( MacroPlan, feedback ); |
| | | *] |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | dlg := construct( DialogCreateEditChangeLossSetting ); |
| | | dlg.New( FormChangeLossSetting ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |