public void linkAddToFavorites_Click(object sender, EventArgs e) { if (!SessionManager.IsLoggedIn) { RedirectToLogin(); } if (SessionManager.PlaceService.IsAccountPlaceFavorite( SessionManager.Ticket, SessionManager.AccountId, RequestId)) { throw new Exception("This place is already your favorite."); } TransitAccountPlaceFavorite apf = new TransitAccountPlaceFavorite(); apf.PlaceId = RequestId; SessionManager.CreateOrUpdate <TransitAccountPlaceFavorite>( apf, SessionManager.PlaceService.CreateOrUpdateAccountPlaceFavorite); ReportInfo(string.Format("Added {0} to your favorites.", Renderer.Render(Place.Name))); placeFriends.GetData(sender, e); panelFriends.Update(); }
public int CreateOrUpdateAccountPlaceFavorite(string ticket, TransitAccountPlaceFavorite apf) { return WebServiceImpl<TransitAccountPlaceFavorite, ManagedAccountPlaceFavorite, AccountPlaceFavorite>.CreateOrUpdate( ticket, apf); }
public void linkAddToFavorites_Click(object sender, EventArgs e) { if (!SessionManager.IsLoggedIn) { RedirectToLogin(); } if (SessionManager.PlaceService.IsAccountPlaceFavorite( SessionManager.Ticket, SessionManager.AccountId, RequestId)) { throw new Exception("This place is already your favorite."); } TransitAccountPlaceFavorite apf = new TransitAccountPlaceFavorite(); apf.PlaceId = RequestId; SessionManager.CreateOrUpdate<TransitAccountPlaceFavorite>( apf, SessionManager.PlaceService.CreateOrUpdateAccountPlaceFavorite); ReportInfo(string.Format("Added {0} to your favorites.", Renderer.Render(Place.Name))); placeFriends.GetData(sender, e); panelFriends.Update(); }