Example #1
0
        /// <summary>
        /// 扣帳完成後將資訊存至BroadcastMSMQTalk(Status=999為MSMQ發起條件)
        /// </summary>
        /// <param name="msmqLabel"></param>
        /// <param name="body"></param>
        /// <returns></returns>
        private int InsertToMSMQTalk(string msmqLabel, string msmqBody, Guid btID)
        {
            //Guid btID = Guid.NewGuid();
            string strLocationID       = string.Format("Location[{0}]", ProjectConfig.GetInstance().LocationCount);
            string strReceiveQueuePath = ProjectConfig.GetInstance().GetReceiveQueuePath(strLocationID);
            string strSendURL          = ProjectConfig.GetInstance().Send_URL;

            string MSMQ_Label    = msmqLabel;                      //訊息標題
            string MSMQ_Body     = msmqBody;                       //訊息內容
            string MSMQ_Type     = "Normal";                       //訊息型態
            string MSMQ_Path     = strReceiveQueuePath;            //MSMQueue路徑
            string MachineName   = System.Environment.MachineName; //目前的機器名稱
            string URL           = strSendURL;                     //傳送的URL路徑
            string CreaterUser   = "******";        //由這支程式及FT流水號建立
            int    MSMQ_Size     = MSMQ_Body.Length;               //訊息長度
            int    MSMQ_Priority = 3;                              //訊息優先順序
            int    Status        = (int)NextDayMSMQStatus.TRANS;   //for MSMQTalk WorkMen發動次日轉帳之條件參數

            return(DBLog.InsBroadcastMSMQTalk(btID, MSMQ_Label, MSMQ_Body, MSMQ_Priority, MSMQ_Type, MSMQ_Size, MSMQ_Path, MachineName, URL, CreaterUser, Status));
        }