Esempio n. 1
0
        public JsonResult GetAllRestaurants()
        {
            var retModel = new AllRestaurants
            {
                Success = false
            };

            try
            {
                retModel.ListRestaurants = ListService.GetItemsForSearch_AdminPanel();
                retModel.Success         = true;
            }
            catch (Exception e)
            {
                retModel.Message = "could not get restaurants.";
                throw;
            }

            return(Json(retModel, JsonRequestBehavior.AllowGet));
        }