Esempio n. 1
0
        private void BTN_AddProduct_Click(object sender, EventArgs e)
        {
            foreach (ListViewItem item in LVL_Products.Items)
            {
                if (item.Text == this.product.CodeBSC && item.SubItems[1].Text == this.product.CodeClient)
                {
                    MessageBox.Show("Esse produto já está adicionado na lista! Tente outro por favor.");

                    return;
                }
            }

            this.kitProducts.Add(new KitProduct(Convert.ToInt32(NUD_Quantity.Value), this.product.Id));

            ListViewItem lvi = LVL_Products.Items.Add(this.product.CodeBSC);

            lvi.SubItems.Add(this.product.CodeClient);
            lvi.SubItems.Add(Convert.ToInt32(NUD_Quantity.Value).ToString());

            LBL_BollhoffCode.Text = "Digite um código e clique em Procurar.";
            LBL_ClientCode.Text   = "";
            LBL_Desc.Text         = "";
            LBL_Origin.Text       = "";

            this.product = null;

            if (TXT_Code.Text.Length > 1)
            {
                TXT_Code.Select(0, TXT_Code.Text.Length);
            }
            TXT_Code.Focus();

            NUD_Quantity.Value = 1;
        }
Esempio n. 2
0
        private void BTN_Print_Click(object sender, EventArgs e)
        {
            if (this.product == null)
            {
                return;
            }

            // PDF Generator
            Library.Outputs.Pdf.CreateProductTag(this.product, TXT_Destination.Text);

            // Print Document settings - new code
            Library.Outputs.AdobePrint.Print(Convert.ToInt32(NUD_Copies.Value));

            if (TXT_Code.Text.Length > 1)
            {
                TXT_Code.Select(0, TXT_Code.Text.Length);
            }
            TXT_Code.Focus();
        }
Esempio n. 3
0
        private void BTN_Print_Click(object sender, EventArgs e)
        {
            string desc       = " ";
            string codeClient = TXT_Code.Text;

            Product product = Product.CloneProduct(TXT_Code.Text);

            if (product != null)
            {
                codeClient = product.CodeClient;
                desc       = product.Description;
            }

            Library.Outputs.Pdf.CreateProductionLineTag(codeClient, desc, TXT_Destination.Text);

            // Print Document settings - new code
            Library.Outputs.AdobePrint.Print();

            if (TXT_Code.Text.Length > 1)
            {
                TXT_Code.Select(0, TXT_Code.Text.Length);
            }
            TXT_Code.Focus();
        }