/
ivan
/
ModMas
Обзор
Документация
Войти
/
ivan
/
ModMas
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ModuleMaster/usercontrols/condensedtext.ascx.vb
88 строк
2 KB
i.krivokon
Initial commit
13 мар 2026, 13:49
13 мар 2026, 13:49
00d9fb6
Код
Авторство
О чём код?
Partial Class UserControls_condensedText Inherits System.Web.UI.UserControl Dim _tableName As String Public Property TableName As String Set(value As String) _tableName = value dv.Attributes.Add("tablename", value) End Set Get Return dv.Attributes("tablename") End Get End Property Dim _recordId As Integer Public Property RecordId As Integer Set(value As Integer) _recordId = value dv.Attributes.Add("recordid", value) End Set Get Return dv.Attributes("recordid") End Get End Property Dim _fieldName As String Public Property FieldName As String Set(value As String) _fieldName = value dv.Attributes.Add("fieldname", value) End Set Get Return dv.Attributes("fieldname") End Get End Property Public Property Text As String Set(value As String) If value = " " Then TextBox1.Text = "" ltrText.Text = value Else TextBox1.Text = value ltrText.Text = value End If End Set Get Return TextBox1.Text End Get End Property Dim _shortTextLength As Integer = 8 Public Property ShortTextLength As Integer Set(value As Integer) _shortTextLength = value dv.Attributes.Add("shortTextLength", value) End Set Get Return dv.Attributes("shortTextLength") End Get End Property Dim _readOnly As Boolean = True Public Property isReadOnly As Boolean Set(value As Boolean) _readOnly = value End Set Get Return _readOnly End Get End Property Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then ShortTextLength = _shortTextLength End If If Text.Length > ShortTextLength Then Label1.Text = Text.Substring(0, ShortTextLength) & "..." Label1.ToolTip = Text Else Label1.Text = Text End If If Label1.Text = "" Then Label1.Text = " " 'editText.Visible = Not _readOnly 'viewText.Visible = _readOnly save.Visible = Not _readOnly End Sub End Class