public bool moveGroup(int from, int to)
{
if (from < 1 || from > m_groups.count())
{
return false;
}
if (to < 1 || to > m_groups.count())
{
return false;
}
if (from != to)
{
cReportGroup group = null;
cReportGroups collGroups = new cReportGroups();
for (int _i = 0; _i < m_groups.count(); _i++)
{
group = m_groups.item(_i);
collGroups.add(group, group.getKey());
}
m_groups.clear();
int index = 0;
for (int _i = 0; _i < collGroups.count(); _i++)
{
group = collGroups.item(_i);
index = index + 1;
if (index != from)
{
if (index == to)
{
cReportGroup group2 = collGroups.item(from);
m_groups.add2(group2, group2.getKey());
}
m_groups.add2(group, group.getKey());
}
}
}
return true;
}