<%
if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
{
int counts = 6;
if (counts % 3 == 0)
{
int count = counts / 3;
for (int i = 0; i < count; i++)
{
for (int m = 1; m < 4; m++)
{
int index = 3 * i + m;
switch (m)
{
case 1:
%>
<%=index %>
-01
<%
break;
case 2:
%>
<%=index %>
-02
<%
break;
case 3:
%>
<%=index %>
-03
<%
break;
default:
break;
}
}
}
}
else
{
int count = counts / 3;
for (int i = 0; i < count; i++)
{
for (int m = 1; m < 4; m++)
{
int index = 3 * i + m;
switch (m)
{
case 1:
%>
<%=index %>
-01
<%
break;
case 2:
%>
<%=index %>
-02
<%
break;
case 3:
%>
<%=index %>
-03
<%
break;
default:
break;
}
}
}
int elsecount = counts % 3;
for (int m = 1; m <= elsecount; m++)
{
int index = 3 * count + m;
if (m == 1)
{
%>
<%=index %>
开始
<%
}
else
{
%>
<%=index %>
<%
}
if (m == elsecount)
{
%>
<%=index %>
结束
<%
}
}
}
}
%>