private void ErrorWriteSMSLog(string serno, string content, string status) { _conn.startTransaction(); try { SMS entityS = new SMS(_conn); entityS.SMS_STATUS = status; entityS.SMS_DTTM = DateTime.Now; entityS.update(entityS.SMS_SERNO.cds_Equal(serno)); SMSLog entitySL = new SMSLog(_conn); entitySL.SMS_SERNO = serno; entitySL.SLG_SERNO = EASONTECH.Framework2.Common.Utility.generateSerialNum(); entitySL.SLG_CONTENT = content; entitySL.SLG_DTTM = DateTime.Now; entitySL.SLG_STATUS = "SysError"; entitySL.SLG_MESSAGE = content; entitySL.insert(); _conn.commitTransaction(); } catch { _conn.rollbackTransaction(); } }
private void WriteSMSLog(string serno, string content) { SMSLog entity = new SMSLog(_conn); entity.SMS_SERNO = serno; entity.SLG_SERNO = EASONTECH.Framework2.Common.Utility.generateSerialNum(); entity.SLG_CONTENT = content; entity.SLG_DTTM = DateTime.Now; entity.insert(); }
private void CHTSendWriteSMSLog(string serno, string content) { content = GetCHTRtnMessage(content); string[] MessageSet = content.Split('|'); if (MessageSet.Length == 4) { _conn.startTransaction(); try { SMS entityS = new SMS(_conn); switch (MessageSet[1]) { case "-1": entityS.SMS_STATUS = ""; break; case "0": entityS.SMS_STATUS = "S"; break; default: entityS.SMS_STATUS = "E"; break; } entityS.SMS_DTTM = DateTime.Now; entityS.update(entityS.SMS_SERNO.cds_Equal(serno)); SMSLog entitySL = new SMSLog(_conn); entitySL.SMS_SERNO = serno; entitySL.SLG_SERNO = EASONTECH.Framework2.Common.Utility.generateSerialNum(); entitySL.SLG_CONTENT = content; entitySL.SLG_DTTM = DateTime.Now; entitySL.SLG_STATUS = MessageSet[1]; if (MessageSet[1] != "0") { entitySL.SLG_MESSAGE = MessageSet[3]; } entitySL.insert(); _conn.commitTransaction(); } catch { _conn.rollbackTransaction(); } } }