示例#1
0
        /// <summary>
        /// Creates the call routing record from call record.
        /// </summary>
        /// <param name="call">The call.</param>
        /// <param name="finalStatus">The final status.</param>
        /// <returns></returns>
        static public bool CreateCallRoutingRecordFromCallRecord(CallRecord call, string finalStatus)
        {
            var results = false;

            try
            {
                if (string.IsNullOrEmpty(finalStatus) ||
                    !IsValidCallStatus(finalStatus))
                {
                    throw new ApplicationException("Empty or Invalid status");
                }

                var record = new CallRoutingRecord
                {
                    CallId          = call.CallId,
                    Instance        = call.Instance,
                    FinalSaveStatus = finalStatus,
                    RoutingStatus   = "UNPROCESSED",
                    UserId          = call.UserId,
                    ServerName      = Environment.MachineName
                };
                results = record.Insert();
            }
            catch (Exception ex)
            {
                GeneralUtility.LogError(ex.Message, "CreateCallRoutingRecordFromCallRecord");
            }
            return(results);
        }
示例#2
0
        /// <summary>
        /// Generates the insert SQL.
        /// </summary>
        /// <returns></returns>
        //protected override string GenerateInsertSql()
        //{
        //  var sql = new StringBuilder("INSERT INTO CALL (CALL_ID, ACCNT_HRCY_STEP_ID, ENTRY_POINT_HRCY_STEP_ID, LOB_CD, ");
        //  sql.Append("CLIENT_HRCY_STEP_ID, CALL_START_TIME, STATUS,USER_ID, ");
        //  sql.Append("INPUT_SYSTEM_NAME, CALLER_INFO, ORGINAL_CALL_ID, SERVER_NAME) VALUES(");
        //  sql.AppendFormat("{0}, {1}, {2}, '{3}', {4}, sysdate, 'INPROC', {5}, 'FNS NET', '{6}', {7}, '{8}')",
        //    CallId, AccntHrcyStepId, ClientHrcyStepId, LobCd, ClientHrcyStepId, UserId, CallerInfo, (OrginalCallId.Length > 0 ? OrginalCallId : "NULL"),ServerName );
        //  return sql.ToString();
        //}

        /// <summary>
        /// Gets the ahs id from call id.
        /// </summary>
        /// <param name="callId">The call id.</param>
        /// <param name="instance">The instance.</param>
        /// <returns></returns>
        public static string GetAhsIdFromCallId(string callId, string instance)
        {
            var results = string.Empty;

            try
            {
                var record = new CallRecord {
                    Instance = instance, CallId = callId
                };
                if (record.Execute())
                {
                    results = record.AccntHrcyStepId;
                }
                else
                {
                    throw new ApplicationException(record.LastError);
                }
            }
            catch (Exception ex)
            {
                GeneralUtility.LogError(ex.Message, "GetAhsIdFromCallId");
            }
            return(results);
        }
示例#3
0
 /// <summary>
 /// Creates the call routing record from call record.
 /// </summary>
 /// <param name="call">The call.</param>
 /// <returns></returns>
 static public bool CreateCallRoutingRecordFromCallRecord(CallRecord call)
 {
     return(CreateCallRoutingRecordFromCallRecord(call, call.Status));
 }