/
ivan
/
ModMas
Обзор
Документация
Войти
/
ivan
/
ModMas
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ModuleMaster/sj/updatepl.ashx
40 строк
2 KB
i.krivokon
Initial commit
13 мар 2026, 13:49
13 мар 2026, 13:49
00d9fb6
Код
Авторство
О чём код?
<%@ WebHandler Language="VB" Class="updatepl" %> Imports System Imports System.Web Imports sharedClasses.dbFunctions Public Class updatepl : Implements IHttpHandler Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest Dim sqlf As New SqlFunctions Dim sql As New StringBuilder sql.AppendLine("MERGE usermodules.[user].pick_list as trg ") sql.AppendLine("USING GmesData.[dbo].[TBM_PM_PO_PLAN] as src ") sql.AppendLine("ON '0' + trg.[order] collate Cyrillic_General_CI_AI ") sql.AppendLine("= src.po_no collate Cyrillic_General_CI_AI ") sql.AppendLine("AND (trg.[order] is null or trg.[order] = '' or trg.accessory is null or trg.accessory = '') ") sql.AppendLine("WHEN MATCHED THEN ") sql.AppendLine("UPDATE SET trg.accessory = src.model_code, trg.PO_QTY = src.plan_Qty; ") sql.AppendLine("MERGE usermodules.[user].pick_list as trg ") sql.AppendLine("USING WMSData.dbo.TB_MATERIAL_MASTER as src ") sql.AppendLine("ON trg.[accessory] collate Cyrillic_General_CI_AI ") sql.AppendLine("= src.matnr collate Cyrillic_General_CI_AI ") sql.AppendLine("AND (trg.[description] is null or trg.[description] = '' ) ") sql.AppendLine("WHEN MATCHED THEN ") sql.AppendLine("UPDATE SET trg.[description] = src.maktx; ") Dim result As Integer = sqlf.NonQuery(sql.ToString) context.Response.ContentType = "text/plain" context.Response.Write(result) End Sub Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable Get Return False End Get End Property End Class