コード例 #1
0
        private Boolean DoSMS(InSMS inSMS)
        {
            Boolean result = true;
            ESMSLog smsLog = new ESMSLog();

            try
            {
                SMSManager smsManger = new SMSManager();

                SMSResult_API51 Response = smsManger.PostSMS_API51(inSMS, ref smsLog);
                if (Response.result == "0")
                {
                    result = true;
                }
                else
                {
                    result = false;
                }
            }
            catch (Exception ex)
            {
                smsLog.Exception += "DoSMS Error:" + ex.Message;
                smsLog.Exception += "DoSMS Inner Error:" + ex.InnerException.Message;
                result            = false;
            }
            using (PPContent db = new PPContent())
            {
                smsLog.IsSuccess = result;
                db.DBSMSLog.Add(smsLog);
                db.SaveChanges();
            }

            return(result);
        }