Reconfigure for GIT

This commit is contained in:
2017-03-26 20:00:03 +02:00
commit 00637826ab
8056 changed files with 535977 additions and 0 deletions
@@ -0,0 +1,159 @@
Imports System
Imports System.ComponentModel
Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering
Imports DevExpress.ExpressApp
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation
Imports System.Drawing
Imports System.IO
Imports DevExpress.ExpressApp.Utils
<DefaultClassOptions()> _
<NavigationItem(False), CreatableItem(False)> _
Public Class CustomersFileAttachment
Inherits FileAttachmentBase
Private _FileType As String
Private _Customers As Customers
Private _Status As eProductsDocumentationStatus
Private _RowGroup1 As String 'Szöveges csoportosítás (nem kötelezõ)
Private _RowGroup2 As String 'Szöveges másodlagos csoportosítás (nem kötelezõ)
Private _ShortName As String
Private _Description As String
Private _FileCreated As Date
Private _FileModified As Date
Private _ObjectCreated As Date
Private _UserCreated As User
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
Protected Overrides Sub OnSaving()
MyBase.OnSaving()
If Session.IsNewObject(Me) Then
ObjectCreated = GetSQLTime(Session)
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
End If
End Sub
<Association("Customers-CustomersFileAttachment", GetType(Customers))> _
<Browsable(False)> _
Property Customers As Customers
Get
Return _Customers
End Get
Set(value As Customers)
SetPropertyValue("Customers", _Customers, value)
End Set
End Property
Property FileType As String
Get
Return _FileType
End Get
Set(value As String)
SetPropertyValue("FileType", _FileType, value)
End Set
End Property
Public Property Status() As eProductsDocumentationStatus
Get
Return _Status
End Get
Set(ByVal value As eProductsDocumentationStatus)
SetPropertyValue("Status", _Status, value)
End Set
End Property
Public Property RowGroup1() As String
Get
Return _RowGroup1
End Get
Set(ByVal value As String)
SetPropertyValue("RowGroup1", _RowGroup1, value)
End Set
End Property
Public Property RowGroup2() As String
Get
Return _RowGroup2
End Get
Set(ByVal value As String)
SetPropertyValue("RowGroup2", _RowGroup2, value)
End Set
End Property
Property ShortName As String
Get
Return _ShortName
End Get
Set(value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
Property Description As String
Get
Return _Description
End Get
Set(value As String)
SetPropertyValue("Description", _Description, value)
End Set
End Property
Property FileCreated As Date
Get
Return _FileCreated
End Get
Set(value As Date)
SetPropertyValue("FileCreated", _FileCreated, value)
End Set
End Property
Property FileModified As Date
Get
Return _FileModified
End Get
Set(value As Date)
SetPropertyValue("FileModified", _FileModified, value)
End Set
End Property
<NonCloneable> _
Property ObjectCreated As Date
Get
Return _ObjectCreated
End Get
Set(value As Date)
SetPropertyValue("ObjectCreated", _ObjectCreated, value)
End Set
End Property
<NonCloneable> _
Property UserCreated As User
Get
Return _UserCreated
End Get
Set(value As User)
SetPropertyValue("UserCreated", _UserCreated, value)
End Set
End Property
'--------ReadOnly---------
<VisibleInDetailView(False)> _
ReadOnly Property ImageType As Image
Get
Select Case Path.GetExtension(File.FileName)
Case ".xls", ".xlsx", ".XLS", ".XLSX"
Return ImageLoader.Instance.GetImageInfo("XLS").Image
Case ".doc", ".docx", ".DOC", ".DOCX"
Return ImageLoader.Instance.GetImageInfo("DOC").Image
Case ".pdf", ".PDF"
Return ImageLoader.Instance.GetImageInfo("PDF").Image
Case ".txt", ".TXT"
Return ImageLoader.Instance.GetImageInfo("NoImage").Image
Case Else
Return ImageLoader.Instance.GetImageInfo("NoImage").Image
Return Nothing
End Select
End Get
End Property
End Class