Пример #1
0
        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();
        }
        /// <summary>
        /// Constructor
        /// </summary>
        public ApplicationsWorkItemController(WorkItem workItem)
            : base(workItem)
        {
            this.workItem = workItem as ApplicationsWorkItem;

            // We need to pull the publisher filter list from the database
            SettingsDAO lwDataAccess = new SettingsDAO();

            _publisherFilter = lwDataAccess.GetPublisherFilter();
        }
 public ApplicationsToolbarsController([ServiceDependency] WorkItem workItem)
 {
     this.workItem = workItem as ApplicationsWorkItem;
 }