Beispiel #1
0
        public ActionResult ViewCallInfo(string callId)
        {
            Logger.Info(_logMsg.Clear().SetPrefixMsg("View CallInfo").Add("CallId", callId).ToInputLogString());

            try
            {
                _customerFacade = new CustomerFacade();
                var callInfo = _customerFacade.GetCallInfoByCallId(callId);
                if (callInfo != null)
                {
                    Logger.Info(_logMsg.Clear().SetPrefixMsg("View CallInfo").Add("CallID", callInfo.CallId)
                                .Add("CardNo", callInfo.CardNo.MaskCardNo())
                                .Add("CallType", callInfo.CallType)
                                .ToSuccessLogString());
                    return(View("~/Views/Shared/_ViewCallInfo.cshtml", callInfo));
                }

                return(Json(new
                {
                    Valid = false,
                    Error = Resource.Msg_NoRecords,
                    Errors = string.Empty
                }));
            }
            catch (Exception ex)
            {
                Logger.Error("Exception occur:\n", ex);
                Logger.Info(_logMsg.Clear().SetPrefixMsg("View CallInfo").Add("Error Message", ex.Message).ToFailLogString());
                return(Json(new
                {
                    Valid = false,
                    Error = Resource.Error_System,
                    Errors = string.Empty
                }));
            }
        }