private void btnPrintBoxLabelManually_Click(object sender, EventArgs e)
        {
            try
            {
                BoxLabel BoxLabel = new Label.BoxLabel();

                if (BoxLabel.IsReady == false)
                {
                    XtraMessageBox.Show("打印机出现问题, 不能打印, 请重启打印机 !!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                BoxLabel.ItemNo = txtManualPartNo.Text;
                BoxLabel.ItemName = txtManualPartName.Text;
                BoxLabel.ItemType = txtManualPartType.Text;
                BoxLabel.Material = txtManualMaterial.Text;
                BoxLabel.InspectSpec = txtManualInspectSpec.Text;
                BoxLabel.InspectStatus = txtManualInspectStatus.Text;
                BoxLabel.SalesOrderNo = txtManualPONo.Text;
                BoxLabel.ShipQty = int.Parse(txtManualQty.Text);
                BoxLabel.Revision = txtManualRevision.Text;

                BoxLabel.PrintLabel();
                BoxLabel = null;
                GC.Collect();
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(string.Format("不能列印, 请检查输入的资料是否正确 !!\n原因 : {0}", ex.Message), "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void btnPrintBoxLabelFromWH_Click(object sender, EventArgs e)
        {
            Label.BoxLabel BoxLabel = new Label.BoxLabel();

            if (BoxLabel.IsReady == false)
            {
                XtraMessageBox.Show("打印机出现问题, 不能打印, 请重启打印机 !!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            for (int i = 0; i < gridWHList.MainView.RowCount; i++)
            {
                SoCompress SoCompress = (SoCompress)gridWHList.MainView.GetRow(i);
                BoxLabel.PrintLabel(SoCompress);
            }

            BoxLabel = null;
        }
Example #3
0
        private void btnPrintTSICheckingLabel_Click(object sender, EventArgs e)
        {
            Label.BoxLabel BoxLabel = new Label.BoxLabel();

            if (BoxLabel.IsReady == false)
            {
                XtraMessageBox.Show("打印机出现问题, 不能打印, 请重启打印机 !!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            BoxLabel.ItemNo = txtPartNo.Text;
            BoxLabel.ItemName = txtPartName.Text;
            BoxLabel.ItemType = txtPartType.Text;
            BoxLabel.Revision = txtRevision.Text;
            BoxLabel.InspectStatus = txtInspectStatus.Text;
            BoxLabel.Inspector = txtInspector.Text;
            BoxLabel.InspectSpec = txtInspectSpec.Text;
            BoxLabel.JSNo = txtJSNo.Text;
            BoxLabel.IRNo = txtIRNo.Text;
            BoxLabel.ShipQty = double.Parse(txtShipQty.Text);
            BoxLabel.PrintTSICheckingLabel();
            BoxLabel = null;
            GC.Collect();
        }
Example #4
0
        private void btnPrintBoxLabel_Click(object sender, EventArgs e)
        {
            Label.BoxLabel BoxLabel = new Label.BoxLabel();

            if (BoxLabel.IsReady == false)
            {
                XtraMessageBox.Show("打印机出现问题, 不能打印, 请重启打印机 !!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            for (int i = 0; i < gridShipList.MainView.RowCount; i++)
            {
                SoCompress SoCompress = (SoCompress)gridShipList.MainView.GetRow(i);
                SoCompress.Revision = txtRevision.Text;
                SoCompress.InspectStatus = txtInspectStatus.Text;
                SoCompress.InspectSpec = txtInspectSpec.Text;
                SoCompress.JSNo = txtJSNo.Text;
                BoxLabel.IRNo = txtIRNo.Text;
                BoxLabel.PrintLabel(SoCompress);
            }

            BoxLabel = null;
            GC.Collect();
        }
        private void btnPrintSelectedBoxLabelFromWH_Click(object sender, EventArgs e)
        {
            if (gridView1.SelectedRowsCount == 0)
            {
                XtraMessageBox.Show("请先选取要列印的资料 !!", "注意!!", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            Label.BoxLabel BoxLabel = new Label.BoxLabel();

            for (int i = 0; i < gridView1.SelectedRowsCount; i++)
            {
                int row = (gridView1.GetSelectedRows()[i]);
                SoCompress SoCompress = (SoCompress)gridWHList.MainView.GetRow(row);
                BoxLabel.PrintLabel(SoCompress);
            }

            BoxLabel = null;
        }