API UpdateStock: Porovnání verzí
Z Podpora.nextis.cz
(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…“) |
|||
| (Není zobrazena jedna mezilehlá verze od stejného uživatele.) | |||
| Řádka 41: | Řádka 41: | ||
|- | |- | ||
|@EshopName | |@EshopName | ||
| − | | | + | |nvarchar(30) |
| | | | ||
|Eshop name | |Eshop name | ||
| Řá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 | ||
DECLARE @Name nvarchar(100) | DECLARE @Name nvarchar(100) | ||
| − | DECLARE @Description | + | DECLARE @Description nvarchar(500) |
| − | DECLARE @EshopName | + | DECLARE @EshopName nvarchar(30) |
DECLARE @BranchID int | DECLARE @BranchID int | ||
DECLARE @IsVisibleOnEshop int | DECLARE @IsVisibleOnEshop int | ||
| Řádka 80: | Řádka 84: | ||
WHERE id = 3 | WHERE id = 3 | ||
| − | EXECUTE [API_UpdateStock] | + | EXECUTE @return_value = [API_UpdateStock] |
@ID, | @ID, | ||
@WorkshopID, | @WorkshopID, | ||
Aktuální verze z 9. 11. 2018, 15:45
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 | nvarchar(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 nvarchar(500)
DECLARE @EshopName nvarchar(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.