public IList<SelectInfoDef> GetAllFamilyList() { List<SelectInfoDef> result = new List<SelectInfoDef>(); try { IFamilyRepository itemRepository = RepositoryFactory.GetInstance().GetRepository<IFamilyRepository>(); DataTable getData = itemRepository.GetAllFamily(); for (int i = 0; i < getData.Rows.Count; i++) { SelectInfoDef item = new SelectInfoDef(); string getValue = getData.Rows[i][0].ToString().Trim(); item.Text = getValue; item.Value = getValue; result.Add(item); } } catch (Exception) { throw; } return result; }
//SELECT Build FROM PilotRunPrintBuild ORDER BY Build public IList<SelectInfoDef> GetBuildList() { List<SelectInfoDef> result = new List<SelectInfoDef>(); try { IMiscRepository itemRepository = RepositoryFactory.GetInstance().GetRepository<IMiscRepository>(); DataTable getData = itemRepository.GetBuildList(); for (int i = 0; i < getData.Rows.Count; i++) { SelectInfoDef item = new SelectInfoDef(); item.Text = Null2String(getData.Rows[i][0]); item.Value = item.Text; result.Add(item); } } catch (Exception) { throw; } return result; }
public void initCNCardChange() { IList<SelectInfoDef> lstCNCardChange = new List<SelectInfoDef>(); int position = cmdValue.IndexOf("'"); while (position > -1) { cmdValue = cmdValue.Replace("'", ""); position = cmdValue.IndexOf("'"); } string[] sArray = cmdValue.Split(new char[2] { ',', ';' }); int count = 0; SelectInfoDef temp = null; foreach (string i in sArray) { if (count > 1) { count = 0; if (null != temp) { lstCNCardChange.Add(temp); } }/* if (0 == count) { temp = new SelectInfoDef(); temp.Text = i.ToString(); count++; continue; } if (1 == count) { temp.Value = i.ToString(); count++; continue; }*/ if (0 == count) { temp = new SelectInfoDef(); temp.Text = i.ToString(); count++; continue; } if (1 == count) { string tmp = temp.Text; temp.Text = i.ToString(); temp.Value = i.ToString() + "," + tmp; temp.Text = temp.Value; temp.Value = tmp; count++; continue; } } if (lstCNCardChange != null && lstCNCardChange.Count != 0) { initControl(lstCNCardChange); } else { initControl(null); } }
//取得CheckItem下拉列表 //SELECT [ID],[ItemName] FROM [IMES_GetData].[dbo].[CheckItem] WHERE Customer='customer' order by [ItemName] public IList<SelectInfoDef> GetItemNameListByCustomer(string customer) { List<SelectInfoDef> result = new List<SelectInfoDef>(); SelectInfoDef item = new SelectInfoDef(); item.Text = "text1"; item.Value = "1"; result.Add(item); return result; }
/// <summary> /// 获取Pallet表相关信息GetDeliveryPalletListByDN /// </summary> /// <param name="DN"DN</param> public IList<SelectInfoDef> GetPalletList(string DN) { logger.Debug("(_CombineDNPalletforBT)GetPalletList start."); try { IList<SelectInfoDef> ret = new List<SelectInfoDef>(); IList<DeliveryPalletInfo> palletList = currentRepository.GetDeliveryPalletListByDN(DN); foreach (DeliveryPalletInfo tmp in palletList) { SelectInfoDef ele = new SelectInfoDef(); ele.Text = tmp.palletNo; //Pallet CurrentPallet = palletRep.Find(tmp.palletNo); ele.Value = tmp.deliveryQty.ToString(); ret.Add(ele); } return ret; } catch (FisException e) { logger.Error(e.mErrmsg, e); throw new Exception(e.mErrmsg); } catch (Exception e) { logger.Error(e.Message, e); throw new SystemException(e.Message); } finally { logger.Debug("(_CombineDNPalletforBT)GetPalletList end."); } }
//3)取PDLine列表 //'FA', 'PAK'情况下 //select distinct Left(rtrim(Line),1) as Code from Line (nolock) where Stage=@stage order by Code public IList<SelectInfoDef> GetPdLineList(String stage) { stage = Null2String(stage); List<SelectInfoDef> result = new List<SelectInfoDef>(); if (stage == "") { return result; } try { IProductRepository itemRepository = RepositoryFactory.GetInstance().GetRepository<IProductRepository>(); DataTable getData = itemRepository.GetPdLineListForLightNo(stage); for (int i = 0; i < getData.Rows.Count; i++) { SelectInfoDef item = new SelectInfoDef(); string getValue = getData.Rows[i][0].ToString().Trim(); string getText = getData.Rows[i][0].ToString().Trim(); item.Text = getText; item.Value = getValue; result.Add(item); } } catch (Exception) { throw; } return result; }
public List<SelectInfoDef> GetAstTypeList() { List<SelectInfoDef> result = new List<SelectInfoDef>(); try { IPartRepository itemRepository = RepositoryFactory.GetInstance().GetRepository<IPartRepository>(); string nodeType = "AT"; IList<string> getData = itemRepository.GetAstTypes(nodeType); for (int i = 0; i < getData.Count; i++) { SelectInfoDef item = new SelectInfoDef(); string getValue = getData[i].Trim(); item.Text = getValue; item.Value = getValue; result.Add(item); } } catch (Exception) { throw; } return result; }
//Value Type列表 //SELECT [Code] // FROM [IMES_GetData].[dbo].[PartTypeAttribute] //where PartType='partType' ORDER BY [Code] //Change:1、ValueType下拉列表的选项全部换为与新选PartType相关的属性名称,其第一个选项被选取。 //ValueType 选项包括PartNo、Descr、CustPartNo、FruNo、Vendor、IECVersion以及当前Part Type的所有Attribute public IList<SelectInfoDef> GetValueTypeList(string partType) { List<SelectInfoDef> result = new List<SelectInfoDef>(); String param = Null2String(partType); if (param == "") { return result; } try { IPartRepository itemRepository = RepositoryFactory.GetInstance().GetRepository<IPartRepository>(); DataTable getData = itemRepository.GetValueTypeList(param); for (int i = 0; i < getData.Rows.Count; i++) { SelectInfoDef item = new SelectInfoDef(); item.Value = Null2String(getData.Rows[i][0]); item.Text = Null2String(getData.Rows[i][0]); result.Add(item); } } catch (Exception) { throw; } return result; }
//------------------------------------------------------------------ public IList<SelectInfoDef> GetCustomerFamilyList(String customerId) { String customer = Null2String(customerId); List<SelectInfoDef> result = new List<SelectInfoDef>(); if (customer == "") { return result; } try { IFamilyRepository itemRepository = RepositoryFactory.GetInstance().GetRepository<IFamilyRepository>(); IList<Family> getData = itemRepository.GetFamilyList(customer); for (int i = 0; i < getData.Count; i++) { SelectInfoDef item = new SelectInfoDef(); string getValue = getData[i].FamilyName.Trim(); item.Text = getValue; item.Value = getValue; result.Add(item); } } catch (Exception) { throw; } return result; }
//Add2012/06/12 UCupdate Add line info //----------------------------------------------------------------- public IList<SelectInfoDef> GetCustomerFamilyListAddline(String customerId) { String customer = Null2String(customerId); List<SelectInfoDef> result = new List<SelectInfoDef>(); if (customer == "") { return result; } try { IFamilyRepository itemRepository = RepositoryFactory.GetInstance().GetRepository<IFamilyRepository>(); ILineRepository lineRepository = RepositoryFactory.GetInstance().GetRepository<ILineRepository, Line>(); IList<string> linelst = new List<string>(); string[] lineType = new string[2]; lineType[0] = "FA"; lineType[1] = "PAK"; linelst = lineRepository.GetLinePrefixListByStages(lineType,customer); foreach (string temp in linelst) { SelectInfoDef item = new SelectInfoDef(); item.Text = temp; item.Value = temp; result.Add(item); } IList<Family> getData = itemRepository.GetFamilyList(customer); for (int i = 0; i < getData.Count; i++) { SelectInfoDef item = new SelectInfoDef(); string getValue = getData[i].FamilyName.Trim(); item.Text = getValue; item.Value = getValue; result.Add(item); } } catch (Exception) { throw; } return result; }