You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

93 lines
2.7 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace HBLConsole.MORKIC
  7. {
  8. internal enum GOODS_TYPE
  9. {
  10. NEITHER,
  11. COFFEE,
  12. ICECREAM,
  13. }
  14. internal enum BATCHING_CLASS
  15. {
  16. HOLDER,
  17. MAIN_MATERIAL,
  18. }
  19. internal class PolymerBatching
  20. {
  21. public static Dictionary<string, GOODS_TYPE> GOODS_TYPES = new Dictionary<string, GOODS_TYPE>() {
  22. {"1", GOODS_TYPE.COFFEE},
  23. {"2", GOODS_TYPE.COFFEE},
  24. {"3", GOODS_TYPE.COFFEE},
  25. {"4", GOODS_TYPE.COFFEE},
  26. {"5", GOODS_TYPE.COFFEE},
  27. {"6", GOODS_TYPE.COFFEE},
  28. {"7", GOODS_TYPE.COFFEE},
  29. {"8", GOODS_TYPE.COFFEE},
  30. {"9", GOODS_TYPE.COFFEE},
  31. {"10",GOODS_TYPE.COFFEE},
  32. {"11",GOODS_TYPE.COFFEE},
  33. {"12",GOODS_TYPE.COFFEE},
  34. {"13",GOODS_TYPE.COFFEE},
  35. {"14",GOODS_TYPE.COFFEE},
  36. {"15",GOODS_TYPE.COFFEE},
  37. {"16",GOODS_TYPE.COFFEE},
  38. {"17",GOODS_TYPE.COFFEE},
  39. {"18",GOODS_TYPE.COFFEE},
  40. {"19",GOODS_TYPE.COFFEE},
  41. {"20",GOODS_TYPE.COFFEE},
  42. {"21",GOODS_TYPE.COFFEE},
  43. {"22",GOODS_TYPE.COFFEE},
  44. {"23",GOODS_TYPE.COFFEE},
  45. {"24",GOODS_TYPE.COFFEE},
  46. {"25",GOODS_TYPE.COFFEE},
  47. {"30",GOODS_TYPE.COFFEE},
  48. {"51",GOODS_TYPE.ICECREAM},
  49. {"52",GOODS_TYPE.ICECREAM},
  50. {"53",GOODS_TYPE.ICECREAM},
  51. };
  52. public GOODS_TYPE GoodsType { get; set; }
  53. public BATCHING_CLASS BatchingClass { get; set; }
  54. private string loc;
  55. public string Loc
  56. {
  57. get { return loc; }
  58. set
  59. {
  60. loc = value;
  61. if (GOODS_TYPES.ContainsKey(loc))
  62. GoodsType = GOODS_TYPES[loc];
  63. switch (loc)
  64. {
  65. case "30":
  66. case "51":
  67. case "52":
  68. BatchingClass = BATCHING_CLASS.HOLDER;
  69. break;
  70. default:
  71. BatchingClass = BATCHING_CLASS.MAIN_MATERIAL;
  72. break;
  73. }
  74. }
  75. }
  76. internal static Dictionary<string, PolymerBatching> BuildAll()
  77. {
  78. Dictionary<string, PolymerBatching> temp = new Dictionary<string, PolymerBatching>();
  79. foreach (var item in GOODS_TYPES)
  80. {
  81. temp.Add(item.Key, new PolymerBatching() { Loc = item.Key });
  82. }
  83. return temp;
  84. }
  85. }
  86. }