/// <summary> /// /// </summary> /// <param name="line"></param> /// <param name="family"></param> /// <returns></returns> public IList<IMES.DataModel.ModelInfo> GetModelListForTravelCard(string line, string family) { IMBMORepository myRepository = RepositoryFactory.GetInstance().GetRepository<IMBMORepository, IMBMO>(); IList<string> list = new List<string>(); if (String.IsNullOrEmpty(line)) { list = myRepository.GetModelListWithMoExcel("H", family, ""); } else { list = myRepository.GetModelListWithMoExcel("H", family, line.Substring(0, 1)); } IList<IMES.DataModel.ModelInfo> ret = new List<IMES.DataModel.ModelInfo>(); if (list != null && list.Count > 0) { foreach (string temp in list) { IMES.DataModel.ModelInfo mdli = new IMES.DataModel.ModelInfo(); mdli.id = mdli.friendlyName = temp; ret.Add(mdli); } } return ret; }
/// <summary> /// 获取Model列表 /// </summary> /// <param name="family"></param> /// <returns></returns> public IList<IMES.DataModel.ModelInfo> GetModelList(string family) { //IModelRepository myRepository = RepositoryFactory.GetInstance().GetRepository<IModelRepository, Model>(); //return myRepository.GetModelListByFamilyAndStatus(family, 1); //ITC-1360-1256 //IMBMORepository:: //IList<string> GetModelListFromMo(string family); IMBMORepository myRepository = RepositoryFactory.GetInstance().GetRepository<IMBMORepository, IMBMO>(); IList<string> list = new List<string>(); list = myRepository.GetModelListFromMo(family); IList<IMES.DataModel.ModelInfo> ret = new List<IMES.DataModel.ModelInfo>(); if (list != null && list.Count > 0) { foreach (string temp in list) { IMES.DataModel.ModelInfo mdli = new IMES.DataModel.ModelInfo(); mdli.id = mdli.friendlyName = temp; ret.Add(mdli); } } return ret; }