API CreateSelectedCategory: 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 create new selected category in system. ==== Exact name ==== <code>API_CreateSelectedCategory</code> ==== Type…“)
 
Řádka 16: Řádka 16:
 
!Relation
 
!Relation
 
|-
 
|-
|@WorkshopID
+
|@Name
 
|int
 
|int
 
|
 
|
|ID of workshop from workshop list (see relation)
+
|Name
|API_GetWorkshops.ID
+
|
 +
|-
 +
|@URL
 +
|text
 +
|
 +
|URL
 +
|
 +
|-
 +
|@Image
 +
|Image
 +
|
 +
|Image
 +
|
 +
|-
 +
|@ImageExt
 +
|nvarchar(5)
 +
|
 +
|Image ext
 +
|
 +
|-
 +
|@Language
 +
|int
 +
|
 +
|Language
 +
cs=0; pl=1; en=2; de=3; sk=4; hu=5; ar=11; bg=17
 +
|
 +
|-
 +
|@OrderNumber
 +
|int
 +
|
 +
|Order number
 +
|
 
|}
 
|}
  
 
==== Example ====
 
==== Example ====
 
<syntaxhighlight lang="sql">
 
<syntaxhighlight lang="sql">
EXEC [API_CreateSelectedCategory] @WorkshopID = 1 ,@Name = 'Name' ,@Street = 'Street' ,@City = 'City' ,@ZIPCode = 'ZIPCode' ,@Country = 'Country' ,@Region = 'Region' ,@State ='Česká republika' ,@StateID = 15797 ,@Phone = '+420 556 621 300' ,@Fax = '+420 596 790 789' ,@MobilePhone = '+420 556 621 301' ,@Email = 'info@nextis.cz' ,@Web = 'www.nextis.cz'
+
Declare @img AS VARBINARY(MAX)
 +
Select @img = CAST(bulkcolumn AS VARBINARY(MAX))
 +
FROM OPENROWSET(
 +
            BULK
 +
            'C:\test.png',
 +
            SINGLE_BLOB ) AS x
 +
 +
EXEC [API_CreateSelectedCategory] @Name= 'TestCategory3' ,@URL= 'http://nextis.cz' ,@Image= @img ,@ImageExt= '.png' ,@Lang = 0
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
==== Notices ====
 
==== Notices ====
 
None.
 
None.

Verze z 31. 7. 2017, 13:43

Description

Method allows You to create new selected category in system.

Exact name

API_CreateSelectedCategory

Type

Standard executable stored procedure.

Specification

Parameter Data type Value range Description Relation
@Name int Name
@URL text URL
@Image Image Image
@ImageExt nvarchar(5) Image ext
@Language int Language

cs=0; pl=1; en=2; de=3; sk=4; hu=5; ar=11; bg=17

@OrderNumber int Order number

Example

Declare @img AS VARBINARY(MAX)
Select @img = CAST(bulkcolumn AS VARBINARY(MAX))
 FROM OPENROWSET(
            BULK
            'C:\test.png',
            SINGLE_BLOB ) AS x
			
EXEC	[API_CreateSelectedCategory] @Name= 'TestCategory3' ,@URL= 'http://nextis.cz' ,@Image= @img ,@ImageExt= '.png' ,@Lang = 0

Notices

None.