| | |
| | | + " where unid= @unid and seq = @seq and ISNULL(usercode,'')= @usercode ) \n " |
| | | + " begin \n" |
| | | + " select unid,seq,UserCode,UserName,HasView,HasDownload, \n" |
| | | + " HasDelete,HasUpdate,StartDate,EndDate,DateFlag,AllowDownnums,AllowViewNums, \n" |
| | | + " HasDelete,HasUpdate,StartDate,EndDate,DateFlag,AllowDownnums,AllowViewNums,viewnums,downnums, \n" |
| | | + " @AllowMaxFileSize as AllowMaxFileSize,@AllowFileTypes as AllowFileTypes,AllowUpdateNums,@AuthorAllowDelete as AuthorAllowDelete,@AuthorAllowUpdate as AuthorAllowUpdate \n" |
| | | + " from _sys_AttachmentPermission \n" |
| | | + " where unid= @unid and seq = @seq and usercode= @usercode ; \n" |
| | |
| | | + " where unid= @unid and seq = @seq and ISNULL(usercode,'') <> @usercode) \n " |
| | | + " begin \n" |
| | | + " select @unid as unid,@seq as seq,@usercode as UserCode,@UserName as UserName,1 as HasView,0 as HasDownload, \n" |
| | | + " 0 as HasDelete,0 as HasUpdate,convert(datetime,'9999-12-31',120) as StartDate,convert(datetime,'9999-12-31',120) as EndDate,\n" |
| | | + " 0 as HasDelete,0 as HasUpdate,convert(datetime,'1901-01-01',120) as StartDate,convert(datetime,'9999-12-31',120) as EndDate,\n" |
| | | + " 1 as DateFlag,0 as AllowDownnums,0 as AllowViewNums,0 as AllowUpdateNums, \n" |
| | | + " @AllowMaxFileSize as AllowMaxFileSize,@AllowFileTypes as AllowFileTypes,@AuthorAllowDelete as AuthorAllowDelete,@AuthorAllowUpdate as AuthorAllowUpdate \n" |
| | | + " return ; \n" |