|  |  |  | 
|---|
|  |  |  | DefinitionID: 'Responsedef_WebButton_OnClick' | 
|---|
|  |  |  | Precondition: | 
|---|
|  |  |  | [* | 
|---|
|  |  |  | feedback := Translations::FilllingCapacity_ValidateInput(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | checkValue := not dropDownStringListProductID.Text() = '' and not dropDownStringListSalesSegmentName.Text() = '' | 
|---|
|  |  |  | and not dropDownStringListStockPointID.Text() = '' and not dropDownStringListCustomer.Text() = '' | 
|---|
|  |  |  | and not edtQuantity.Text() = '' and not dropDownStringListUnitOfMeasureName.Text() = '' | 
|---|
|  |  |  | and not edtSalesAmount.Text() = '' | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return checkValue; | 
|---|
|  |  |  | //feedback := Translations::FilllingCapacity_ValidateInput(); | 
|---|
|  |  |  | // | 
|---|
|  |  |  | //checkValue := not dropDownStringListProductID.Text() = '' and not dropDownStringListSalesSegmentName.Text() = '' | 
|---|
|  |  |  | //              and not dropDownStringListStockPointID.Text() = '' and not dropDownStringListCustomer.Text() = '' | 
|---|
|  |  |  | //              and not edtQuantity.Text() = '' and not dropDownStringListUnitOfMeasureName.Text() = '' | 
|---|
|  |  |  | //              and not edtSalesAmount.Text() = '' | 
|---|
|  |  |  | // | 
|---|
|  |  |  | //return checkValue; | 
|---|
|  |  |  | *] | 
|---|
|  |  |  | QuillAction | 
|---|
|  |  |  | { | 
|---|
|  |  |  | Body: | 
|---|
|  |  |  | [* | 
|---|
|  |  |  | Form.ClickBtnOk() | 
|---|
|  |  |  | Form.ApplyChanges(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | data := guard( DataHolderFillingCapacityOrder.Data().WrappedInstance(), null( FillingCapacityOrder ) );; | 
|---|
|  |  |  | if ( isnull( data ) ) { | 
|---|
|  |  |  | MacroPlan.FillingCapacityOrder( relnew, | 
|---|
|  |  |  | ID                 := OS::GenerateGUIDAsString(), | 
|---|
|  |  |  | ProductID          := guard( ddlProduct_MP.Data().ID(), "null" ), | 
|---|
|  |  |  | BusinessType       := guard( ddlBusinessType.Data().BusinessTypeName(), "null" ), | 
|---|
|  |  |  | SalesSegmentName   := guard( ddlSalesSegment.Data().Name(), "null" ), | 
|---|
|  |  |  | StockingPointID    := guard( ddlStockingPoint_MP.Data().ID(), "null" ), | 
|---|
|  |  |  | Customer           := efCustomerName.Text(), | 
|---|
|  |  |  | Quantity           := [Real]edtQuantity.Text(), | 
|---|
|  |  |  | UnitOfMeasureName  := ddlUnitOfMeasure_MP.Data().Name(), | 
|---|
|  |  |  | ForecastDemandDate := dsForecastDemandDate.Date(), | 
|---|
|  |  |  | DemandDate         := dsDemandDate.Date(), | 
|---|
|  |  |  | OrderType          := ddslOrderType.Text(), | 
|---|
|  |  |  | SalesAmount        := [Number]edtSalesAmount.Text() | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | data.ProductID( guard( ddlProduct_MP.Data().ID(), "null" ) ); | 
|---|
|  |  |  | data.BusinessType( guard( ddlBusinessType.Data().BusinessTypeName(), "null" ) ); | 
|---|
|  |  |  | data.SalesSegmentName( guard( ddlSalesSegment.Data().Name(), "null" ) ); | 
|---|
|  |  |  | data.StockingPointID( guard( ddlStockingPoint_MP.Data().ID(), "null" ) ); | 
|---|
|  |  |  | data.Customer( efCustomerName.Text() ); | 
|---|
|  |  |  | data.Quantity( [Real]edtQuantity.Text() ); | 
|---|
|  |  |  | data.UnitOfMeasureName( ddlUnitOfMeasure_MP.Data().Name() ); | 
|---|
|  |  |  | data.ForecastDemandDate( dsForecastDemandDate.Date() ); | 
|---|
|  |  |  | data.DemandDate( dsDemandDate.Date() ); | 
|---|
|  |  |  | data.OrderType( ddslOrderType.Text() ); | 
|---|
|  |  |  | data.SalesAmount( [Number]edtSalesAmount.Text() ); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Form.Close(); | 
|---|
|  |  |  | *] | 
|---|
|  |  |  | GroupServerCalls: false | 
|---|
|  |  |  | } | 
|---|