13,190
社区成员
发帖
与我相关
我的任务
分享
items = context.ass_ba_item.Where(c => c.EntId == userModel.EntId && (c.ItemCode.EndsWith(inputCode) || c.ItemBarCode.EndsWith(inputCode))).ToList();
if (items.Count > 1) throw new MessageErrorException("不是唯一的资产编码,请输入精确的资产编码!");
var item = items.FirstOrDefault();
if (item == null) throw new MessageErrorException(string.Format("没有找到此编码的资产信息: {0}", inputCode));
items = context.ass_ba_item.Where(c => c.EntId == userModel.EntId && (c.ItemCode.EndsWith(inputCode) || c.ItemBarCode.EndsWith(inputCode)));
if (items.Count() > 1) throw new MessageErrorException("不是唯一的资产编码,请输入精确的资产编码!");
var item = items.FirstOrDefault();
if (item == null) throw new MessageErrorException(string.Format("没有找到此编码的资产信息: {0}", inputCode));