显示:
private void DataTableTest1_Load(object sender, EventArgs e)
{
string sql = "select *,单价*数量*(1-折扣) as 总价 from dbo.订单明细";
DataColumn c = new DataColumn("单价提示", typeof(System.Boolean), "iif(单价>10,true,false)");
DataTable tbl = Rabbit.DBUtility.DBHelperSql.Query(sql).Tables[0];
tbl.Columns.Add(c);
dataGridView1.DataSource = tbl;
}