API UpdateTransport: Porovnání verzí

Z Podpora.nextis.cz
Skočit na navigaci Skočit na vyhledávání
Bez shrnutí editace
Bez shrnutí editace
 
(Není zobrazeno 5 mezilehlých verzí od stejného uživatele.)
Řádek 16: Řádek 16:
!Relation
!Relation
|-
|-
|I@D
|@ID
|int
|int
|
|Internal system id
|Internal system id
|
|
|-
|-
|@TransportName
|@TransportName
|varchar(250)
|nvarchar(250)
|
|Transport name
|Transport name
|
|
|-
|-
|@Description
|@Description
|varchar(200)
|nvarchar(200)
|
|Description
|Description
|
|
Řádek 33: Řádek 36:
|@Prohibit
|@Prohibit
|int
|int
|
|Prohibit
|Prohibit
|
|
Řádek 38: Řádek 42:
|@CashPaymentAllowed
|@CashPaymentAllowed
|int
|int
|
|Cash payment allowed
|Cash payment allowed
|
|
Řádek 43: Řádek 48:
|@WireTransferPaymentAllowed
|@WireTransferPaymentAllowed
|int
|int
|
|Wire transfer payment allowed
|Wire transfer payment allowed
|
|
Řádek 48: Řádek 54:
|@HideOnEshop
|@HideOnEshop
|bit
|bit
|
|Hide on eshop
|Hide on eshop
|
|
Řádek 53: Řádek 60:
|@BranchID
|@BranchID
|int
|int
|
|ID of branch from branch list (see relation)
|ID of branch from branch list (see relation)
|API_GetBranches.ID
|API_GetBranches.ID
|}
|}


==== Return ====
0 : OK
100 : Item could not be updated


==== Example ====
==== Example ====
<syntaxhighlight lang="sql">
<syntaxhighlight lang="sql">
DECLARE @return_value int
  DECLARE @ID int
  DECLARE @ID int
  DECLARE @TransportName
  DECLARE @TransportName nvarchar(250)
  DECLARE @Description
  DECLARE @Description nvarchar(200)
  DECLARE @Prohibit
  DECLARE @Prohibit int
  DECLARE @CashPaymentAllowed
  DECLARE @CashPaymentAllowed int
  DECLARE @WireTransferPaymentAllowed
  DECLARE @WireTransferPaymentAllowed int
  DECLARE @HideOnEshop
  DECLARE @HideOnEshop bit
  DECLARE @BranchID
  DECLARE @BranchID int
   
   
  SELECT @ID = ID,
  SELECT @ID = [ID],
         @TransportName = 'Transport 2',
         @TransportName = 'Transport 2',
         @Description = Description,
         @Description = [Description],
         @Prohibit = Prohibit,
         @Prohibit = [Prohibit],
         @CashPaymentAllowed = CashPaymentAllowed,
         @CashPaymentAllowed = [CashPaymentAllowed],
         @WireTransferPaymentAllowed = WireTransferPaymentAllowed,
         @WireTransferPaymentAllowed = [WireTransferPaymentAllowed],
         @HideOnEshop = HideOnEshop,
         @HideOnEshop = [HideOnEshop],
         @BranchID = BranchID
         @BranchID = [BranchID]
  FROM  [API_GetTransports]  
  FROM  [API_GetTransports]  
  WHERE  ID = 3
  WHERE  ID = 3
   
   
  EXECUTE [API_UpdateTransport]  
  EXECUTE @return_value = [API_UpdateTransport]  
  @ID,
  @ID,
  @TransportName,
  @TransportName,

Aktuální verze z 9. 11. 2018, 14:47

Description

Method allows You to update transport in system.

Exact name

API_UpdateTransport

Type

Standard executable stored procedure.

Specification

Parameter Data type Value range Description Relation
@ID int Internal system id
@TransportName nvarchar(250) Transport name
@Description nvarchar(200) Description
@Prohibit int Prohibit
@CashPaymentAllowed int Cash payment allowed
@WireTransferPaymentAllowed int Wire transfer payment allowed
@HideOnEshop bit Hide on eshop
@BranchID int ID of branch from branch list (see relation) API_GetBranches.ID

Return

0 : OK
100 : Item could not be updated

Example

 DECLARE @return_value int
 DECLARE @ID int
 DECLARE @TransportName nvarchar(250)
 DECLARE @Description nvarchar(200)
 DECLARE @Prohibit int
 DECLARE @CashPaymentAllowed int
 DECLARE @WireTransferPaymentAllowed int
 DECLARE @HideOnEshop bit
 DECLARE @BranchID int
 
 SELECT @ID = [ID],
        @TransportName = 'Transport 2',
        @Description = [Description],
        @Prohibit = [Prohibit],
        @CashPaymentAllowed = [CashPaymentAllowed],
        @WireTransferPaymentAllowed = [WireTransferPaymentAllowed],
        @HideOnEshop = [HideOnEshop],
        @BranchID = [BranchID]
 FROM   [API_GetTransports] 
 WHERE  ID = 3
 
 EXECUTE @return_value = [API_UpdateTransport] 
 @ID,
 @TransportName,
 @Description,
 @Prohibit,
 @CashPaymentAllowed,
 @WireTransferPaymentAllowed,
 @HideOnEshop,
 @BranchID

Notices

None.