示例#1
0
 public PushServer()
 {
     InitializeComponent();
     JobManager.InitializeWithoutStarting(new PushJob());
     JobManager.JobException += info =>
     {
         Util.Logs.Log.GetLog(nameof(PushServer)).Error("An error just happened with a scheduled job: " + info.Exception);
         WxPushNews.SendErrorText($"错误类型:{Util.Helpers.Enum.GetDescription<ExceptionType>(ExceptionType.PushException)},信息:{info.Exception}");
     };
     JobManager.JobEnd += PushJob.OnJobEnd;
 }
示例#2
0
 private void OrderOptionBase_ExceptionMessageEventHandle1(ICollection <ExceptionOrder> obj)
 {
     if (obj != null && obj.Any())
     {
         ERP.ExportExcel <ExceptionOrder>(OptionType.ExceptionExcel, obj.ToList());
         var glst = obj.GroupBy(e => e.ErrorCode);
         foreach (var item in glst)
         {
             WxPushNews.SendErrorText($"错误类型:{Util.Helpers.Enum.GetDescription<ExceptionType>(item.Key)},数量:{item.Count()}");
         }
     }
     else
     {
     }
 }