Beispiel #1
0
 public Data.ItemCount Count(int id)
 {
     Data.ItemCount cnt = new Data.ItemCount();
     cnt.id = id;
     foreach (var item in mItemList)
     {
         if (item.dwObjectID == id)
         {
             cnt.count += (int)item.dwNum;
         }
     }
     return cnt;
 }
Beispiel #2
0
 public static object GetValue_ItemCount(Type type, String value)
 {
     ItemCount cnt = new ItemCount();
     string[] vals = value.Split(':');
     if (vals.Length > 0)
         cnt.id = int.Parse(vals[0]);
     if (vals.Length > 1)
         cnt.count = int.Parse(vals[1]);
     return cnt;
 }