【发布时间】:2014-01-22 11:38:04
【问题描述】:
谁能帮我解决这个问题,我试图让它在订单状态更改时向系统添加注释,到目前为止,我已经添加了注释,但它显示为订单状态 ID 号而不是它的字符串引用
代码插入 OrderController.cs
int osid = order.OrderStatusId;
//order notes, notifications
order.OrderNotes.Add(new OrderNote()
{
Note = string.Format("Order status has been changed to {0}", osid.ToString()),
DisplayToCustomer = false,
CreatedOnUtc = DateTime.UtcNow
});
我的下一步是什么?
【问题讨论】:
-
您的问题不清楚?显示注释的代码在哪里?
-
@Falaque 添加注释的代码是 order.OrderNotes.Add(new OrderNote(),括号内的部分是添加到注释中的信息
-
我的意思是在 UI 中,您需要查看使用了哪个引用,order.OrderStatusId 或 order.OrderNotes。
标签: c# asp.net asp.net-mvc-4 nopcommerce