Exemplo n.º 1
0
        private void toolStripFillUp_Click(object sender, EventArgs e)
        {
            int lastRow    = dataGridView1.Rows.Count;
            int maxIDFound = 0;

            for (int i = 0; i < dataGridView1.RowCount; i++)
            {
                if (Convert.ToInt32(dataGridView1.Rows[i].Cells[0].Value.ToString()) > maxIDFound)
                {
                    maxIDFound = Convert.ToInt32(dataGridView1.Rows[i].Cells[0].Value.ToString());
                }
            }
            NewFillUpForm myNewFillUpForm = new NewFillUpForm((maxIDFound + 1));

            myNewFillUpForm.ShowDialog();
            FillData();
        }
Exemplo n.º 2
0
        private void toolStripFillUp_Click(object sender, EventArgs e)
        {
            int lastRow = dataGridView1.Rows.Count;
            int maxIDFound = 0;
            for (int i = 0; i < dataGridView1.RowCount; i++)
            {
                if (Convert.ToInt32( dataGridView1.Rows[i].Cells[0].Value.ToString() ) > maxIDFound)
                {
                    maxIDFound = Convert.ToInt32(dataGridView1.Rows[i].Cells[0].Value.ToString());
                }

            }
            NewFillUpForm myNewFillUpForm = new NewFillUpForm((maxIDFound+ 1));
            myNewFillUpForm.ShowDialog();
            FillData();
        }