Пример #1
0
        public void GetResendMessages()
        {
            try
            {
                String condition = "M_STATE='1'";
                TTRD_AIDSYS_MSG_LOG_Manager manager = new TTRD_AIDSYS_MSG_LOG_Manager();
                DataTable table = manager.LogQuery(condition);
                
                foreach (DataRow row in table.Rows)
                {
                    try
                    {
                        MessageData data = new MessageData();
                        data.MessageID = new Guid(row["M_ID"].ToString());
                        data.BizMsgID = row["M_SERIALNO"].ToString();
                        data.FirstTime = Convert.ToDateTime(row["M_SENDDATE"].ToString());
                        data.TragetPlatform = (PlatformType)Convert.ToInt32(row["M_PLATTYPE"].ToString());
                        data.IsMultiPackage = Convert.ToInt32(row["M_ISSINGLE"]) != 1;
                        data.ReqPackageList.Enqueue(new PackageData(Convert.ToInt16(row["M_SUBID"]), (byte[])row["M_S_CONTENT"]));
                        _msgList.Add(data);

                    }
                    catch (Exception)
                    {
                        continue;
                    }
                }
                
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #2
0
 public static String RetrieveDBTypeFromDB(Guid msgid)
 {
     try
     {
         if (msgid != Guid.Empty)
         {
             TTRD_AIDSYS_MSG_LOG_Manager manager = new TTRD_AIDSYS_MSG_LOG_Manager();
             StringBuilder sb = new StringBuilder();
             sb.AppendFormat("M_ID={0}", msgid.ToString());
             DataTable table = manager.LogQuery(sb.ToString());
             if (table != null && table.Rows.Count == 1)
             {
                 return table.Rows[0]["MsgDataType"].ToString();
             }
         }
     }
     catch (Exception)
     {
         return String.Empty;
     }
     return String.Empty;            
 }