我想默认在 Gridview 中按降序显示日期。
DataTable dt = new DataTable();
SqlDataAdapter adp =
new SqlDataAdapter("SELECT Customer.CustomerID, Customer.lastname, Customer.firstname,
Ticket.Date, Ticket.Store, Ticket.Amount, Ticket.NoStub " +
"FROM Customer INNER JOIN Ticket ON Customer.CustomerID = Ticket.CustomerID
WHERE Customer.CustomerID like " + txtCustomerID.Text, cn);
adp.Fill(dt);
gvHistory.DataSource = dt;