internal static CellBom FindCellBomAtFrom(string productID, string prodVer, CellActionType actionType) { List <CellBom> list = GetCellBomAtFrom(productID, actionType); if (list == null || list.Count == 0) { return(null); } CellBom bom = null; foreach (var item in list) { if (actionType != CellActionType.None && item.ActionType != actionType) { continue; } if (LcdHelper.IsEmptyID(item.CellCode)) { continue; } if (prodVer != Constants.ALL && prodVer != item.FromProductVer) { continue; } bom = item; break; } return(bom); }
internal static string GetCellCode(string productID, string productVer, CellActionType actionType) { CellBom bom = FindCellBomAtFrom(productID, productVer, actionType); if (bom == null) { return(productID); } return(bom.CellCode); }
internal static void AddByActionType(CellBom bom) { string key = GetFromListKey(bom.FromProductID, bom.ActionType); List <CellBom> list; if (_fromListByType.TryGetValue(key, out list) == false) { _fromListByType.Add(key, list = new List <CellBom>()); } list.Add(bom); }
internal static void AddMaps(CellBom bom) { Dictionary <CellActionType, List <CellBom> > dic; if (_maps.TryGetValue(bom.CellCode, out dic) == false) { dic = new Dictionary <CellActionType, List <CellBom> >(); _maps.Add(bom.CellCode, dic); } List <CellBom> list; if (dic.TryGetValue(bom.ActionType, out list) == false) { dic.Add(bom.ActionType, list = new List <CellBom>()); } list.Add(bom); }