Example #1
0
 public static void ShowConsignmentForm(SAPConnector sapConnector)
 {
     confirmForm = new Consignment_Form(sapConnector);
     if (confirmForm.TableExist)
     {
         loginForm.Hide();
         confirmForm.Show();
     }
 }
Example #2
0
        private void SimilarItemCodes_FormClosed(object sender, FormClosedEventArgs e)
        {
            SAPConnector sapConnector = new SAPConnector();

            Consignment_Form con = new Consignment_Form(sapConnector);
            int cr = dataGridView1.CurrentRow.Index;

            if (cr >= 0)
            {
                con.tbPackageNumber.Text   = dataGridView1[5, cr].Value.ToString();
                dataGridView1.DoubleClick += new EventHandler(con.btnSearch_Click);
                //con.btnSearch_Click(sender, e);
                //con.btnSearch_Click(new object(), new EventArgs());
                //con.button1_Click(sender, e);
            }
        }
Example #3
0
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int cr = dataGridView1.CurrentRow.Index;

            if (cr >= 0)
            {
                SAPConnector sapConnector = new SAPConnector();

                Consignment_Form con = new Consignment_Form(sapConnector);
                con.LinenumAmountArtikelnummer = (string)dataGridView1[0, cr].Value;
                con.Artikelnummer2             = dataGridView1[1, cr].Value.ToString();
                Int32.TryParse(dataGridView1[3, cr].Value.ToString(), out con.AmountNumberist2);
                Int32.TryParse(dataGridView1[4, cr].Value.ToString(), out con.AmountNumbersoll2);

                con.Packnumber = (string)dataGridView1[5, cr].Value;

                con.SelectedItemCodePlus();
                //con.btnSearch_Click(sender, e);
                //con.btnSearch_Click(new object(), new EventArgs());
                //dataGridView1.DoubleClick += new EventHandler(con.btnSearch_Click);
                this.Close();
            }
        }
Example #4
0
        public void port()
        {
            SerialPort serialPort = new SerialPort("COM1", 9600, Parity.None, 8, StopBits.One);

            if (!serialPort.IsOpen)
            {
                serialPort.Open();
            }

            int length = serialPort.BytesToRead;

            char[] buf = new char[length];

            serialPort.Read(buf, 0, length);
            if (buf.Length != 0)
            {
                Consignment_Form f = new Consignment_Form(sapConnector);
                //f.tbScannedCode.Text = "";
            }
            serialPort.Close();

            //MessageBox.Show();
            //return buf.ToString();
        }