示例#1
0
        public static void AfterCall(CheckMaterialQuantity __instance)
        {
            Console.ForegroundColor = ConsoleColor.DarkRed;
            List <Reservation> Reservations = Tools.GetValue(__instance, "Reservations");
            var quant = Tools.GetValue(__instance, "Quantity");

            if (Reservations.Sum(op => Tools.GetValue(op, "Quantity")) > quant)
            {
                Console.WriteLine("Planning Error: Not enough material {0} left for operation {1}.", Tools.GetValue(__instance, "Id"), Tools.GetValue(Tools.GetValue(Reservations[Reservations.Count - 1], "Operation"), "Id"));
            }

            Console.ForegroundColor = ConsoleColor.White;
        }
示例#2
0
 public static void BeforeCall(CheckMaterialQuantity __instance)
 {
     Console.ForegroundColor = ConsoleColor.DarkRed;
     Console.ForegroundColor = ConsoleColor.White;
 }