USP_DATAFORMTEMPLATE_VIEW_SALESORDERSUMMARY

The load procedure used by the view dataform template "Sales Order Summary"

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN The input ID parameter used to load the fields defined on the form.
@DATALOADED bit INOUT Output parameter indicating whether or not data was actually loaded.
@ORDERNUMBER int INOUT Order number
@TOTAL money INOUT Total

Definition

Copy


            CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_SALESORDERSUMMARY
            (
                @ID uniqueidentifier,
                @DATALOADED bit = 0 output,
                @ORDERNUMBER int = null output,
                @TOTAL money = null output
            )
            as
                set nocount on;

                set @DATALOADED = 0;

                select 
                    @DATALOADED = 1,
                    @ORDERNUMBER = SALESORDER.SEQUENCEID,
                    @TOTAL = [SALESORDER].[AMOUNT]
                from
                    dbo.SALESORDER
                where
                    SALESORDER.ID = @ID;

                return 0;