Esempio n. 1
0
        public ActionResult AutoCompleteSearchSubAreaOnMapping(string keyword, int?campaignServiceId, int?areaId, int?typeId)
        {
            Logger.Info(_logMsg.Clear().SetPrefixMsg("Auto complete Search SubArea (on Mapping)").ToInputLogString());

            try
            {
                _srFacade = new ServiceRequestFacade();
                List <SubAreaItemEntity> result = _srFacade.AutoCompleteSearchSubAreaOnMapping(keyword, campaignServiceId, areaId, typeId, AutoCompleteMaxResult);
                return(Json(result.Select(r => new
                {
                    r.SubAreaId,
                    r.SubAreaName,
                })));
            }
            catch (Exception ex)
            {
                Logger.Info(_logMsg.Clear().SetPrefixMsg("Auto complete Search SubArea (on Mapping)").ToFailLogString());
                return(Error(new HandleErrorInfo(ex, this.ControllerContext.RouteData.Values["controller"].ToString(),
                                                 this.ControllerContext.RouteData.Values["action"].ToString())));
            }
        }