/
ivan
/
ModMas
Обзор
Документация
Войти
/
ivan
/
ModMas
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ModuleMaster/logistics/stoplist.aspx
145 строк
6 KB
i.krivokon
Initial commit
13 мар 2026, 13:49
13 мар 2026, 13:49
00d9fb6
Код
Авторство
О чём код?
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="stoplist.aspx.vb" Inherits="logistics_stoplist" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <%--<meta http-equiv="refresh" content="3" />--%> <title>Shipment stop list</title> <script src="../Scripts/jquery-1.9.1.min.js"></script> <style> html { width: 99%; height: 99%; } body { padding: 0px; width: 100%; height: 100%; background-color: black; font-family: Gulim, Arial; } form { width: 100%; height: 100%; } </style> <script type="text/javascript"> function playSound(url) { const audio = new Audio(url); audio.play(); } var refreshInterval = 5; var counter = 0; var loading = 0; var sign = ""; $(document).ready(function () { now = new Date(); countTime(); }); function syncTime() { var request = $.ajax({ url: "../Handlers/getservertime.ashx", data: {} }); request.done(getTimeSuccess); request.fail(getTimeFail); } function getTimeSuccess(result) { if (counter > refreshInterval) { counter = 0; console.log("Refreshing the page........."); location.reload(); } now = new Date("2022", "0", "0", result.split(":")[0], result.split(":")[1], result.split(":")[2]) var t = setTimeout(function () { countTime() }, 1000); } function getTimeFail() { now = new Date(); console.log("server time fail, use local: " + now); switch (loading) { case 0: sign = "."; loading = loading + 1; break; case 1: sign = ".."; loading = loading + 1; break; case 2: sign = "..."; loading = loading + 1; break; case 3: sign = ".."; loading = 0; break; } var t = setTimeout(function () { countTime() }, 1000); } function countTime() { now.setSeconds(now.getSeconds() + 1); var h = now.getHours(); var m = now.getMinutes(); var s = now.getSeconds(); m = checkTime(m); s = checkTime(s); var time = sign + " " + h + ":" + m + ":" + s $("#currentClock").html(time); counter = counter + 1; if (counter > refreshInterval) { syncTime(); } else { var t = setTimeout(function () { countTime() }, 1000); } } function checkTime(i) { if (i < 10) { i = "0" + i }; // add zero in front of numbers < 10 return i; } </script> </head> <body> <form id="form1" runat="server"> <div> <asp:GridView runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="5" DataSourceID="SqlDataSource1" ForeColor="Black" GridLines="Vertical" Font-Size="32pt" Width="100%" CellSpacing="10"> <AlternatingRowStyle BackColor="White" /> <Columns> <asp:BoundField DataField="MODEL" HeaderText="MODEL" SortExpression="MODEL" /> <asp:BoundField DataField="PALLET_NO" HeaderText="PALLET NO" SortExpression="PALLET_NO" /> <asp:BoundField DataField="FIRST_SN" HeaderText="FIRST SN" SortExpression="FIRST_SN" /> <asp:BoundField DataField="LAST_SN" HeaderText="LAST SN" SortExpression="LAST_SN" /> <asp:BoundField DataField="REMARK" HeaderText="REMARK" SortExpression="REMARK" /> </Columns> <FooterStyle BackColor="#CCCC99" /> <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" /> <RowStyle BackColor="#F7F7DE" /> <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" /> <SortedAscendingCellStyle BackColor="#FBFBF2" /> <SortedAscendingHeaderStyle BackColor="#848384" /> <SortedDescendingCellStyle BackColor="#EAEAD3" /> <SortedDescendingHeaderStyle BackColor="#575357" /> </asp:GridView> <div id="currentClock" style="text-align: center; color: white; font-size: 28pt;"></div> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ModMas %>" SelectCommand="SELECT [FIRST_SN], [LAST_SN], [REMARK], [PALLET_NO], [MODEL] FROM USERMODULES.[USER].SHIPMENT_STOP_LIST WHERE ([ENABLE_Y_N] = 'Y')"></asp:SqlDataSource> </div> <asp:Panel runat="server" id="pnlMessage" style="position: absolute; width:1620px; height: 800px; background: red; left:250px; top: 200px; display: ; text-align:center; vertical-align:middle;"> <asp:Literal ID="lblErrorMessage" runat ="server">Ku-Ku</asp:Literal> </asp:Panel> </form> </body> </html>