コード例 #1
0
ファイル: AutoCompleteController.cs プロジェクト: KKPBank/CSM
        public ActionResult AutoCompleteSearchBranch(string keyword)
        {
            Logger.Info(_logMsg.Clear().SetPrefixMsg("Auto complete Search Branch").ToInputLogString());

            try
            {
                _srFacade = new ServiceRequestFacade();
                List <BranchEntity> result = _srFacade.AutoCompleteSearchBranch(keyword, AutoCompleteMaxResult);
                return(Json(result.Select(r => new
                {
                    r.BranchId,
                    r.BranchName,
                })));
            }
            catch (Exception ex)
            {
                Logger.Info(_logMsg.Clear().SetPrefixMsg("Auto complete Search Branch").ToFailLogString());
                return(Error(new HandleErrorInfo(ex, this.ControllerContext.RouteData.Values["controller"].ToString(),
                                                 this.ControllerContext.RouteData.Values["action"].ToString())));
            }
        }