/// <summary> /// The list_ item command. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> private void list_ItemCommand([NotNull] object sender, [NotNull] RepeaterCommandEventArgs e) { switch (e.CommandName) { case "add": YafBuildLink.Redirect(ForumPages.admin_topicstatus_edit); break; case "edit": YafBuildLink.Redirect(ForumPages.admin_topicstatus_edit, "i={0}", e.CommandArgument); break; case "delete": LegacyDb.TopicStatus_Delete(e.CommandArgument); this.BindData(); break; case "export": { // export this list as XML... var topicStatusList = LegacyDb.TopicStatus_List(this.PageContext.PageBoardID); topicStatusList.DataSet.DataSetName = "YafTopicStatusList"; topicStatusList.TableName = "YafTopicStatus"; topicStatusList.Columns.Remove("TopicStatusID"); topicStatusList.Columns.Remove("BoardID"); this.Response.ContentType = "text/xml"; this.Response.AppendHeader("Content-Disposition", "attachment; filename=YafTopicStatusList.xml"); topicStatusList.DataSet.WriteXml(this.Response.OutputStream); this.Response.End(); } break; case "import": YafBuildLink.Redirect(ForumPages.admin_topicstatus_import); break; } }