public ActionResult CheckBeforeDelete(DeleteLocationModel input) { try { var response = iRstSrvClient.Get().LocationCheckBeforeDeleting_00_00_001(Utils.GetRestaurentID().ToString(), input.LocationID.ToString(), Utils.GetToken()); if (response.Error == null || response.Error.ErrorCode == ErrorCodes.NoneError) { return(Json(new { hasError = false, hasBooking = response.HasBookings != 0 })); } } catch { } return(Json(new { hasError = true })); }
public ActionResult DeleteLocation(DeleteLocationModel input) { try { var response = iRstSrvClient.Get().LocationDeleteLogic_00_00_001(Common.RestaurantID, input.LocationID.ToString(), Common.Token); if (Utils.CheckAPIResponse(response)) { return(Json(new { isSucceed = true })); } } catch { } return(Json(new { isSucceed = false })); }