protected void CalculateExtendPrice(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.Cells[8].Text != null && e.Row.Cells[9].Text != null)
{
try
{
double price = double.Parse(e.Row.Cells[8].Text);
double num = double.Parse(e.Row.Cells[9].Text);
e.Row.Cells[10].Text = string.Format("{0:c}", num * price);
e.Row.Cells[8].Text = string.Format("{0:c}", price);
GridView1.Visible = true;
}
catch (Exception)
{
// lbldatastate.Text = "没有相关数据";
}
}
}
}
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.Cells[8].Text != null && e.Row.Cells[9].Text != null)
{
try
{
double price = double.Parse(e.Row.Cells[8].Text);
double num = double.Parse(e.Row.Cells[9].Text);
e.Row.Cells[10].Text = string.Format("{0:c}", num * price);
e.Row.Cells[8].Text = string.Format("{0:c}", price);
GridView1.Visible = true;
}
catch (Exception)
{
// lbldatastate.Text = "没有相关数据";
}
}
}
}