Пример #1
0
 public void AddUpdateLog(int publishId, int cid, bool success, string descript, string creater)
 {
     ProductUpdateLogRepository.Add(new Entity.ProductUpdateLog()
     {
         PublishId = publishId, Status = Convert.ToInt16(success?0:1), Description = descript, CID = cid, CreateDT = DateTime.Now, CreateUID = "", Creater = creater
     });
 }
Пример #2
0
        private IQueryable <Entity.ProductPublishVer> GetPublishData(int cid, int code)
        {
            var queryPublish = ProductPublishVerRepository.GetQuery(o => o.ProductId == code && o.Status == 1 && o.VerStatus > 0);
            var queryLog     = ProductUpdateLogRepository.GetQuery(o => o.CID == cid && o.Status == 0);
            var query        = from x in queryPublish
                               where x.PublishId == queryPublish.Max(o => (int?)o.PublishId) && !queryLog.Any(o => o.PublishId == x.PublishId)
                               select x;

            return(query);
        }