Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //
                // Populate the list of system printers.
                //
                ddlSystemPrinters.Items.Add(new ListItem(""));
                foreach (String printer in PrinterSettings.InstalledPrinters)
                {
                    ddlSystemPrinters.Items.Add(new ListItem(printer));
                }

                //
                // Populate the list of Arena printers.
                //
                ddlArenaPrinters.Items.Add(new ListItem(""));
                foreach (ComputerSystemPrinter csp in new ComputerSystemPrinterCollection(CurrentArenaContext.Organization.OrganizationID))
                {
                    ddlArenaPrinters.Items.Add(new ListItem(csp.PrinterName));
                }

                //
                // Populate the list of Locations.
                //
                ddlLocations.Items.Add(new ListItem("", "-1"));
                foreach (Location loc in new LocationCollection(CurrentArenaContext.Organization.OrganizationID))
                {
                    ddlLocations.Items.Add(new ListItem(loc.FullName, loc.LocationId.ToString()));
                }

                //
                // Populate the list of Kiosks.
                //
                ddlKiosks.Items.Add(new ListItem(""));
                ComputerSystemCollection csc = new ComputerSystemCollection();
                csc.LoadAllSystems(CurrentArenaContext.Organization.OrganizationID);
                foreach (ComputerSystem comp in csc)
                {
                    if (comp.Kiosk)
                    {
                        ddlKiosks.Items.Add(new ListItem(comp.SystemName, comp.SystemId.ToString()));
                    }
                }

                ReportingService2005 reportingService = new ReportServiceBuilder().GetReportingService();
                foreach (CatalogItem item in reportingService.ListChildren(CurrentOrganization.Settings["ReportServerRoot"] + "/CheckIn", true))
                {
                    if (item.Type == ItemTypeEnum.Report)
                    {
                        ddlRSDirectLabel.Items.Add(new ListItem(item.Name, item.Path));
                        ddlRSFrameworkLabel.Items.Add(new ListItem(item.Name, item.Path));
                    }
                }
            }
        }
Пример #2
0
 public void Initialize()
 {
     _system = ComputerSystem.GetInstances();
 }