附件Dynamic.cs:
关键代码:
using System.Linq.Dynamic; ...... ...... if (ddl_Vehicle.SelectedValue == "ASC") { lvVehicle.DataSource = bll.QueryCusVehInfo().OrderBy(tb_value.Text); } else { lvVehicle.DataSource = bll.QueryCusVehInfo().OrderBy(tb_value.Text + " descending"); }