Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE PROCEDURE [dbo].[as_en_getAvailableStatusesForInstance]
- @entityCode nvarchar(256),
- @instanceID int,
- @username nvarchar(32)
- AS
- BEGIN
- declare @langID int = (select langID from as_users where username = @username)
- execute as_print @langID
- select *, s.id StatusID ,
- (case isnull(buttonTitle,'')
- when '' then isnull(ls.name, s.name )
- else buttonTitle end
- ) Name
- from as_en_availableStatuses avs
- inner join as_en_statuses s on s.id = avs.availableStatusID
- left join [as_lang_statuses] ls on ls.itemID =s.id and langID = @langID
- where
- currentStatusID in (select statusID from as_en_entityInstances
- where id = @instanceID and entityID in (select id from as_en_entities
- where code = @entityCode)
- )
- and ( ( isnull(users, '') ='' and isnull(roles, '') ='' ) or dbo.sec_hasAccessByUsersRoles(@username, users, roles) = '1')
- order by avs.ord, s.ord
- END
Advertisement
Comments
-
- https://bigwarp.io/o5wgauv47cko
- https://bigwarp.io/986kbhkymnvg
- https://bigwarp.io/hleohc4qy3c5
- https://bigwarp.io/0r83gjimd11z
- https://bigwarp.io/4hg6gnt1zh8n
- https://bigwarp.io/ekprxuqi6k83
- https://bigwarp.io/b6wqcm6hkzys
- https://bigwarp.io/z9fw05ip2y2l
- https://bigwarp.io/3qr69vsvkmgl
- https://bigwarp.io/fxh71t3g13b0
- https://bigwarp.io/j3en5tjh370g
- https://bigwarp.io/cvnecs5zvfql
- https://bigwarp.io/8xleai4ktegz
- https://bigwarp.io/e860udyoatzx
- https://bigwarp.io/jfwuqvk88ltb
- https://bigwarp.io/b6gdsc5tgc2i
- https://bigwarp.io/jq3lr11jg7v3
- https://bigwarp.io/oic40kp7dh27
- https://bigwarp.io/xc13z8c97ulu
- https://bigwarp.io/7quiw47fvo2p
- https://bigwarp.io/15hyup7w20yd
- https://bigwarp.io/oducs5mwo4jc
- https://bigwarp.io/pa8cvmyhcwew
- https://bigwarp.io/kp0k87pkrb80
- https://bigwarp.io/uhs1vrvc69pg
- https://bigwarp.io/7w6wh19mofyw
- https://bigwarp.io/cneipr5oatrf
- https://savefiles.com/x2j0mf4e14r0
- https://savefiles.com/90fahbjcaubt
- https://bigwarp.io/f7uf2pf9jdwv
- https://savefiles.com/rvyx11jjp14w
- https://savefiles.com/m29cl4z76vst
- https://savefiles.com/n4fpme70q602
- https://savefiles.com/hp8t5ejp8sof
- https://savefiles.com/ppotk3976ae3
- https://savefiles.com/lqnjsu24sh67
- https://savefiles.com/061dl3qlt28u
- https://savefiles.com/y4ufy92mmlgx
- https://savefiles.com/3y5d1jkh9kh2
- https://savefiles.com/8iz7cc2t9zjx
- https://savefiles.com/g8tj7a80cfrg
Add Comment
Please, Sign In to add comment
Advertisement