public static void Add(int channelId, int productId, MappingLogEnum type) { ProductsLog pl = new ProductsLog(); pl.ChannelId = channelId; pl.ProductId = productId; pl.LogType = (int)type; pl.LogDate = DateTime.Now; if (WebVariables.LoggedUserId != 0) pl.UserId = WebVariables.LoggedUserId; CanonDataContext db = Cdb.Instance; db.ProductsLogs.InsertOnSubmit(pl); db.SubmitChanges(); }
public static void Add(int channelId, int productId, MappingLogEnum type) { ProductsLog pl = new ProductsLog(); pl.ChannelId = channelId; pl.ProductId = productId; pl.LogType = (int)type; pl.LogDate = DateTime.Now; if (WebVariables.LoggedUserId != 0) { pl.UserId = WebVariables.LoggedUserId; } CanonDataContext db = Cdb.Instance; db.ProductsLogs.InsertOnSubmit(pl); db.SubmitChanges(); }