我需要选择数据,最后我需要date_payment
用DateTime
to更改列Text
,请帮助...
我写这个查询
SELECT r.id, user_name, user_phone, date_create, REPLACE( date_payment, '0000-00-00 00:00:00', 'No payment' ) , payment_method, amount, rs.name_ru
FROM request AS r, request_status AS rs
WHERE r.status = rs.id
LIMIT 0 , 30
在 sql 控制台查询是有效的,并且date_payment
是 replase,但是:
MySqlCommand cmd = new MySqlCommand(query, conn);
dt.Load(cmd.ExecuteReader());
GetList();
source.DataSource = dt;
dataGrid1.ItemsSource = source;
那么 datagrid 中的 column(date_payment) 为空 - 为什么?