Beispiel #1
0
        public ActionResult AutoCompleteSearchType(string keyword, bool?isAllStatus)
        {
            Logger.Info(_logMsg.Clear().SetPrefixMsg("Auto complete Search Type").ToInputLogString());

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