예제 #1
0
 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();
 }
예제 #2
0
        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();
        }