public void feature_Click(object sender, EventArgs e) { if (!SessionManager.IsAdministrator) { // avoid round-trip throw new Exception("You must be an administrator to feature groups."); } TransitFeature t_feature = new TransitFeature(); t_feature.DataObjectName = "AccountGroup"; t_feature.DataRowId = RequestId; SessionManager.CreateOrUpdate <TransitFeature>( t_feature, SessionManager.ObjectService.CreateOrUpdateFeature); Redirect(Request.Url.PathAndQuery); }
public void deletefeature_Click(object sender, EventArgs e) { if (!SessionManager.IsAdministrator) { // avoid round-trip throw new Exception("You must be an administrator to feature blogs."); } TransitFeature t_feature = new TransitFeature(); t_feature.DataObjectName = "AccountBlog"; t_feature.DataRowId = RequestId; SessionManager.ObjectService.DeleteAllFeatures(SessionManager.Ticket, t_feature); SessionManager.InvalidateCache <TransitFeature>(); Redirect(Request.Url.PathAndQuery); }
public void deletefeature_Click(object sender, EventArgs e) { if (!SessionManager.IsAdministrator) { // avoid round-trip throw new Exception("You must be an administrator to feature feed items."); } TransitFeature t_feature = new TransitFeature(); t_feature.DataObjectName = "AccountFeedItem"; t_feature.DataRowId = RequestId; SessionManager.ObjectService.DeleteAllFeatures(SessionManager.Ticket, t_feature); SessionManager.InvalidateCache <TransitFeature>(); GetDataFeature(sender, e); panelAdmin.Update(); }
public void feature_Click(object sender, EventArgs e) { if (!SessionManager.IsAdministrator) { // avoid round-trip throw new Exception("You must be an administrator to feature feeds."); } TransitFeature t_feature = new TransitFeature(); t_feature.DataObjectName = "AccountFeed"; t_feature.DataRowId = RequestId; SessionManager.CreateOrUpdate <TransitFeature>( t_feature, SessionManager.ObjectService.CreateOrUpdateFeature); GetDataFeature(sender, e); panelAdminUpdate.Update(); }
public void deletefeature_Click(object sender, EventArgs e) { if (!SessionManager.IsAdministrator) { // avoid round-trip throw new Exception("You must be an administrator to feature events."); } TransitFeature t_feature = new TransitFeature(); t_feature.DataObjectName = "AccountEvent"; t_feature.DataRowId = RequestId; SessionManager.ObjectService.DeleteAllFeatures(SessionManager.Ticket, t_feature); SessionManager.InvalidateCache<TransitFeature>(); Redirect(Request.Url.PathAndQuery); }
public void feature_Click(object sender, EventArgs e) { if (!SessionManager.IsAdministrator) { // avoid round-trip throw new Exception("You must be an administrator to feature AccountEvents."); } TransitFeature t_feature = new TransitFeature(); t_feature.DataObjectName = "AccountEvent"; t_feature.DataRowId = RequestId; SessionManager.CreateOrUpdate<TransitFeature>( t_feature, SessionManager.ObjectService.CreateOrUpdateFeature); Redirect(Request.Url.PathAndQuery); }
public int CreateOrUpdateFeature(string ticket, TransitFeature feature) { return(WebServiceImpl <TransitFeature, ManagedFeature, Feature> .CreateOrUpdate( ticket, feature)); }
public void deletefeature_Click(object sender, EventArgs e) { if (!SessionManager.IsAdministrator) { // avoid round-trip throw new Exception("You must be an administrator to feature feed items."); } TransitFeature t_feature = new TransitFeature(); t_feature.DataObjectName = "AccountFeedItem"; t_feature.DataRowId = RequestId; SessionManager.ObjectService.DeleteAllFeatures(SessionManager.Ticket, t_feature); SessionManager.InvalidateCache<TransitFeature>(); GetDataFeature(sender, e); panelAdmin.Update(); }
public int CreateOrUpdateFeature(string ticket, TransitFeature feature) { return WebServiceImpl<TransitFeature, ManagedFeature, Feature>.CreateOrUpdate( ticket, feature); }
public void DeleteAllFeatures(string ticket, TransitFeature token) { using (SnCore.Data.Hibernate.Session.OpenConnection()) { ISession session = SnCore.Data.Hibernate.Session.Current; ManagedSecurityContext sec = new ManagedSecurityContext(session, ticket); if (!sec.IsAdministrator()) { throw new ManagedAccount.AccessDeniedException(); } ManagedFeature.Delete(session, token.DataObjectName, token.DataRowId); SnCore.Data.Hibernate.Session.Flush(); } }
public void feature_Click(object sender, EventArgs e) { if (!SessionManager.IsAdministrator) { // avoid round-trip throw new Exception("You must be an administrator to feature feeds."); } TransitFeature t_feature = new TransitFeature(); t_feature.DataObjectName = "AccountFeed"; t_feature.DataRowId = RequestId; SessionManager.CreateOrUpdate<TransitFeature>( t_feature, SessionManager.ObjectService.CreateOrUpdateFeature); GetDataFeature(sender, e); panelAdminUpdate.Update(); }