本文整理汇总了C#中IProduct.AddLog方法的典型用法代码示例。如果您正苦于以下问题:C# IProduct.AddLog方法的具体用法?C# IProduct.AddLog怎么用?C# IProduct.AddLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IProduct
的用法示例。
在下文中一共展示了IProduct.AddLog方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: writeProductLog
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);
}
示例2: WriteProductLog
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);
}