Example #1
0
        private void btPrint_Click(object sender, EventArgs e)
        {
            var service = new BalanceWarehouse();

            service.UseDefaultCredentials = true;

            switch (ReturnIndex)
            {
            case 1:
            {
                try
                {
                    service.WSPrintPid(data, Globals.theWinlogon);
                }
                catch (Exception ex)
                {
                    MessageBoxExample.MyMessageBox.ShowBox(ex.Message);
                }
            }
            break;

            case 2:
            {
                try
                {
                    service.WSPrintItemLabel(data, (int)numericUpDown1.Value, Globals.theWinlogon);
                }
                catch (Exception ex)
                {
                    MessageBoxExample.MyMessageBox.ShowBox(ex.Message);
                }
            }
            break;

            case 3:
            {
                try
                {
                    service.WSPrintBinLabel(data, (int)numericUpDown1.Value, Globals.theWinlogon);
                }
                catch (Exception ex)
                {
                    MessageBoxExample.MyMessageBox.ShowBox(ex.Message);
                }
            }
            break;
            }
            numericUpDown1.Value = 1;
            tbInputData.Text     = "";
            lbDescription.Text   = "";
            tbInputData.Focus();
            btPrint.Enabled = false;
        }