public void linkBroadcast_Click(object sender, EventArgs e) { // create a private audit entry for the broadcast draft TransitAccountAuditEntry audit_entry = new TransitAccountAuditEntry(); audit_entry.AccountId = SessionManager.AccountId; audit_entry.Description = string.Format("[user:{0}] has broadcasted <a href='{1}'>{2}</a>", SessionManager.AccountId, Request.Url.PathAndQuery, Renderer.Render(Page.Title)); audit_entry.IsBroadcast = true; audit_entry.IsPrivate = false; audit_entry.IsSystem = false; audit_entry.Url = Request.Url.PathAndQuery; audit_entry.Id = SessionManager.SocialService.CreateOrUpdateAccountAuditEntry( SessionManager.Ticket, audit_entry); ReportInfo(string.Format("{0} has been broadcasted to your friends!", Page.Title)); }
public void linkBroadcast_Click(object sender, EventArgs e) { // create a private audit entry for the broadcast draft TransitAccountAuditEntry audit_entry = new TransitAccountAuditEntry(); audit_entry.AccountId = SessionManager.AccountId; audit_entry.Description = string.Format("[user:{0}] has broadcasted <a href='{1}'>{2}</a>", SessionManager.AccountId, Request.Url.PathAndQuery, Renderer.Render(Page.Title)); audit_entry.IsBroadcast = true; audit_entry.IsPrivate = false; audit_entry.IsSystem = false; audit_entry.Url = Request.Url.PathAndQuery; audit_entry.Id = SessionManager.SocialService.CreateOrUpdateAccountAuditEntry( SessionManager.Ticket, audit_entry); ReportInfo(string.Format("{0} has been broadcasted to your friends!", Page.Title)); }
public void linkBroadcast_Click(object sender, EventArgs e) { // create a private audit entry for the broadcast draft TransitAccountAuditEntry audit_entry = new TransitAccountAuditEntry(); audit_entry.AccountId = SessionManager.AccountId; audit_entry.Description = string.Format("Broadcast Draft: {0}", Guid.NewGuid()); audit_entry.IsBroadcast = true; audit_entry.IsPrivate = true; audit_entry.IsSystem = false; audit_entry.Url = "AccountManage.aspx"; audit_entry.Id = SessionManager.SocialService.CreateOrUpdateAccountAuditEntry( SessionManager.Ticket, audit_entry); // create a discussion attached to audit entry draft int discussion_id = SessionManager.DiscussionService.GetOrCreateDiscussionId( SessionManager.Ticket, "AccountAuditEntry", audit_entry.Id); Redirect(string.Format("DiscussionPost.aspx?did={0}&ReturnUrl=AccountManage.aspx", discussion_id)); }
public void linkBroadcast_Click(object sender, EventArgs e) { // create a private audit entry for the broadcast draft TransitAccountAuditEntry audit_entry = new TransitAccountAuditEntry(); audit_entry.AccountId = SessionManager.AccountId; audit_entry.Description = string.Format("Broadcast Draft: {0}", Guid.NewGuid()); audit_entry.IsBroadcast = true; audit_entry.IsPrivate = true; audit_entry.IsSystem = false; audit_entry.Url = "AccountManage.aspx"; audit_entry.Id = SessionManager.SocialService.CreateOrUpdateAccountAuditEntry( SessionManager.Ticket, audit_entry); // create a discussion attached to audit entry draft int discussion_id = SessionManager.DiscussionService.GetOrCreateDiscussionId( SessionManager.Ticket, "AccountAuditEntry", audit_entry.Id); Redirect(string.Format("DiscussionPost.aspx?did={0}&ReturnUrl=AccountManage.aspx", discussion_id)); }
public void linkForward_Command(object sender, CommandEventArgs e) { TransitAccountAuditEntry t_instance = SessionManager.GetInstance <TransitAccountAuditEntry, int>( int.Parse(e.CommandArgument.ToString()), SessionManager.SocialService.GetAccountAuditEntryById); if (t_instance.IsBroadcast && t_instance.AccountId == SessionManager.AccountId) { throw new Exception("You cannot forward your own broadcast."); } TransitAccountAuditEntry t_forward = new TransitAccountAuditEntry(); t_forward.AccountId = SessionManager.AccountId; t_forward.Description = string.Format("[user:{0}] forwarded: {1}", SessionManager.AccountId, t_instance.Description); t_forward.IsBroadcast = true; t_forward.IsPrivate = false; t_forward.IsSystem = false; t_forward.Url = t_instance.Url; SessionManager.CreateOrUpdate <TransitAccountAuditEntry>( t_forward, SessionManager.SocialService.CreateOrUpdateAccountAuditEntry); ReportInfo("Message has been successfully broadcasted to your friends!"); }
public int CreateOrUpdateAccountAuditEntry(string ticket, TransitAccountAuditEntry t_instance) { return(WebServiceImpl <TransitAccountAuditEntry, ManagedAccountAuditEntry, AccountAuditEntry> .CreateOrUpdate( ticket, t_instance)); }
public void linkForward_Command(object sender, CommandEventArgs e) { TransitAccountAuditEntry t_instance = SessionManager.GetInstance<TransitAccountAuditEntry, int>( int.Parse(e.CommandArgument.ToString()), SessionManager.SocialService.GetAccountAuditEntryById); if (t_instance.IsBroadcast && t_instance.AccountId == SessionManager.AccountId) throw new Exception("You cannot forward your own broadcast."); TransitAccountAuditEntry t_forward = new TransitAccountAuditEntry(); t_forward.AccountId = SessionManager.AccountId; t_forward.Description = string.Format("[user:{0}] forwarded: {1}", SessionManager.AccountId, t_instance.Description); t_forward.IsBroadcast = true; t_forward.IsPrivate = false; t_forward.IsSystem = false; t_forward.Url = t_instance.Url; SessionManager.CreateOrUpdate<TransitAccountAuditEntry>( t_forward, SessionManager.SocialService.CreateOrUpdateAccountAuditEntry); ReportInfo("Message has been successfully broadcasted to your friends!"); }
public int CreateOrUpdateAccountAuditEntry(string ticket, TransitAccountAuditEntry t_instance) { return WebServiceImpl<TransitAccountAuditEntry, ManagedAccountAuditEntry, AccountAuditEntry>.CreateOrUpdate( ticket, t_instance); }