Пример #1
0
 private void DashboardQueue()
 {
     try
     {
         string strstarttime = DateTime.Now.ToString("dd-MMM-yyyy");
         string Det          = JsonConvert.SerializeObject(TransactionBLL.StackChartData(strstarttime, strstarttime), Newtonsoft.Json.Formatting.Indented);
         if (!string.IsNullOrEmpty(Det))
         {
             #region Send data to MSMQ
             Message m = new Message();
             m.Formatter   = new BinaryMessageFormatter();
             m.Body        = Det;
             m.Recoverable = true;
             dashQueue     = VaaaN.MLFF.Libraries.CommonLibrary.MSMQ.Queue.Create(VaaaN.MLFF.Libraries.CommonLibrary.MSMQ.Queue.webChartDashboardMessageQueue);
             if (dashQueue != null)
             {
                 dashQueue.Purge();
             }
             dashQueue.Send(m);
             #endregion
         }
     }
     catch (Exception ex)
     {
         LogMessage("Failed to send into Dasboard Queue." + ex.Message);
     }
 }