Files
17168ERP/web/admin/news/range2.aspx
2025-08-29 01:27:25 +08:00

56 lines
2.1 KiB
Plaintext

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="range2.aspx.cs" Inherits="admin_news_range2" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<link href="~/js/bootstrap5/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<style>
.list-group-item.bg-light:hover{
cursor:pointer;
background-color: rgba(var(--bs-light-rgb),0)!important
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div>
<asp:sqlDataSource ID="sqlDataSource1" runat="server"
updateCommand="UPDATE [news_kind] SET [kind] = @kind, [root] = @root, [range] = @range WHERE [num] = @num"
ProviderName="<%$ ConnectionStrings:shopConn.providerName%>">
<UpdateParameters>
<asp:Parameter Name="kind" Type="String" />
<asp:Parameter Name="root" Type="Int32" />
<asp:Parameter Name="range" Type="Int32" />
<asp:Parameter Name="num" Type="Int32" />
</UpdateParameters>
</asp:sqlDataSource>
<asp:UpdatePanel ID="up1" runat="server">
<ContentTemplate>
<cc1:reorderlist id="ReorderList1" runat="server" cssClass="list-group"
allowreorder="True" datakeyfield="num" datasourceid="sqlDataSource1" postbackonreorder="False" sortorderfield="range">
<ItemTemplate>
<%#Eval("kind")%>
</ItemTemplate>
</cc1:reorderlist>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
<script>
document.querySelectorAll("ul").forEach((t, i) => {
t.className = "list-group";
});
document.querySelectorAll("li").forEach((t, i) => {
t.className = "list-group-item bg-light";
});
</script>
</body>
</html>