Ejemplo n.º 1
0
        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridViewCell cell = null;

            foreach (DataGridViewCell selectedCell in dataGridView1.SelectedCells)
            {
                cell = selectedCell;
                break;
            }
            if (cell != null)
            {
                DataGridViewRow row = cell.OwningRow;
                newsales.passv1 = row.Cells[0].Value.ToString();
                newsales.passv2 = row.Cells[1].Value.ToString();
                newsales.passv3 = row.Cells[2].Value.ToString();
                newsales.passv4 = row.Cells[3].Value.ToString();
                newsales.passv5 = row.Cells[4].Value.ToString();
                newsales.passv6 = row.Cells[5].Value.ToString();
            }

            this.Hide();
            newsales.lblUserName.Text = lblUserName.Text;
            newsales.lblUserType.Text = lblUserType.Text;
            newsales.ShowDialog();
        }
        private void lblNewSalesOrder_Click(object sender, EventArgs e)
        {
            frmNewSales newsales = new frmNewSales();

            newsales.lblUserName.Text = lblUserName.Text;
            newsales.lblUserType.Text = lblUserType.Text;
            newsales.ShowDialog();
        }