/
ivan
/
ModMas
Обзор
Документация
Войти
/
ivan
/
ModMas
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ModuleMaster/handlers/injection_demand_comment.ashx
46 строк
1 KB
i.krivokon
Initial commit
13 мар 2026, 13:49
13 мар 2026, 13:49
00d9fb6
Код
Авторство
О чём код?
<%@ WebHandler Language="VB" Class="slideshow" %> Imports System.Web.Script.Serialization Imports sharedClasses.dbFunctions Imports System.Data Public Class slideshow : Implements IHttpHandler Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest Dim sqlf As New SqlFunctions Dim com As New Data.SqlClient.SqlCommand Dim value = context.Request.QueryString("value") Dim material = context.Request.QueryString("material") Dim week = context.Request.QueryString("week") Dim mode = context.Request.QueryString("mode") Dim result As Integer If mode = "update" Then result = sqlf.NonQuery("update [UserModules].[user].[Injection_demands_comments_P901] set comment='" + value + "' where material='" + material + "' and [current_week] ='" + week + "'") ElseIf mode = "insert" Then result = sqlf.NonQuery("insert into [UserModules].[user].[Injection_demands_comments_P901] (material, current_week, comment) values ('" + material + "','" + week + "','" + value + "')") End If context.Response.ContentType = "content/text" If result > 0 Then context.Response.Write("ok") Else context.Response.Write("ng") End If End Sub Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable Get Return False End Get End Property End Class