| | |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | Precondition: |
| | | [* |
| | | feedback := Translations::FilllingCapacity_ValidateInput(); |
| | | checkValue := not Coefficient.Text() = '' and not PriorityFactorName.Text() = ''; |
| | | |
| | | if(not checkValue ){ |
| | | feedback := Translations::PriorityFactor_CheckNameValid(); |
| | | editData := DataHolderEditPriorityFactor.Data(); |
| | | checkValue := not PriorityFactor::CheckNameValid( MacroPlan,editData.BusinessType(),[Real]Coefficient.Text(),PriorityFactorName.Text(),Desc.Text()); |
| | | } |
| | | checkValue := true; |
| | | if( PriorityFactorName.Text() = ''){ |
| | | feedback := Translations::PriorityFactor_CheckNameNull(); |
| | | checkValue := false; |
| | | } |
| | | return checkValue |
| | | *] |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | businessType := DataHolderBusinessTyoeSelect.Data( ); |
| | | if( NewFlag.Checked() ){ |
| | | // New |
| | | repeatOne := select( MacroPlan,PriorityFactor,pf,pf.Name() = PriorityFactorName.Text()); |
| | | repeatOne := select( businessType,PriorityFactor,pf,pf.Name() = PriorityFactorName.Text()); |
| | | if( not isnull( repeatOne )){ |
| | | WebMessageBox::Error( Translations::PriorityFactor_CheckNameValid() ); |
| | | }else{ |
| | |
| | | }else { |
| | | if (EditFlag.Checked() and PriorityFactorNameCache.Text() <>PriorityFactorName.Text()){ |
| | | // Edit |
| | | repeatOne:=select(MacroPlan, PriorityFactor, pf, pf.Name() = PriorityFactorName.Text()); |
| | | repeatOne:=select(businessType, PriorityFactor, pf, pf.Name() = PriorityFactorName.Text()); |
| | | if (not isnull(repeatOne)){ |
| | | WebMessageBox::Error (Translations::PriorityFactor_CheckNameValid () ); |
| | | }else{ |