//GridView绑定
switch (e.Row.RowType)
{
case DataControlRowType.DataRow:
if (e.Row.RowState == DataControlRowState.Alternate || e.Row.RowState == DataControlRowState.Normal)
{
sumgongzi += int.Parse(e.Row.Cells[1].Text);
}
break;
case DataControlRowType.Footer:
e.Row.Cells[0].Text = "合计";
e.Row.Cells[1].Text = sumgongzi.ToString();
sumgongzi = 0;
break;
}