|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- namespace BPASmartClient.MorkTSingle
- {
- internal enum GOODS_TYPE
- {
- /// <summary>
- /// 未知
- /// </summary>
- NEITHER,
- /// <summary>
- /// 咖啡
- /// </summary>
- COFFEE,
- /// <summary>
- /// 果汁
- /// </summary>
- JUICE
- }
-
- internal enum BATCHING_CLASS
- {
- HOLDER,
- MAIN_MATERIAL,
- }
-
- internal class PolymerBatching
- {
- public static Dictionary<string, GOODS_TYPE> GOODS_TYPES = new Dictionary<string, GOODS_TYPE>() {
- {"1", GOODS_TYPE.COFFEE},
- {"2", GOODS_TYPE.COFFEE},
- {"3", GOODS_TYPE.COFFEE},
- {"4", GOODS_TYPE.COFFEE},
- {"5", GOODS_TYPE.COFFEE},
- {"6", GOODS_TYPE.COFFEE},
- {"9", GOODS_TYPE.COFFEE},
- {"10", GOODS_TYPE.COFFEE},
- {"11", GOODS_TYPE.COFFEE},
- {"12", GOODS_TYPE.COFFEE},
- {"13", GOODS_TYPE.COFFEE},
- {"14", GOODS_TYPE.COFFEE},
- {"51", GOODS_TYPE.COFFEE},
- {"52", GOODS_TYPE.COFFEE},
- {"53", GOODS_TYPE.COFFEE},
- {"54", GOODS_TYPE.COFFEE},
- {"55", GOODS_TYPE.COFFEE},
- {"56", GOODS_TYPE.COFFEE},
- {"57", GOODS_TYPE.COFFEE},
- {"58", GOODS_TYPE.COFFEE},
- {"59", GOODS_TYPE.COFFEE},
- {"7", GOODS_TYPE.COFFEE},
- {"8", GOODS_TYPE.COFFEE},
- };
-
- public GOODS_TYPE GoodsType { get; set; }
- public BATCHING_CLASS BatchingClass { get; set; }
- private string loc;
-
- public string Loc
- {
- get { return loc; }
- set
- {
- loc = value;
- if (GOODS_TYPES.ContainsKey(loc))
- GoodsType = GOODS_TYPES[loc];
- switch (loc)
- {
- default:
- BatchingClass = BATCHING_CLASS.MAIN_MATERIAL;
- break;
- }
- }
- }
-
- internal static Dictionary<string, PolymerBatching> BuildAll()
- {
- Dictionary<string, PolymerBatching> temp = new Dictionary<string, PolymerBatching>();
- foreach (var item in GOODS_TYPES)
- {
- temp.Add(item.Key, new PolymerBatching() { Loc = item.Key });
- }
- return temp;
- }
- }
- }
|