protected void SetNotify(int count)
 {
     TempData["Notify"] = new NotifyVM()
     {
         CountOrders = count
     };
 }
Пример #2
0
        public void CallNotifyVM(ConveyorBasicInfo cbi)
        {
            List <Action <ConveyorBasicInfo> > notActive = new List <Action <ConveyorBasicInfo> >();

            for (int i = 0; i < NotifyVM.Count; i++)
            {
                try
                {
                    NotifyVM[i].Invoke(cbi); // , null, null);
                }
                catch (Exception ex)
                {
                    Warehouse.AddEvent(Event.EnumSeverity.Error, Event.EnumType.Exception, $"{Name}.CallNotifyVM failed : {ex.Message}");
                    notActive.Add(NotifyVM[i]);
                }
            }
            notActive.ForEach(p => NotifyVM.Remove(p));
        }
Пример #3
0
 public static void Send(string key, NotifyVM value)
 {
     Messaging.Send(key, value);
 }
Пример #4
0
 public static void Send(NotifyVM value)
 {
     Messaging.Send(GetNotifyKey(), value);
 }