public static Dictionary <int, ActiveAwardInfo> LoadActiveAwardDb(Dictionary <int, List <ActiveConditionInfo> > conditions) { Dictionary <int, ActiveAwardInfo> list = new Dictionary <int, ActiveAwardInfo>(); using (ProduceBussiness db = new ProduceBussiness()) { ActiveAwardInfo[] infos = db.GetAllActiveAwardInfo(); foreach (int key in conditions.Keys) { ActiveAwardInfo[] array = infos; for (int i = 0; i < array.Length; i++) { ActiveAwardInfo info = array[i]; if (key == info.ActiveID && !list.ContainsKey(info.ID)) { list.Add(info.ID, info); } } } } return(list); }
public static Dictionary <int, ActiveAwardInfo> LoadActiveAwardDb(Dictionary <int, List <ActiveConditionInfo> > conditions) { Dictionary <int, ActiveAwardInfo> dictionary = new Dictionary <int, ActiveAwardInfo>(); using (ProduceBussiness produceBussiness = new ProduceBussiness()) { ActiveAwardInfo[] allActiveAwardInfo = produceBussiness.GetAllActiveAwardInfo(); foreach (int current in conditions.Keys) { ActiveAwardInfo[] array = allActiveAwardInfo; for (int i = 0; i < array.Length; i++) { ActiveAwardInfo activeAwardInfo = array[i]; if (current == activeAwardInfo.ActiveID && !dictionary.ContainsKey(activeAwardInfo.ID)) { dictionary.Add(activeAwardInfo.ID, activeAwardInfo); } } } } return(dictionary); }