Ejemplo n.º 1
0
        private void SetBulkPrintQueues()
        {
            _bulkPrintQueueList = new BulkPrintQueueList();
            foreach (VirtualResourceMetadataPrintQueueUsage vrmpqu in _printQueueMetadataUsages)
            {
                XElement pqsd = XElement.Parse(vrmpqu.PrintQueueSelectionData);
                PrintQueueSelectionData printQueueSelectionData = Serializer.Deserialize <PrintQueueSelectionData>(pqsd);

                var allRemote = ConfigurationServices.AssetInventory.GetRemotePrintQueues();
                foreach (RemotePrintQueueDefinition printQueueId in printQueueSelectionData.SelectedPrintQueues.Where(x => x.GetType() == typeof(RemotePrintQueueDefinition)))
                {
                    var remoteQueues = allRemote.Where(x => x.PrintQueueId == printQueueId.PrintQueueId).Select(x => new { x.QueueName, x.ServerHostName });

                    if (remoteQueues.Count() == 0)
                    {
                        continue;
                    }

                    if (PrintQueueNotInList(printQueueId.PrintQueueId.ToString()))
                    {
                        BulkPrintQueueEnt bulkqueue = new BulkPrintQueueEnt();
                        bulkqueue.OldHostName  = remoteQueues.FirstOrDefault().ServerHostName;
                        bulkqueue.CurrentQueue = remoteQueues.FirstOrDefault().QueueName;
                        bulkqueue.Active       = true;
                        bulkqueue.VirtualResourceMetadataId = vrmpqu.VirtualResourceMetadataId;

                        if (!_bulkPrintQueueList.Select(x => x.CurrentQueue).Contains(bulkqueue.CurrentQueue))
                        {
                            _bulkPrintQueueList.Add(bulkqueue);
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void BulkPrintQueueUpdate(string newRourceId, string serverName)
        {
            BulkPrintQueueEnt bulkPrintQueueSelected = BulkPrintQueueRadView.CurrentRow.DataBoundItem as BulkPrintQueueEnt;

            bulkPrintQueueSelected.QueueChanged = true;
            bulkPrintQueueSelected.NewQueue     = newRourceId;
            bulkPrintQueueSelected.NewHostName  = serverName;
            BindBulkPrintQueueGrid();
        }
Ejemplo n.º 3
0
        private void UpdateBlankPrintQueues(string resourceId, string serverName)
        {
            BulkPrintQueueRadView.Rows.AddNew();
            BulkPrintQueueEnt bulkPrintQueueRow = BulkPrintQueueRadView.Rows.Last().DataBoundItem as BulkPrintQueueEnt;

            bulkPrintQueueRow.Active       = true;
            bulkPrintQueueRow.NewHostName  = serverName;
            bulkPrintQueueRow.CurrentQueue = "N/A";
            bulkPrintQueueRow.QueueChanged = true;
            bulkPrintQueueRow.NewQueue     = resourceId;
            bulkPrintQueueRow.VirtualResourceMetadataId = new Guid("00000000000000000000000000000000");
            BulkPrintQueueRadView.Focus();
            BulkPrintQueueRadView.Refresh();
        }