Ejemplo n.º 1
0
        //check for any group updates and apply needed updates
        private void btnupdate_Click(object sender, EventArgs e)
        {
            int     updated = 0;
            GroupDB gdb     = new GroupDB(db);

            if (groupnumscbx.SelectedIndex != 2)
            {
                int x = 0;
                foreach (int index in attention)
                {
                    if (index <= 0) // check that the kid is passed the group limit
                    {
                        gdb.updategroup(data[x][0], data[x][1]);
                        createTableForGroup(groupnumscbx.SelectedIndex + 1);
                        updated++;
                    }
                    x++;
                }
            }

            if (updated == 0)
            {
                MessageBox.Show("No changes needed");
            }
        }