Exemple #1
0
 public static void Add(PrintRecordItem pst)
 {
     if (_ht.Contains(pst.GetHashKey()))
     {
         PrintRecordItem pri = (PrintRecordItem)_ht[pst.GetHashKey()];
         //是否在此更新数据
     }
     else
     {
         _ht.Add(pst.GetHashKey(), pst);
     }
 }
Exemple #2
0
 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);
     }
 }
Exemple #3
0
        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);
                    }
                }
            }
        }
Exemple #4
0
 public static void  Remove(PrintRecordItem pst)
 {
     _ht.Remove(pst.GetHashKey());
 }