protected void gvINF_CrudePrice_RowDataBound(object sender, GridViewRowEventArgs e)
{
string type = string.Empty;
string curde_id = string.Empty;
if (e.Row.RowType == DataControlRowType.DataRow)
{
type = (e.Row.FindControl("lblCrude_Baseid") as Label).Text;
switch (type)
{
case "CRUDE_LIGHT":
(e.Row.FindControl("lblCrude_Baseid") as Label).Text = "轻质油";
break;
case "CRUDE_MIDDLE1":
(e.Row.FindControl("lblCrude_Baseid") as Label).Text = "中质油1";
break;
case "CRUDE_MIDDLE2":
(e.Row.FindControl("lblCrude_Baseid") as Label).Text = "中质油2";
break;
case "CRUDE_HEAVE":
(e.Row.FindControl("lblCrude_Baseid") as Label).Text = "重质油";
break;
}
curde_id = (e.Row.FindControl("lblProduct_Name") as Label).Text;
DataSet ds=logic.select_BaseProduct(curde_id);
(e.Row.FindControl("lblProduct_Name") as Label).Text = ds.Tables[0].Rows[0]["product_name"].ToString();
}
}
RowDataBound
最新推荐文章于 2016-07-22 21:41:35 发布