Example #1
0
        private void btChangePrinter_Click(object sender, EventArgs e)
        {
            string             printer = "";
            fmTerminalPrinters tp      = new fmTerminalPrinters();

            tp.ShowDialog(ref printer);
            if ((!lbPrinterName.Text.Equals(printer)) && (!printer.Equals("")))
            {
                lbPrinterName.Text = printer;
                BalanceWarehouse Warehouse = new BalanceWarehouse();
                Warehouse.UseDefaultCredentials = true;

                try
                {
                    Warehouse.WSSetPrinter(Globals.theWinlogon, Globals.theLocation, printer);
                }
                catch (Exception ex)
                {
                    MessageBoxExample.MyMessageBox.ShowBox(ex.Message);
                }

                Warehouse.Dispose();
            }

            tbInputData.Focus();
        }