示例#1
0
文件: clsSMS.cs 项目: Credo10/Rex_FPY
        static void AddError(Exception msg)
        {
            try
            {
                BPSEntities db = clsDAL.efdbBPS();

                string strMsg = msg.Message.ToString();

                if (strMsg + "" == "")
                {
                    strMsg = msg.InnerException.ToString();
                }

                if (strMsg + "" != "")
                {
                    tblBandWidthError tbl = new tblBandWidthError();
                    tbl.WE_Created = DateTime.Now;
                    tbl.WE_Desc    = strMsg;
                    db.tblBandWidthError.Add(tbl);
                    db.SaveChanges();
                }
            }
            catch (Exception)
            {
            }
        }