/
ivan
/
ModMas
Обзор
Документация
Войти
/
ivan
/
ModMas
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ModuleMaster/sj_vend/getdodetails.ashx
66 строк
3 KB
i.krivokon
Initial commit
13 мар 2026, 13:49
13 мар 2026, 13:49
00d9fb6
Код
Авторство
О чём код?
<%@ WebHandler Language="VB" Class="getbom" %> Imports System Imports System.Web Imports System.IO Public Class getbom : Implements IHttpHandler Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest context.Response.ContentType = "text/plain" context.Response.Write(drawTable(context.Request.QueryString("rowid"))) End Sub Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable Get Return False End Get End Property Private Function getData(rowid As String) As System.Data.DataTable Dim sql As New StringBuilder Dim sqlf As New sharedClasses.dbFunctions.SqlFunctions sql.AppendLine(" select ") sql.AppendLine(" do_no as [Delivery order] ") sql.AppendLine(" , material as [ASSY] ") sql.AppendLine(" , [desc] as [Description] ") sql.AppendLine(" , component as [Component] ") sql.AppendLine(" , COMPONENT_DESC as [Component description] ") sql.AppendLine(" , REQ_QTY as [Required quantity] ") sql.AppendLine(" from usermodules.[user].SUB_CONTRACT_COMPONENT ") sql.AppendLine(" where DO_NO = ( ") sql.AppendLine(" select do from usermodules.[user].MAIN_PLAN_VS_DO where id = " & rowid & ") ") Return sqlf.GetData(sql.ToString) End Function Private Function drawTable(rowid As String) As String If Not IsNothing(rowid) Then Dim gv As New GridView gv.DataSource = getData(rowid) gv.DataBind() If gv.Rows.Count > 0 Then For Each r As GridViewRow In gv.Rows 'If r.Cells(8).Text = "ASSY" Then ' r.CssClass = "highlight" 'End If ' r.Cells(2).Visible = False ' r.Cells(3).Visible = False Next 'gv.HeaderRow.Cells(0).Text = "Line" 'gv.HeaderRow.Cells(1).Text = futureWorkingDates.Tables(0).Rows(0)("min_date").ToString.Substring(6, 2) & "/" & futureWorkingDates.Tables(0).Rows(0)("min_date").ToString.Substring(4, 2) 'gv.HeaderRow.Cells(2).Visible = False 'gv.HeaderRow.Cells(3).Visible = False Dim myCItrad As System.Globalization.CultureInfo = New System.Globalization.CultureInfo("EN-US", True) Dim sw As StringWriter = New StringWriter(myCItrad) Dim hw As HtmlTextWriter = New HtmlTextWriter(sw) 'gv.CssClass = "detailTable" gv.RenderControl(hw) Return sw.ToString End If End If Return "No data found" End Function End Class