예제 #1
0
        public JsonResult IsStoreNameAvailable(int StoreId, string StoreName)
        {
            if (_webStoreServices.ValidateOwnerStoreName(StoreName, CurrentUserId, StoreId))
            {
                return(Json(true, JsonRequestBehavior.AllowGet));
            }

            var suggestedName = String.Format(CultureInfo.InvariantCulture, "{0} is not available.", StoreName);

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