public override void update()
        {
            // Fix any remnants of the old Design Mode (Design.aspx)
            CswTableUpdate ActionUpdate = _CswNbtSchemaModTrnsctn.makeCswTableUpdate( "31509_Action_Update", "actions" );
            DataTable ActionTable = ActionUpdate.getTable( "where actionname = '" + CswEnumNbtActionName.Design + "'" );
            if( ActionTable.Rows.Count > 0 )
            {
                DataRow ActionRow = ActionTable.Rows[0];

                // Fix the action row
                ActionRow["showinlist"] = CswConvert.ToDbVal( false );
                ActionRow["url"] = DBNull.Value;
                ActionUpdate.update( ActionTable );

                // Remove button from landing pages
                Int32 DesignActionId = CswConvert.ToInt32( ActionRow["actionid"] );
                if( DesignActionId != Int32.MinValue )
                {
                    CswTableUpdate LandingPageUpdate = _CswNbtSchemaModTrnsctn.makeCswTableUpdate( "31509_LandingPage_update", "landingpage" );
                    DataTable LandingPageTable = LandingPageUpdate.getTable( "to_actionid", DesignActionId );
                    foreach( DataRow LandingPageRow in LandingPageTable.Rows )
                    {
                        LandingPageRow.Delete();
                    }
                    LandingPageUpdate.update( LandingPageTable );
                }
            } // if( ActionTable.Rows.Count > 0 )
        } // update()
Пример #2
0
 public void deleteLandingPageItem(LandingPageData.Request Request)
 {
     if (Request.LandingPageId != Int32.MinValue)
     {
         CswTableUpdate LandingPageUpdate = _CswNbtResources.makeCswTableUpdate("RemoveLandingPageItem", "landingpage");
         DataTable      LandingPageTable  = LandingPageUpdate.getTable("landingpageid", Request.LandingPageId);
         if (LandingPageTable.Rows.Count > 0)
         {
             foreach (DataRow LandingPageRow in LandingPageTable.Rows)
             {
                 LandingPageRow.Delete();
             }
             LandingPageUpdate.update(LandingPageTable);
         }
     }
 }