private void AddDuplicatedItemHash(int hash, Upload506Item item) { if (m_DuplicatedItems.ContainsKey(hash)) { if (!m_DuplicatedItems[hash].Contains(item)) { m_DuplicatedItems[hash].Add(item); } } else { m_DuplicatedItems.Add(hash, new HashSet <Upload506Item>() { item }); } }
public Upload506Duplicate SelectByItem(DbManagerProxy manager, Upload506Item checkItem) { var ret = SelectByKey(manager , checkItem.idfsUpload506 , checkItem.DISEASE , checkItem.HN , checkItem.NAME , checkItem.SEX , checkItem.YEAR , checkItem.MONTH , checkItem.DAY , checkItem.RACE , checkItem.OCCUPAT , checkItem.ADDRESS , checkItem.ADDRCODE , checkItem.PROVINCE , checkItem.TYPE , checkItem.RESULT , checkItem.HSERV , checkItem.SCHOOL , checkItem.DATESICK , checkItem.DATEDEFINE , checkItem.DATEDEATH , checkItem.DATERECORD , checkItem.COMPLICA , checkItem.MARIETAL , checkItem.RACE1 , checkItem.METROPOL , checkItem.HOSPITAL ); if (ret != null) { ret.Item = checkItem; } return(ret); }
private int CalculateDuplicationHash(Upload506Item item) { var s = Utils.Str(item.NAME) + Utils.Str(item.DISEASE) + Utils.Str(item.HSERV); return(s.GetHashCode()); }