public void CreateCallLog(string hashKey, CallLogStatus status)
        {
            ConfigCallLog cl = new ConfigCallLog
            {
                Key              = hashKey,
                Status           = status.ToString(),
                RequestStartTime = DateTime.UtcNow
            };

            _context.CallLog.Add(cl);
            _context.SaveChanges();
        }
        public void UpdateCallLog(ConfigCallLog callLogRow, string hashKey, CallLogStatus status)
        {
            if (callLogRow == null)
            {
                callLogRow = _context.CallLog
                             .Where(b => b.Key == hashKey)
                             .FirstOrDefault();
            }

            callLogRow.Status     = status.ToString();
            callLogRow.FinishTime = DateTime.UtcNow;


            _context.CallLog.Update(callLogRow);
            _context.SaveChanges();
        }
Esempio n. 3
0
        public static int UpdateCallLogResult(int sysNo, bool isSuccess, string responseDataString, DateTime callTime, long costMillionSeconds, CallLogStatus status, int?retryCount)
        {
            DataCommand command = DataCommandManager.GetDataCommand("UpdateCallLogResult");

            command.SetParameterValue("@LastCallTime", callTime);
            command.SetParameterValue("@RetryCount", retryCount);
            command.SetParameterValue("@LastCallIsSuccess", isSuccess);
            command.SetParameterValue("@LastCallResponseData", responseDataString);
            command.SetParameterValue("@LastCallCostMillionSeconds", costMillionSeconds);
            command.SetParameterValue("@Status", (int)status);
            command.SetParameterValue("@SysNo", sysNo);
            return(command.ExecuteNonQuery());
        }