public static void Add(PrintRecordItem pst) { if (_ht.Contains(pst.GetHashKey())) { PrintRecordItem pri = (PrintRecordItem)_ht[pst.GetHashKey()]; //是否在此更新数据 } else { _ht.Add(pst.GetHashKey(), pst); } }
public static PrintRecordItem Query(PrintRecordItem pst) { if (_ht.Contains(pst.GetHashKey())) { Object o = _ht[pst.GetHashKey()]; if (o.GetType() == typeof(PrintRecordItem)) { return((PrintRecordItem)o); } else { return(null); } } else { return(null); } }
private static void ReadAllSubmitRecord() { String Root = PrintRecord.GetRootPath(); DirectoryInfo d = new DirectoryInfo(Root); if (!d.Exists) { return; } ArrayList Flst = GetAllSubmitFile(d); foreach (Object a in Flst) { if (a.GetType() == typeof(String)) { List <PrintRecordItem> Lpri = PrintRecordItem.ReadXml((String)a); foreach (PrintRecordItem pti in Lpri) { Add(pti); } } } }
public static void Remove(PrintRecordItem pst) { _ht.Remove(pst.GetHashKey()); }