private void dataGrid1_CurrentCellChanged(object sender, EventArgs e)
        {
            string barCode = string.Empty;
            int row = dataGrid1.CurrentRowIndex;
            int col = dataGrid1.CurrentCell.ColumnNumber;

            int iRow;
            int iCol;
            DataTable myTable;
            bool gotoback = false;

            myTable = (DataTable)dataGrid1.DataSource;
            for (iRow = 0; iRow < myTable.Rows.Count; iRow++)
            {
                if (row == iRow)
                {
                    for (iCol = 0; iCol < myTable.Columns.Count; iCol++)
                    {
                        barCode = Convert.ToString(dataGrid1[iRow, 0]);
                        break;

                    }
                }

            }
            if (col == 1) {
                frmNewCheckP2 _frmNewCheckP2 = new frmNewCheckP2(barCode);
                _frmNewCheckP2.Show();
                this.Hide();
            }
        }
Esempio n. 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     frmNewCheckP2 fnew = new frmNewCheckP2();
     fnew.Show();
     this.Hide();
 }