Beispiel #1
0
        private void PrintSelectedItems()
        {
            labelService = new LabelService();
            string jobName = txtJobName.Text;
            int    qnty    = int.Parse(txtLabelQnty.Text);

            if (dgRecieptItems.DataSource != null)
            {
                if (dgRecieptItems.SelectedRows.Count > 0)
                {
                    foreach (DataGridViewRow row in dgRecieptItems.SelectedRows)
                    {
                        Inventory    inv = (Inventory)bsRecieptItemBindingSource[row.Index];
                        ThermalLabel lb  = labelService.GenerateInventoryLabel(inv.LineID.ToString(),
                                                                               jobName,
                                                                               DateTime.Today.ToShortDateString());
                        labelService.PrintLabel(lb, qnty);
                    }
                }
            }
        }
        /// <summary>
        /// Print Barcodes of Selected LineItems
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            LabelService lbService = new LabelService();
            string       jobName   = oService.GetOrderByID(_receipt.OrderNum.Value).Job.Jobname;

            if (dgOrderReceiptItems.DataSource != null)
            {
                if (dgOrderReceiptItems.SelectedRows.Count > 0)
                {
                    foreach (DataGridViewRow row in dgOrderReceiptItems.SelectedRows)
                    {
                        int          copies = Convert.ToInt16(row.Cells["LB_Qnty_col"].FormattedValue);
                        Inventory    inv    = (Inventory)bsOrderReceiptItems[row.Index];
                        ThermalLabel lb     = lbService.GenerateInventoryLabel(inv.LineID.ToString(),
                                                                               jobName,
                                                                               DateTime.Today.ToShortDateString());
                        lbService.PrintLabel(lb, copies);
                    }
                }
            }
        }