日期:2014-05-17 浏览次数:20514 次
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
//如果是绑定数据行
if (e.Row.RowType == DataControlRowType.DataRow)
{
//自动计算8.5单价X数量后的金额
if (e.Row.Cells[7].Text != null)
{
float Pbdiscount = Convert.ToSingle(e.Row.Cells[6].Text.Trim()); //8.5折后单价
float Enum = Convert.ToSingle(e.Row.Cells[7].Text.Trim()); //数量
String sumEprice =(Pbdiscount*Enum).ToString(); //金额
e.Row.Cells[8].Text = sumEprice;
}
}
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
//如果是绑定数据行
if (e.Row.RowType == DataControlRowType.DataRow)
{
//自动计算8.5单价X数量后的金额
if (e.Row.Cells[7].Text != null)