Esempio n. 1
0
        public ActionsSnapIn()
        {
            //System.Diagnostics.Debugger.Launch();
            ApplicationScopeNode applicationScopeNode = new ApplicationScopeNode(true);

            applicationScopeNode.ApplicationImported += new EventHandler(rootNode_ApplicationImported);
            RootNode = applicationScopeNode;
            if (HasSecurityRights)
            {
                InitializeRootApplications();
            }
            SmallImages.Add(Resources.authority_16);
            SmallImages.Add(Resources.add_scope);
        }
Esempio n. 2
0
        public string GenerateQuery()
        {
            var query = $@" 
IF(NOT EXISTS(SELECT TOP (1) 1 from [dbo].[GenericAnnouncements] where ExternalId={ID.Safe()} ))
BEGIN
    INSERT INTO [dbo].[GenericAnnouncements]
               ([Id]
               ,[ExternalId]
               ,[HostSite]
               ,[Title]
               ,[Description]
               ,[Owner]
               ,[Images]
               ,[ThumbImages]
               ,[SmallImages]
               ,[LargeUrls]
               ,[Price]
               ,[First_Publication_Date]
               ,[Expiration_Date]
               ,[Category_Id]
               ,[Category_Name]
               ,[LinkUrl]
               ,[Extra]
               ,[LinkText]
               ,[City]
               ,[Latitude]
               ,[Langitude]
               ,[Region]
               ,[SourceType])
         VALUES
               (NEWID()
               ,{ID.Safe()}
               ,{HostSite.Safe()}
               ,{Title.Safe()}
               ,{Description.Safe()}
               ,{Owner.Safe()}
               ,{Images.Safe()}
               ,{ThumbImages.Safe()}
               ,{SmallImages.Safe()}
               ,{LargeUrls.Safe()}
               ,{Price.Safe()}
               ,{first_publication_date.Safe()}
               ,{expiration_date.Safe()}
               ,{category_id.Safe()}
               ,{category_name.Safe()}
               ,{LinkUrl.Safe()}
               ,{Extra.Safe()}
               ,{LinkText.Safe()}
               ,{City.Safe()}
               ,{Latitude.Safe()}
               ,{Langitude.Safe()}
               ,{Region.Safe()}
               ,0)
END;
ELSE
BEGIN
    UPDATE [dbo].[GenericAnnouncements]
       SET 
           [HostSite] = {HostSite.Safe()}
          ,[Title] = {Title.Safe()}
          ,[Description] = {Description.Safe()}
          ,[Owner] = {Owner.Safe()}
          ,[Images] = {Images.Safe()}
          ,[ThumbImages] = {ThumbImages.Safe()}
          ,[SmallImages] = {SmallImages.Safe()}
          ,[LargeUrls] = {LargeUrls.Safe()}
          ,[Price] = {Price.Safe()}
          ,[First_Publication_Date] = {first_publication_date.Safe()}
          ,[Expiration_Date] = {expiration_date.Safe()}
          ,[Category_Id] = {category_id.Safe()}
          ,[Category_Name] = {category_name.Safe()}
          ,[LinkUrl] = {LinkUrl.Safe()}
          ,[Extra] = {Extra.Safe()}
          ,[LinkText] = {LinkText.Safe()}
          ,[City] = {City.Safe()}
          ,[Latitude] = {Latitude.Safe()}
          ,[Langitude] = {Langitude.Safe()}
          ,[Region] = {Region.Safe()}
          --,[SourceType] = <SourceType, int,>
     WHERE ExternalId={ID.Safe()}

END;
";


            return(query);
        }