<%--
Name:
Author:
Description:
--%>
<%@ CodeTemplate Language="C#" TargetLanguage="T-SQL" ResponseEncoding="UTF-8" Src="" Inherits="" Debug="False" Description="Template description here." %>
<%for(int i=1;i<=13;i++){%>
private decimal _Totalsl<%=i%>;
<%}%>
if(e.Item.ItemType==ListItemType.Item || e.Item.ItemType==ListItemType.AlternatingItem)
{//相加
<%for(int i=1;i<=13;i++){%>
decimal sl<%=i%> = Convert.ToDecimal(e.Item.Cells[<%=i+5%>].Text);
_Totalsl<%=i%> += sl<%=i%>;
<%}%>
}
else if(e.Item.ItemType==ListItemType.Footer)
{//总和
e.Item.Cells[0].Text = "合计:";
e.Item.Cells[0].HorizontalAlign = HorizontalAlign.Right;
e.Item.Cells[0].CssClass = "ItemStyleRightBold";
<%for(int i=1;i<=13;i++){%>
e.Item.Cells[<%=i+5%>].Text = string.Format("{0:0.00}", _Totalsl<%=i%>);
e.Item.Cells[<%=i+5%>].CssClass = "ItemStyleRightBold";
<%}%>
}