RegisterNamespace("PowercatVision");
PowercatVision.ListingsService = function(){};
PowercatVision.ListingsService.GetListings = function(_pageStart, _pageSize, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/GetListings", data:'', onComplete: onCompleteHandler}).post({"_pageStart":_pageStart, "_pageSize":_pageSize});
}
PowercatVision.ListingsService.GetAllListings = function(onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/GetAllListings", data:'', onComplete: onCompleteHandler}).post();
}
PowercatVision.ListingsService.GetListingById = function(_id, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/GetListingById", data:'', onComplete: onCompleteHandler}).post({"_id":_id});
}
PowercatVision.ListingsService.GetListingPhotos = function(_id, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/GetListingPhotos", data:'', onComplete: onCompleteHandler}).post({"_id":_id});
}
PowercatVision.ListingsService.GetPagedListings = function(_pageStart, _pageSize, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/GetPagedListings", data:'', onComplete: onCompleteHandler}).post({"_pageStart":_pageStart, "_pageSize":_pageSize});
}
PowercatVision.ListingsService.GetRecentListings = function(onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/GetRecentListings", data:'', onComplete: onCompleteHandler}).post();
}
PowercatVision.ListingsService.GetListingNames = function(onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/GetListingNames", data:'', onComplete: onCompleteHandler}).post();
}
PowercatVision.ListingsService.GetListingsByName = function(name, _pageStart, _pageSize, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/GetListingsByName", data:'', onComplete: onCompleteHandler}).post({"name":name, "_pageStart":_pageStart, "_pageSize":_pageSize});
}
PowercatVision.ListingsService.GetListingsByNameZip = function(name, zip, _pageStart, _pageSize, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/GetListingsByNameZip", data:'', onComplete: onCompleteHandler}).post({"name":name, "zip":zip, "_pageStart":_pageStart, "_pageSize":_pageSize});
}
PowercatVision.ListingsService.GetListingsByZip = function(zip, _pageStart, _pageSize, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/GetListingsByZip", data:'', onComplete: onCompleteHandler}).post({"zip":zip, "_pageStart":_pageStart, "_pageSize":_pageSize});
}
PowercatVision.ListingsService.GetListingsByCity = function(city, _pageStart, _pageSize, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/GetListingsByCity", data:'', onComplete: onCompleteHandler}).post({"city":city, "_pageStart":_pageStart, "_pageSize":_pageSize});
}
PowercatVision.ListingsService.GetListingsForEditByCity = function(city, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/GetListingsForEditByCity", data:'', onComplete: onCompleteHandler}).post({"city":city});
}
PowercatVision.ListingsService.GetListingNamesByCity = function(city, _pageStart, _pageSize, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/GetListingNamesByCity", data:'', onComplete: onCompleteHandler}).post({"city":city, "_pageStart":_pageStart, "_pageSize":_pageSize});
}
PowercatVision.ListingsService.GetListingsFeature = function(onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/GetListingsFeature", data:'', onComplete: onCompleteHandler}).post();
}
PowercatVision.ListingsService.GetFilteredListings = function(shop, city, zip, _pageStart, _pageSize, _totalShops, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/GetFilteredListings", data:'', onComplete: onCompleteHandler}).post({"shop":shop, "city":city, "zip":zip, "_pageStart":_pageStart, "_pageSize":_pageSize, "_totalShops":_totalShops});
}
PowercatVision.ListingsService.GetActiveListingShowings = function(onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/GetActiveListingShowings", data:'', onComplete: onCompleteHandler}).post();
}
PowercatVision.ListingsService.GetFilteredListingsCount = function(shop, city, zip, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/GetFilteredListingsCount", data:'', onComplete: onCompleteHandler}).post({"shop":shop, "city":city, "zip":zip});
}
PowercatVision.ListingsService.InsertShop = function(_name, _addOne, _cityId, _stateId, _zip, _phone, _email, _website, _description, _officialGpcLocation, _newCity, overallRating, ksuRating, foodRating, serviceRating, cleanRating, seatRating, varietyRating, _hd, _wifi, _specials, _cable, _directTV, _dish, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/InsertShop", data:'', onComplete: onCompleteHandler}).post({"_name":_name, "_addOne":_addOne, "_cityId":_cityId, "_stateId":_stateId, "_zip":_zip, "_phone":_phone, "_email":_email, "_website":_website, "_description":_description, "_officialGpcLocation":_officialGpcLocation, "_newCity":_newCity, "overallRating":overallRating, "ksuRating":ksuRating, "foodRating":foodRating, "serviceRating":serviceRating, "cleanRating":cleanRating, "seatRating":seatRating, "varietyRating":varietyRating, "_hd":_hd, "_wifi":_wifi, "_specials":_specials, "_cable":_cable, "_directTV":_directTV, "_dish":_dish});
}
PowercatVision.ListingsService.UpdateListing = function(listingId, _name, _addOne, _cityId, _stateId, _zip, _phone, _email, _website, _description, _officialGpcLocation, _newCity, overallRating, ksuRating, foodRating, serviceRating, cleanRating, seatRating, varietyRating, _hd, _wifi, _specials, _cable, _directTV, _dish, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/UpdateListing", data:'', onComplete: onCompleteHandler}).post({"listingId":listingId, "_name":_name, "_addOne":_addOne, "_cityId":_cityId, "_stateId":_stateId, "_zip":_zip, "_phone":_phone, "_email":_email, "_website":_website, "_description":_description, "_officialGpcLocation":_officialGpcLocation, "_newCity":_newCity, "overallRating":overallRating, "ksuRating":ksuRating, "foodRating":foodRating, "serviceRating":serviceRating, "cleanRating":cleanRating, "seatRating":seatRating, "varietyRating":varietyRating, "_hd":_hd, "_wifi":_wifi, "_specials":_specials, "_cable":_cable, "_directTV":_directTV, "_dish":_dish});
}
PowercatVision.ListingsService.DeleteListing = function(listingId, onCompleteHandler){
var jsonRequest = new Request.JSON({url: "/PowercatVision/ListingsService.asmx/DeleteListing", data:'', onComplete: onCompleteHandler}).post({"listingId":listingId});
}
