Example #1
0
        private void writeProductLog(Session session,IProduct product, IMES.FisObject.Common.Station.StationStatus status,  string line)
        {
            var prodRep = RepositoryFactory.GetInstance().GetRepository<IProductRepository, IProduct>();
            var productLog = new ProductLog
            {
                Model = product.Model,
                Status = status,
                Editor = this.Editor,
                Line = line,
                Station = this.Station,
                Cdt = DateTime.Now
            };

            product.AddLog(productLog);
            prodRep.Update(product, session.UnitOfWork);
        }
Example #2
0
        private void WriteProductLog(IProduct product)
        {
         //   var product = CurrentSession.GetValue(Session.SessionKeys.Product) as IProduct;
          // var productRepository = RepositoryFactory.GetInstance().GetRepository<IProductRepository, IProduct>();
      
           string line = string.IsNullOrEmpty(this.Line) ? product.Status.Line : this.Line;
           string station = string.IsNullOrEmpty(this.Station) ? CurrentSession.Station:this.Station;
            var productLog = new ProductLog
            {
                Model = product.Model,
                Status = StationStatus.Pass,
                Editor = this.Editor,
                Line = line,
                Station = station,
                Cdt = DateTime.Now
            };

            product.AddLog(productLog);
            //productRepository.Update(product, CurrentSession.UnitOfWork);
        
        }