protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
protectedvoidGridView1_RowDataBound(objectsender,GridViewRowEventArgse){stockClasssc=...
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
stockClass sc=new stockClass();
if(e.Row.RowType==DataControlRowType.DataRow)
{
e.Row.Cells[3].Text = Convert.ToString(sc.stock(Convert.ToInt32(e.Row.Cells[3].Text)));
e.Row.Cells[4].Text = Convert.ToString(sc.sell(Convert.ToInt32(e.Row.Cells[4].Text)));
e.Row.Cells[5].Text = Convert.ToString(sc.stock(Convert.ToInt32(e.Row.Cells[5].Text)) - sc.sell(Convert.ToInt32(e.Row.Cells[5].Text)));
}
}
谁知道,这个类StockClass是在哪里定义的,怎样定义 展开
{
stockClass sc=new stockClass();
if(e.Row.RowType==DataControlRowType.DataRow)
{
e.Row.Cells[3].Text = Convert.ToString(sc.stock(Convert.ToInt32(e.Row.Cells[3].Text)));
e.Row.Cells[4].Text = Convert.ToString(sc.sell(Convert.ToInt32(e.Row.Cells[4].Text)));
e.Row.Cells[5].Text = Convert.ToString(sc.stock(Convert.ToInt32(e.Row.Cells[5].Text)) - sc.sell(Convert.ToInt32(e.Row.Cells[5].Text)));
}
}
谁知道,这个类StockClass是在哪里定义的,怎样定义 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询