/// <summary> /// Bind the available printers for this organization to the drop down list. /// This code is almost an exact copy of the code found in Arena's KioskList /// module. /// </summary> private void LoadPrinters() { ddlPrinters.Items.Clear(); ddlPrinters.Items.Add(new ListItem("[Use Kiosk's Default Windows Printer]", "-1")); ComputerSystemPrinterCollection printers = new ComputerSystemPrinterCollection(int.Parse(WebConfigurationManager.AppSettings["Organization"])); foreach (ComputerSystemPrinter printer in printers) { ddlPrinters.Items.Add(new ListItem(printer.PrinterName, printer.PrinterId.ToString())); } }
private void Page_Load(object sender, System.EventArgs e) { if (!IsPostBack) { // // Load up the list of printers. // ComputerSystemPrinterCollection cspc = new ComputerSystemPrinterCollection(ArenaContext.Current.Organization.OrganizationID); foreach (ComputerSystemPrinter csp in cspc) { ddlPrinter.Items.Add(new ListItem(csp.PrinterName, csp.PrinterName)); } tbStartingNumber.Text = "19000"; tbPrintCount.Text = "100"; } }