/
ivan
/
ModMas
Обзор
Документация
Войти
/
ivan
/
ModMas
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ModuleMaster/multibin/bin2bin.ashx
55 строк
2 KB
i.krivokon
Initial commit
13 мар 2026, 13:49
13 мар 2026, 13:49
00d9fb6
Код
Авторство
О чём код?
<%@ WebHandler Language="VB" Class="getsqldata" %> Imports System Imports System.Web Imports Newtonsoft.Json Public Class getsqldata : Implements IHttpHandler Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest context.Response.ContentType = "text/plain" With context.Request Dim sql As New StringBuilder Dim su As String = .QueryString("su") Dim bin As String = .QueryString("bin") Dim result As Integer sql.AppendLine("update [Multi-bin].[dbo].[Stock]") sql.AppendLine("set bin = '" & bin & "' ") sql.AppendLine(",zone = (select top 1 zone from [Multi-bin].[dbo].[Bin] where bin = '" & bin & "')") sql.AppendLine("where su = '" & su & "' ") Dim sqlf As New sharedClasses.dbFunctions.SqlFunctions Dim dt As Data.DataTable = Nothing result = sqlf.NonQuery(sql.ToString) Try If result > 0 Then context.Response.Write("[{""msg"":""OK""}]") Else context.Response.Write("[{""msg"":""Error during BIN to BIN""}]") End If Catch ex As Exception context.Response.Write("[{""msg"":""Connection problem. Try-Catch triggered""}]") End Try End With End Sub Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable Get Return False End Get End Property End Class