API UpdateStock: Porovnání verzí

Z Podpora.nextis.cz
Přejít na: navigace, hledání
(Založena nová stránka s textem „==== Description ==== Method allows You to update stock in system. ==== Exact name ==== <code>API_UpdateStock</code> ==== Type ==== Standard executable s…“)
 
Řádka 59: Řádka 59:
 
|}
 
|}
  
 +
==== 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 @WorkshopID int
 
  DECLARE @WorkshopID int
Řádka 80: Řádka 84:
 
  WHERE  id = 3
 
  WHERE  id = 3
 
   
 
   
  EXECUTE [API_UpdateStock]  
+
  EXECUTE @return_value = [API_UpdateStock]  
 
   @ID,  
 
   @ID,  
 
   @WorkshopID,
 
   @WorkshopID,

Verze z 20. 9. 2017, 15:10

Description

Method allows You to update stock in system.

Exact name

API_UpdateStock

Type

Standard executable stored procedure.

Specification

Parameter Data type Value range Description Relation
@ID int Internal system id
@WorkshopID int ID of workshop from workshop list (see relation) API_GetWorkshops.ID
@Name nvarchar(50) Name
@Description nvarchar(500) Description
@EshopName nchar(30) Eshop name
@BranchID int ID of branch from branch list (see relation) API_GetBranches.ID
@IsVisibleOnEshop int Is visible on eshop

Return

0 : OK
100 : Item could not be updated

Example

 DECLARE @return_value int
 DECLARE @ID int 
 DECLARE @WorkshopID int
 DECLARE @Name nvarchar(100)
 DECLARE @Description varchar(500)
 DECLARE @EshopName nchar(30)
 DECLARE @BranchID int
 DECLARE @IsVisibleOnEshop int
 
 SELECT @ID = [ID], 
       @WorkshopID = [WorkshopID],
       @Name = 'Name 2',
       @Description = [Description],
       @EshopName = [EshopName],
       @BranchID = [BranchID],
       @IsVisibleOnEshop = [IsVisibleOnEshop]
 FROM   [API_GetStocks] 
 WHERE  id = 3
 
 EXECUTE @return_value = [API_UpdateStock] 
  @ID, 
  @WorkshopID,
  @Name,
  @Description,
  @EshopName,
  @BranchID,
  @IsVisibleOnEshop

Notices

None.