/// <summary> /// 获取发动机详细信息 /// </summary> /// <param name="code"></param> private EngineViewModel GetEngineCodeInfo(string code) { try { //获取发动机的机型 return(RFIDDBHelper.GetEngineOther(code, "")); } catch (Exception ex) { Log.Error("处理发动机条码时出现异常", ex); return(null); } }
private EngineViewModel GetEngineViewModel(string code, string mto) { EngineViewModel model = null; try { if (!string.IsNullOrEmpty(code) && code != appConfig.NullCode) { model = RFIDDBHelper.GetEngineOther(code, mto); } } catch (Exception ex) { Log.Error(ex, "获取机型信息报错!"); ViewModels[0].PrintlnWarning(ex.Message); } if (model == null) { model = EngineViewModel.CreateModel(code, mto); } return(model); }