protected void DeleteLicense() { // Sanity check ensure only row selected if (licensesGridView.Selected.Rows.Count == 0) { return; } foreach (UltraGridRow selectedRow in this.licensesGridView.Selected.Rows) { //...and get the license object //UltraGridRow selectedRow = this.licensesGridView.Selected.Rows[0]; ApplicationLicense theLicense = selectedRow.Cells[0].Value as ApplicationLicense; // Get our controller ApplicationsWorkItemController wiController = WorkItem.Controller as ApplicationsWorkItemController; // ...and request it to delete the currently selected license wiController.DeleteLicense(theLicense); } // refresh the tab view ApplicationsWorkItem appWorkItem = WorkItem as ApplicationsWorkItem; appWorkItem.ExplorerView.RefreshView(); appWorkItem.GetActiveTabView().RefreshView(); }
public void PublisherFilterChangedHandler(object sender, PublisherFilterEventArgs e) { // Simply update our internal filters with those specified _publisherFilter = e.PublisherFilter; _showIncludedApplications = e.ViewIncludedApplications; _showIgnoredApplications = e.ViewIgnoredApplications; // ...and force a refresh if we are the active explorer view ILaytonView activeExplorerView = (ILaytonView)WorkItem.RootWorkItem.Workspaces[WorkspaceNames.ExplorerWorkspace].ActiveSmartPart; if (activeExplorerView == WorkItem.ExplorerView) { Trace.Write("Refreshing Applications Views\n"); workItem.GetActiveTabView().RefreshView(); WorkItem.ExplorerView.RefreshView(); } }