一个是HttpContext.Current.Timestamp
一个是HttpContext.Current.Items
public class TxnLog
{
const string id_key = "id_key";
public TxnLog()
{
var d = HttpContext.Current.Timestamp.ToString("yyyyMMddHHmmssfffffff");
object s = HttpContext.Current.Items[id_key];
if (s == null)
{
d = d + "_" + helper.idq.CreateToken();
HttpContext.Current.Items[id_key] = d;
}
else
{
d = s.ToString();
}
this.SN = d;
}
}