Reconfigure for GIT
This commit is contained in:
@@ -0,0 +1,100 @@
|
||||
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
|
||||
Public Enum eEventDirection
|
||||
eIn = 0
|
||||
eOut = 1
|
||||
End Enum
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class Events
|
||||
Inherits BaseObject
|
||||
Private _EventDirection As eEventDirection
|
||||
Private _Question As Question
|
||||
Private _QuestionStatus As eQuestionStatus
|
||||
Private _ObjectCreated As Date
|
||||
Private _UserCreated As User
|
||||
Private _Description As String
|
||||
Private _Attachment As FileData
|
||||
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 = Now
|
||||
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
End If
|
||||
End Sub
|
||||
Property EventDirection As eEventDirection
|
||||
Get
|
||||
Return _EventDirection
|
||||
End Get
|
||||
Set(value As eEventDirection)
|
||||
SetPropertyValue("EventDirection", _EventDirection, value)
|
||||
End Set
|
||||
End Property
|
||||
Property Question As Question
|
||||
Get
|
||||
Return _Question
|
||||
End Get
|
||||
Set(value As Question)
|
||||
SetPropertyValue("Question", _Question, value)
|
||||
End Set
|
||||
End Property
|
||||
Property QuestionStatus As eQuestionStatus
|
||||
Get
|
||||
Return _QuestionStatus
|
||||
End Get
|
||||
Set(value As eQuestionStatus)
|
||||
SetPropertyValue("QuestionStatus", _QuestionStatus, 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
|
||||
<Size(-1)> _
|
||||
Property Description As String
|
||||
Get
|
||||
Return _Description
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Description", _Description, value)
|
||||
End Set
|
||||
End Property
|
||||
<Browsable(False)> _
|
||||
Property Attachment As FileData
|
||||
Get
|
||||
Return _Attachment
|
||||
End Get
|
||||
Set(value As FileData)
|
||||
SetPropertyValue("Attachment", _Attachment, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,24 @@
|
||||
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
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NonPersistent()> _
|
||||
<NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class QuestionClosePopup
|
||||
Inherits BaseObject
|
||||
<Size(-1)> Property Description As String
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,363 @@
|
||||
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 DevExpress.ExpressApp.ConditionalAppearance
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem("Support")> _
|
||||
<DefaultProperty("DisplayName")> _
|
||||
<ImageName("document_down")> _
|
||||
<Appearance("Hide description in question", AppearanceItemType:="ViewItem", TargetItems:="Description", Visibility:=False, Criteria:="DocumentNumber<>''", Context:="Any")> _
|
||||
<Appearance("Disable properties", AppearanceItemType:="ViewItem", _
|
||||
TargetItems:="QuestionStatus;QuestionClosed;IssueType;DocumentNumber;Subject;Attachment;User;ObjectCreated;UserCreated", _
|
||||
Enabled:=False, Criteria:="DocumentNumber<>''", Context:="Any")> _
|
||||
<Appearance("Font appearance Question", AppearanceItemType:="ViewItem", Criteria:="QuestionStatus in ('eActive','eReactivated')", Context:="ListView", TargetItems:="*", FontStyle:=Drawing.FontStyle.Bold)> _
|
||||
<Appearance("Question - Hide QuestionInProgressState, when QuestionStatus<>eInProgress (8)", AppearanceItemType:="ViewItem", TargetItems:="QuestionInProgressState", Visibility:=Editors.ViewItemVisibility.Hide, Criteria:="QuestionStatus<>8", Context:="Any")> _
|
||||
Public Class Question
|
||||
Inherits BaseObject
|
||||
Private _QuestionStatus As eQuestionStatus
|
||||
Private _QuestionClosed As eQuestionClosed
|
||||
Private _IssueType As eIssueType
|
||||
Private _DocumentNumber As String
|
||||
Private _Subject As String
|
||||
Private _Attachment As FileData
|
||||
Private _Description As String
|
||||
Private _User As User
|
||||
Private _UserResponsible As User 'Felelõs személy
|
||||
Private _ObjectCreated As Date
|
||||
Private _UserCreated As User
|
||||
Private _Customers As Customers
|
||||
Private _AliasUser As User 'Aki létrehozta az User nevében
|
||||
Private _QuestionInProgressState As QuestionInProgressState
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
ObjectCreated = GetSQLTime(Session)
|
||||
DocumentNumber = ""
|
||||
End Sub
|
||||
Protected Overrides Sub OnSaving()
|
||||
Dim _Contacts As Contacts
|
||||
MyBase.OnSaving()
|
||||
If Session.IsNewObject(Me) Then
|
||||
ObjectCreated = Now
|
||||
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
If User Is Nothing Then
|
||||
User = UserCreated
|
||||
End If
|
||||
If String.IsNullOrEmpty(DocumentNumber) And NumberGenerator IsNot Nothing Then
|
||||
DocumentNumber = NumberGenerator.GetNewNumber(NumberGenerator, Year(Now).ToString)
|
||||
End If
|
||||
If AliasUser IsNot Nothing Then
|
||||
_Contacts = Session.FindObject(Of Contacts)(CriteriaOperator.Parse("User.Oid=?", AliasUser.Oid))
|
||||
If _Contacts IsNot Nothing Then Customers = _Contacts.Customers
|
||||
Else
|
||||
_Contacts = Session.FindObject(Of Contacts)(CriteriaOperator.Parse("User.Oid=?", User.Oid))
|
||||
If _Contacts IsNot Nothing Then Customers = _Contacts.Customers
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
<EditorAlias(DevExpress.ExpressApp.Editors.EditorAliases.DefaultPropertyEditor)> _
|
||||
Property QuestionStatus As eQuestionStatus
|
||||
Get
|
||||
Return _QuestionStatus
|
||||
End Get
|
||||
Set(value As eQuestionStatus)
|
||||
SetPropertyValue("QuestionStatus", _QuestionStatus, value)
|
||||
End Set
|
||||
End Property
|
||||
<EditorAlias(DevExpress.ExpressApp.Editors.EditorAliases.DefaultPropertyEditor)> _
|
||||
Property QuestionClosed As eQuestionClosed
|
||||
Get
|
||||
Return _QuestionClosed
|
||||
End Get
|
||||
Set(value As eQuestionClosed)
|
||||
SetPropertyValue("QuestionClosed", _QuestionClosed, value)
|
||||
End Set
|
||||
End Property
|
||||
<EditorAlias(DevExpress.ExpressApp.Editors.EditorAliases.DefaultPropertyEditor)> _
|
||||
Property IssueType As eIssueType
|
||||
Get
|
||||
Return _IssueType
|
||||
End Get
|
||||
Set(value As eIssueType)
|
||||
SetPropertyValue("IssueType", _IssueType, value)
|
||||
End Set
|
||||
End Property
|
||||
<EditorAlias(DevExpress.ExpressApp.Editors.EditorAliases.DefaultPropertyEditor)> _
|
||||
Property DocumentNumber As String
|
||||
Get
|
||||
Return _DocumentNumber
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("DocumentNumber", _DocumentNumber, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(255)> _
|
||||
<RuleRequiredField("Question-Subject", DefaultContexts.Save)> _
|
||||
Property Subject As String
|
||||
Get
|
||||
Return _Subject
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Subject", _Subject, value)
|
||||
End Set
|
||||
End Property
|
||||
<VisibleInListView(False)> _
|
||||
Property Attachment As FileData
|
||||
Get
|
||||
Return _Attachment
|
||||
End Get
|
||||
Set(value As FileData)
|
||||
SetPropertyValue("Attachment", _Attachment, value)
|
||||
End Set
|
||||
End Property
|
||||
<EditorAlias(DevExpress.ExpressApp.Editors.EditorAliases.HtmlPropertyEditor)> _
|
||||
<Size(-1)> _
|
||||
<RuleRequiredField("Question-Description", DefaultContexts.Save)> _
|
||||
Property Description As String
|
||||
Get
|
||||
Return _Description
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Description", _Description, value)
|
||||
End Set
|
||||
End Property
|
||||
<EditorAlias(DevExpress.ExpressApp.Editors.EditorAliases.DefaultPropertyEditor)> _
|
||||
Property User As User
|
||||
Get
|
||||
Return _User
|
||||
End Get
|
||||
Set(value As User)
|
||||
SetPropertyValue("User", _User, value)
|
||||
End Set
|
||||
End Property
|
||||
<DataSourceProperty("UserResponsibles")> _
|
||||
Property UserResponsible As User
|
||||
Get
|
||||
Return _UserResponsible
|
||||
End Get
|
||||
Set(value As User)
|
||||
SetPropertyValue("UserResponsible", _UserResponsible, value)
|
||||
End Set
|
||||
End Property
|
||||
<NonCloneable> _
|
||||
<EditorAlias(DevExpress.ExpressApp.Editors.EditorAliases.DefaultPropertyEditor)> _
|
||||
Property ObjectCreated As Date
|
||||
Get
|
||||
Return _ObjectCreated
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("ObjectCreated", _ObjectCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
<EditorAlias(DevExpress.ExpressApp.Editors.EditorAliases.DefaultPropertyEditor)> _
|
||||
<NonCloneable> _
|
||||
Property UserCreated As User
|
||||
Get
|
||||
Return _UserCreated
|
||||
End Get
|
||||
Set(value As User)
|
||||
SetPropertyValue("UserCreated", _UserCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
<EditorAlias(DevExpress.ExpressApp.Editors.EditorAliases.DefaultPropertyEditor)> _
|
||||
Property Customers As Customers
|
||||
Get
|
||||
Return _Customers
|
||||
End Get
|
||||
Set(value As Customers)
|
||||
SetPropertyValue("Customers", _Customers, value)
|
||||
End Set
|
||||
End Property
|
||||
Property AliasUser As User
|
||||
Get
|
||||
Return _AliasUser
|
||||
End Get
|
||||
Set(value As User)
|
||||
SetPropertyValue("AliasUser", _AliasUser, value)
|
||||
End Set
|
||||
End Property
|
||||
Property QuestionInProgressState As QuestionInProgressState
|
||||
Get
|
||||
Return _QuestionInProgressState
|
||||
End Get
|
||||
Set(value As QuestionInProgressState)
|
||||
SetPropertyValue("QuestionInProgressState", _QuestionInProgressState, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'----------------ReadOnly------------
|
||||
<VisibleInListView(False)> _
|
||||
<VisibleInDetailView(False)> _
|
||||
ReadOnly Property DisplayName As String
|
||||
Get
|
||||
Return DocumentNumber & ", " & Subject
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)> _
|
||||
<Size(-1)> _
|
||||
<EditorAlias(DevExpress.ExpressApp.Editors.EditorAliases.DefaultPropertyEditor)> _
|
||||
ReadOnly Property HTMLEvents As String
|
||||
Get
|
||||
Return CreateHTMLEvents(Me, Session)
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInDetailView(False)> _
|
||||
ReadOnly Property IMG As System.Drawing.Image
|
||||
Get
|
||||
If Me.QuestionStatus = eQuestionStatus.eActive Then
|
||||
Return ImageLoader.Instance.GetImageInfo("mail2").Image
|
||||
Else
|
||||
Return ImageLoader.Instance.GetImageInfo("mail").Image
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
<Browsable(False)> _
|
||||
ReadOnly Property NumberGenerator As NumberGenerator
|
||||
Get
|
||||
Return TryCast(Session.FindObject(Of SupportNG)(CriteriaOperator.Parse("SupportType=0")), SupportNG).NumberGenerator
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)> _
|
||||
ReadOnly Property WorkSheet_Header As XPCollection(Of WorkSheet_Header)
|
||||
Get
|
||||
Return New XPCollection(Of WorkSheet_Header)(Session, CriteriaOperator.Parse("Question.Oid=?", Me.Oid))
|
||||
End Get
|
||||
End Property
|
||||
<VisibleInListView(False)> _
|
||||
<Browsable(False)> _
|
||||
Private ReadOnly Property UserResponsibles As XPCollection(Of User)
|
||||
Get
|
||||
Dim _UserResponsibles_Collection As XPCollection(Of User) = New XPCollection(Of User)(Session, CriteriaOperator.Parse("1=1"))
|
||||
Dim _UserResponsibles_Back_Collection As New XPCollection(Of User)(Session, CriteriaOperator.Parse("1=2"))
|
||||
Dim _Need As Boolean = False
|
||||
For Each _ActUser As User In _UserResponsibles_Collection
|
||||
_Need = False
|
||||
If SecuritySystemHelper.IsUserInRole("Supporter", _ActUser) Then
|
||||
_Need = True
|
||||
Else
|
||||
Dim _Contacts As Contacts = Session.FindObject(Of Contacts)(CriteriaOperator.Parse("User.Oid=?", _ActUser.Oid))
|
||||
If _Contacts IsNot Nothing Then
|
||||
Dim _Customers As Customers = _Contacts.Customers
|
||||
|
||||
Dim _Subcontractor As Subcontractor = Session.FindObject(Of Subcontractor)(CriteriaOperator.Parse("Customers=?", _Customers))
|
||||
If _Subcontractor IsNot Nothing Then
|
||||
_Need = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
_UserResponsibles_Back_Collection.Add(_ActUser)
|
||||
Next
|
||||
Return _UserResponsibles_Back_Collection
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
'Private Function CreateHTMLEvents() As String
|
||||
' Dim _Events_Collection As New XPCollection(Of Events)(Session, CriteriaOperator.Parse("Question.Oid=?", Me.Oid))
|
||||
' Dim _Events As Events
|
||||
' Dim s As String = ""
|
||||
' If _Events_Collection IsNot Nothing Then
|
||||
' _Events_Collection.Sorting.Add(New SortProperty("ObjectCreated", DB.SortingDirection.Ascending))
|
||||
|
||||
' For Each _Events In _Events_Collection
|
||||
' If _Events.EventDirection = eEventDirection.eIn Then
|
||||
' s += "<table cellspacing='0' cellpadding='0' border='0' width=100% style='background-color:&&ECDEEC;'>"
|
||||
' s += "<tr>"
|
||||
' s += "<td style='width:10px;border-top:solid 1px;border-bottom:solid 1px;background-color:&&ECDEEC;color:&&866A86;"
|
||||
' s += " font-size:small;'>"
|
||||
' s += "</td>"
|
||||
|
||||
' s += "<td style='background-color:&&ECDEEC;color:&&866A86;vertical-align:center;width:25px;height:30px;"
|
||||
' s += " border-top:solid 1px;border-bottom:solid 1px;"
|
||||
' s += "'>"
|
||||
' s += "<img id='1' alt='->' src='Images/iRedArrow.png' style='height:22px;width:21px;border-style:none;'/>"
|
||||
' s += "</td>"
|
||||
|
||||
' s += "<td style='background-color:&&ECDEEC;color:&&866A86;vertical-align:center;"
|
||||
' s += " border-top:solid 1px;border-bottom:solid 1px;"
|
||||
' s += "'>"
|
||||
' s += _Events.UserCreated.LastName & " " & _Events.UserCreated.FirstName & " írta"
|
||||
' s += "</td>"
|
||||
|
||||
' s += "<td style='background-color:&&ECDEEC;color:&&866A86;vertical-align:center;text-align:right;"
|
||||
' s += " border-top:solid 1px;border-bottom:solid 1px;font-size:small;"
|
||||
' s += "'>"
|
||||
' s += Format(_Events.ObjectCreated, "yyyy/MM/dd hh:mm")
|
||||
' s += "</td>"
|
||||
' s += "<td style='width:5px;border-top:solid 1px;border-bottom:solid 1px;background-color:&&ECDEEC;color:&&866A86;"
|
||||
' s += " font-size:small;'>"
|
||||
' s += "</td>"
|
||||
' s += "</tr>"
|
||||
' s += "</table><br>"
|
||||
' s += "<table cellspacing='0' cellpadding='0' border='0' width=100%>"
|
||||
' s += "<tr>"
|
||||
' s += "<td style='width:25px;'></td>"
|
||||
' s += "<td>"
|
||||
' s += _Events.Description
|
||||
' s += "</td>"
|
||||
' s += "</tr>"
|
||||
' s += "</table>"
|
||||
' s += "<br><br>"
|
||||
' End If
|
||||
' If _Events.EventDirection = eEventDirection.eOut Then
|
||||
' s += "<table cellspacing='0' cellpadding='0' border='0' width=100% style='background-color:&&E1F7EC;'>"
|
||||
' s += "<tr>"
|
||||
' s += "<td style='width:10px;border-top:solid 1px;border-bottom:solid 1px;background-color:&&E1F7EC;color:&&83968D;"
|
||||
' s += " font-size:small;'>"
|
||||
' s += "</td>"
|
||||
' s += "<td style='background-color:&&E1F7EC;color:&&83968D;vertical-align:center;width:25px;height:30px;"
|
||||
' s += " border-top:solid 1px;border-bottom:solid 1px;"
|
||||
' s += "'>"
|
||||
' s += "<img id='1' alt='->' src='Images/iGreenArrow.png' style='height:22px;width:21px;border-style:none;'/>"
|
||||
' s += "</td>"
|
||||
|
||||
' s += "<td style='background-color:&&E1F7EC;color:&&83968D;vertical-align:center;"
|
||||
' s += " border-top:solid 1px;border-bottom:solid 1px;"
|
||||
' s += "'>"
|
||||
' s += _Events.UserCreated.LastName & " " & _Events.UserCreated.FirstName & " válaszolta"
|
||||
' s += "</td>"
|
||||
|
||||
' s += "<td style='background-color:&&E1F7EC;color:&&83968D;vertical-align:center;text-align:right;"
|
||||
' s += " border-top:solid 1px;border-bottom:solid 1px;font-size:small;"
|
||||
' s += "'>"
|
||||
' s += Format(_Events.ObjectCreated, "yyyy/MM/dd hh:mm")
|
||||
' s += "</td>"
|
||||
' s += "<td style='width:5px;border-top:solid 1px;border-bottom:solid 1px;background-color:&&E1F7EC;color:&&83968D;"
|
||||
' s += " font-size:small;'>"
|
||||
' s += "</td>"
|
||||
' s += "</tr>"
|
||||
' s += "</table><br>"
|
||||
' s += "<table cellspacing='0' cellpadding='0' border='0' width=100%>"
|
||||
' s += "<tr>"
|
||||
' s += "<td style='width:25px;'></td>"
|
||||
' s += "<td>"
|
||||
' s += _Events.Description
|
||||
' s += "</td>"
|
||||
' s += "</tr>"
|
||||
' s += "</table>"
|
||||
|
||||
' s += "<br><br>"
|
||||
' End If
|
||||
|
||||
' Next
|
||||
|
||||
' End If
|
||||
' s = Replace(s, "'", """")
|
||||
' s = Replace(s, "&&", "#")
|
||||
' Return s
|
||||
'End Function
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,44 @@
|
||||
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
|
||||
|
||||
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False)> _
|
||||
Public Class QuestionInProgressState
|
||||
Inherits BaseObject
|
||||
|
||||
Dim _ShortName As String
|
||||
Private _Description As String 'Leírás
|
||||
|
||||
Public Sub New(ByVal session As Session)
|
||||
MyBase.New(session)
|
||||
End Sub
|
||||
Public Overrides Sub AfterConstruction()
|
||||
MyBase.AfterConstruction()
|
||||
End Sub
|
||||
|
||||
<RuleUniqueValue("QuestionInProgressState-ShortName", DefaultContexts.Save)> _
|
||||
Property ShortName As String
|
||||
Get
|
||||
Return _ShortName
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("ShortName", _ShortName, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property Description As String
|
||||
Get
|
||||
Return _Description
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Description", _Description, value)
|
||||
End Set
|
||||
End Property
|
||||
End Class
|
||||
@@ -0,0 +1,31 @@
|
||||
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
|
||||
|
||||
Public Enum eQuestionStatus
|
||||
eActive = 0 ' Új bejelentés
|
||||
eReactivated = 6 ' Újranyitott
|
||||
eProcessedAnswered = 1 ' Megválaszolt
|
||||
eProcessedCustomerClosed = 2 ' Felhasználó lezárta
|
||||
eProcessedDuplicate = 3 ' Duplikált probléma
|
||||
eProcessedFixed = 4 ' Javított hiba
|
||||
eProcessedInsufficientInformation = 5 'Nem elégséges információ
|
||||
eInProgress = 8 'Folyamatban
|
||||
eReviewed = 7 'Elolvasva
|
||||
End Enum
|
||||
Public Enum eQuestionClosed
|
||||
eOpen = 0
|
||||
eClosed = 1
|
||||
End Enum
|
||||
Public Enum eIssueType
|
||||
eQuestion = 0
|
||||
eBugReport = 1
|
||||
eRequest = 2
|
||||
End Enum
|
||||
@@ -0,0 +1,195 @@
|
||||
Partial Class QuestionVC
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.aCreateAnswer = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aCreateReply = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aCreateQuestion = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aViewQuestionInfo = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aCloseQuestion = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aCreateWorkSheetfromQuestion = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aSetUserResponsibleQuestion = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aOpenWorkSheet_Subcontractor_Question = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aViewQuestionInfo_Subcontractor = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aCreateAnswer
|
||||
'
|
||||
Me.aCreateAnswer.Caption = "Create Answer"
|
||||
Me.aCreateAnswer.Category = "Save"
|
||||
Me.aCreateAnswer.ConfirmationMessage = Nothing
|
||||
Me.aCreateAnswer.Id = "aCreateAnswer"
|
||||
Me.aCreateAnswer.ImageName = "contract"
|
||||
Me.aCreateAnswer.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aCreateAnswer.Shortcut = Nothing
|
||||
Me.aCreateAnswer.Tag = Nothing
|
||||
Me.aCreateAnswer.TargetObjectsCriteria = "QuestionClosed=0"
|
||||
Me.aCreateAnswer.TargetViewId = ""
|
||||
Me.aCreateAnswer.ToolTip = Nothing
|
||||
Me.aCreateAnswer.TypeOfView = Nothing
|
||||
'
|
||||
'aCreateReply
|
||||
'
|
||||
Me.aCreateReply.Caption = "Create reply"
|
||||
Me.aCreateReply.Category = "aCreateReply"
|
||||
Me.aCreateReply.ConfirmationMessage = Nothing
|
||||
Me.aCreateReply.Id = "aCreateReply"
|
||||
Me.aCreateReply.ImageName = "message_add"
|
||||
Me.aCreateReply.Shortcut = Nothing
|
||||
Me.aCreateReply.Tag = Nothing
|
||||
Me.aCreateReply.TargetObjectsCriteria = Nothing
|
||||
Me.aCreateReply.TargetViewId = ""
|
||||
Me.aCreateReply.ToolTip = Nothing
|
||||
Me.aCreateReply.TypeOfView = Nothing
|
||||
'
|
||||
'aCreateQuestion
|
||||
'
|
||||
Me.aCreateQuestion.Caption = "Create Question"
|
||||
Me.aCreateQuestion.Category = "Save"
|
||||
Me.aCreateQuestion.ConfirmationMessage = Nothing
|
||||
Me.aCreateQuestion.Id = "aCreateQuestion"
|
||||
Me.aCreateQuestion.ImageName = "message_edit"
|
||||
Me.aCreateQuestion.Shortcut = Nothing
|
||||
Me.aCreateQuestion.Tag = Nothing
|
||||
Me.aCreateQuestion.TargetObjectsCriteria = Nothing
|
||||
Me.aCreateQuestion.TargetObjectType = GetType(SISBusiness.[Module].Question)
|
||||
Me.aCreateQuestion.TargetViewId = ""
|
||||
Me.aCreateQuestion.ToolTip = Nothing
|
||||
Me.aCreateQuestion.TypeOfView = Nothing
|
||||
'
|
||||
'aViewQuestionInfo
|
||||
'
|
||||
Me.aViewQuestionInfo.Caption = "aViewQuestionInfo"
|
||||
Me.aViewQuestionInfo.Category = "RecordEdit"
|
||||
Me.aViewQuestionInfo.ConfirmationMessage = Nothing
|
||||
Me.aViewQuestionInfo.Id = "aViewQuestionInfo"
|
||||
Me.aViewQuestionInfo.ImageName = "Action_Printing_Preview"
|
||||
Me.aViewQuestionInfo.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aViewQuestionInfo.Shortcut = Nothing
|
||||
Me.aViewQuestionInfo.Tag = Nothing
|
||||
Me.aViewQuestionInfo.TargetObjectsCriteria = Nothing
|
||||
Me.aViewQuestionInfo.TargetObjectType = GetType(SISBusiness.[Module].Question)
|
||||
Me.aViewQuestionInfo.TargetViewId = ""
|
||||
Me.aViewQuestionInfo.ToolTip = Nothing
|
||||
Me.aViewQuestionInfo.TypeOfView = Nothing
|
||||
'
|
||||
'aCloseQuestion
|
||||
'
|
||||
Me.aCloseQuestion.AcceptButtonCaption = Nothing
|
||||
Me.aCloseQuestion.CancelButtonCaption = Nothing
|
||||
Me.aCloseQuestion.Caption = "Close Question"
|
||||
Me.aCloseQuestion.Category = "aCloseQuestion"
|
||||
Me.aCloseQuestion.ConfirmationMessage = Nothing
|
||||
Me.aCloseQuestion.Id = "aCloseQuestion"
|
||||
Me.aCloseQuestion.ImageName = Nothing
|
||||
Me.aCloseQuestion.Shortcut = Nothing
|
||||
Me.aCloseQuestion.Tag = Nothing
|
||||
Me.aCloseQuestion.TargetObjectsCriteria = Nothing
|
||||
Me.aCloseQuestion.TargetObjectType = GetType(SISBusiness.[Module].Question)
|
||||
Me.aCloseQuestion.TargetViewId = ""
|
||||
Me.aCloseQuestion.ToolTip = Nothing
|
||||
Me.aCloseQuestion.TypeOfView = Nothing
|
||||
'
|
||||
'aCreateWorkSheetfromQuestion
|
||||
'
|
||||
Me.aCreateWorkSheetfromQuestion.AcceptButtonCaption = Nothing
|
||||
Me.aCreateWorkSheetfromQuestion.CancelButtonCaption = Nothing
|
||||
Me.aCreateWorkSheetfromQuestion.Caption = "aCreateWorkSheetfromQuestion"
|
||||
Me.aCreateWorkSheetfromQuestion.ConfirmationMessage = Nothing
|
||||
Me.aCreateWorkSheetfromQuestion.Id = "aCreateWorkSheetfromQuestion"
|
||||
Me.aCreateWorkSheetfromQuestion.ImageName = Nothing
|
||||
Me.aCreateWorkSheetfromQuestion.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aCreateWorkSheetfromQuestion.Shortcut = Nothing
|
||||
Me.aCreateWorkSheetfromQuestion.Tag = Nothing
|
||||
Me.aCreateWorkSheetfromQuestion.TargetObjectsCriteria = Nothing
|
||||
Me.aCreateWorkSheetfromQuestion.TargetObjectType = GetType(SISBusiness.[Module].Question)
|
||||
Me.aCreateWorkSheetfromQuestion.TargetViewId = Nothing
|
||||
Me.aCreateWorkSheetfromQuestion.ToolTip = Nothing
|
||||
Me.aCreateWorkSheetfromQuestion.TypeOfView = Nothing
|
||||
'
|
||||
'aSetUserResponsibleQuestion
|
||||
'
|
||||
Me.aSetUserResponsibleQuestion.AcceptButtonCaption = Nothing
|
||||
Me.aSetUserResponsibleQuestion.CancelButtonCaption = Nothing
|
||||
Me.aSetUserResponsibleQuestion.Caption = "aSet User Responsible Question"
|
||||
Me.aSetUserResponsibleQuestion.ConfirmationMessage = Nothing
|
||||
Me.aSetUserResponsibleQuestion.Id = "aSetUserResponsibleQuestion"
|
||||
Me.aSetUserResponsibleQuestion.ImageName = Nothing
|
||||
Me.aSetUserResponsibleQuestion.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
|
||||
Me.aSetUserResponsibleQuestion.Shortcut = Nothing
|
||||
Me.aSetUserResponsibleQuestion.Tag = Nothing
|
||||
Me.aSetUserResponsibleQuestion.TargetObjectsCriteria = Nothing
|
||||
Me.aSetUserResponsibleQuestion.TargetObjectType = GetType(SISBusiness.[Module].Question)
|
||||
Me.aSetUserResponsibleQuestion.TargetViewId = Nothing
|
||||
Me.aSetUserResponsibleQuestion.ToolTip = Nothing
|
||||
Me.aSetUserResponsibleQuestion.TypeOfView = Nothing
|
||||
'
|
||||
'aOpenWorkSheet_Subcontractor_Question
|
||||
'
|
||||
Me.aOpenWorkSheet_Subcontractor_Question.AcceptButtonCaption = Nothing
|
||||
Me.aOpenWorkSheet_Subcontractor_Question.CancelButtonCaption = Nothing
|
||||
Me.aOpenWorkSheet_Subcontractor_Question.Caption = "aOpenWorkSheet_Subcontractor_Question"
|
||||
Me.aOpenWorkSheet_Subcontractor_Question.ConfirmationMessage = Nothing
|
||||
Me.aOpenWorkSheet_Subcontractor_Question.Id = "aOpenWorkSheet_Subcontractor_Question"
|
||||
Me.aOpenWorkSheet_Subcontractor_Question.ImageName = Nothing
|
||||
Me.aOpenWorkSheet_Subcontractor_Question.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aOpenWorkSheet_Subcontractor_Question.Shortcut = Nothing
|
||||
Me.aOpenWorkSheet_Subcontractor_Question.Tag = Nothing
|
||||
Me.aOpenWorkSheet_Subcontractor_Question.TargetObjectsCriteria = Nothing
|
||||
Me.aOpenWorkSheet_Subcontractor_Question.TargetObjectType = GetType(SISBusiness.[Module].Question)
|
||||
Me.aOpenWorkSheet_Subcontractor_Question.TargetViewId = "Question_ListView_Subcontractor"
|
||||
Me.aOpenWorkSheet_Subcontractor_Question.ToolTip = Nothing
|
||||
Me.aOpenWorkSheet_Subcontractor_Question.TypeOfView = Nothing
|
||||
'
|
||||
'aViewQuestionInfo_Subcontractor
|
||||
'
|
||||
Me.aViewQuestionInfo_Subcontractor.Caption = "aViewQuestionInfo_Subcontractor"
|
||||
Me.aViewQuestionInfo_Subcontractor.Category = "RecordEdit"
|
||||
Me.aViewQuestionInfo_Subcontractor.ConfirmationMessage = Nothing
|
||||
Me.aViewQuestionInfo_Subcontractor.Id = "aViewQuestionInfo_Subcontractor"
|
||||
Me.aViewQuestionInfo_Subcontractor.ImageName = "Action_Printing_Preview"
|
||||
Me.aViewQuestionInfo_Subcontractor.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
|
||||
Me.aViewQuestionInfo_Subcontractor.Shortcut = Nothing
|
||||
Me.aViewQuestionInfo_Subcontractor.Tag = Nothing
|
||||
Me.aViewQuestionInfo_Subcontractor.TargetObjectsCriteria = Nothing
|
||||
Me.aViewQuestionInfo_Subcontractor.TargetObjectType = GetType(SISBusiness.[Module].Question)
|
||||
Me.aViewQuestionInfo_Subcontractor.TargetViewId = "Question_ListView_Subcontractor"
|
||||
Me.aViewQuestionInfo_Subcontractor.ToolTip = Nothing
|
||||
Me.aViewQuestionInfo_Subcontractor.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Protected WithEvents aViewQuestionInfo As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Protected WithEvents aCloseQuestion As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Protected WithEvents aCreateAnswer As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Protected WithEvents aCreateReply As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Protected WithEvents aCreateQuestion As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Protected WithEvents aCreateWorkSheetfromQuestion As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aSetUserResponsibleQuestion As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Protected WithEvents aOpenWorkSheet_Subcontractor_Question As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Protected WithEvents aViewQuestionInfo_Subcontractor As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,150 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aCreateAnswer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 56</value>
|
||||
</metadata>
|
||||
<metadata name="aCreateReply.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 212</value>
|
||||
</metadata>
|
||||
<metadata name="aCreateQuestion.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 251</value>
|
||||
</metadata>
|
||||
<metadata name="aViewQuestionInfo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 329</value>
|
||||
</metadata>
|
||||
<metadata name="aCloseQuestion.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 134</value>
|
||||
</metadata>
|
||||
<metadata name="aCreateWorkSheetfromQuestion.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 290</value>
|
||||
</metadata>
|
||||
<metadata name="aSetUserResponsibleQuestion.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 173</value>
|
||||
</metadata>
|
||||
<metadata name="aOpenWorkSheet_Subcontractor_Question.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 95</value>
|
||||
</metadata>
|
||||
<metadata name="aViewQuestionInfo_Subcontractor.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>605, 275</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,876 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.ExpressApp.ConditionalAppearance
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports DevExpress.ExpressApp.CloneObject
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports DevExpress.Xpo
|
||||
Imports System.IO
|
||||
Imports DevExpress.ExpressApp.Reports
|
||||
Imports System.Net.Mail
|
||||
Imports System.Reflection
|
||||
|
||||
Public Class QuestionVC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Private _AppearanceController As AppearanceController
|
||||
Protected _selection As New ArrayList
|
||||
Protected _noselect As Boolean = False
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
Frame.GetController(Of QuestionVC).aViewQuestionInfo.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aCreateAnswer.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aCloseQuestion.Active.SetItemValue("", False)
|
||||
|
||||
Frame.GetController(Of QuestionVC).aCreateQuestion.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aCreateWorkSheetfromQuestion.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aSetUserResponsibleQuestion.Active.SetItemValue("", False)
|
||||
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _Question As Question
|
||||
|
||||
If View.Id = "Question_WorkSheet_Header_ListView" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id Like "Question_ListView" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aCreateWorkSheetfromQuestion.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of QuestionVC).aCreateAnswer.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of QuestionVC).aViewQuestionInfo.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of QuestionVC).aSetUserResponsibleQuestion.Active.SetItemValue("", True)
|
||||
_AppearanceController = Frame.GetController(Of AppearanceController)()
|
||||
|
||||
If _AppearanceController IsNot Nothing Then
|
||||
AddHandler _AppearanceController.CustomApplyAppearance, AddressOf _AppearanceController_CustomApplyAppearance
|
||||
AddHandler _AppearanceController.AppearanceApplied, AddressOf _AppearanceController_AppearanceApplied
|
||||
End If
|
||||
AddHandler View.SelectionChanged, AddressOf Question_ListView_SelectionChanged
|
||||
End If
|
||||
|
||||
If View.Id = "Question_ListView_User" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of SISBusiness.Module.AuditTrailVC).aGetAuditTrail.Active.SetItemValue("", False)
|
||||
TryCast(View, ListView).CollectionSource.Criteria("ByUser") = CriteriaOperator.Parse("User = ? OR AliasUser=?", _ocur.GetObject(SecuritySystem.CurrentUser), _ocur.GetObject(SecuritySystem.CurrentUser))
|
||||
Frame.GetController(Of QuestionVC).aViewQuestionInfo.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", False)
|
||||
_AppearanceController = Frame.GetController(Of AppearanceController)()
|
||||
If _AppearanceController IsNot Nothing Then
|
||||
AddHandler _AppearanceController.CustomApplyAppearance, AddressOf _AppearanceController_CustomApplyAppearance
|
||||
AddHandler _AppearanceController.AppearanceApplied, AddressOf _AppearanceController_AppearanceApplied
|
||||
End If
|
||||
End If
|
||||
|
||||
If View.Id = "Question_ListView_Customers" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aViewQuestionInfo.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aViewQuestionInfo.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of RefreshController).Active.SetItemValue("", False)
|
||||
Dim _Contacts As Contacts = _ocur.FindObject(Of Contacts)(CriteriaOperator.Parse("User = ?", _ocur.GetObject(SecuritySystem.CurrentUser)))
|
||||
If _Contacts IsNot Nothing Then
|
||||
If _Contacts.Customers IsNot Nothing Then
|
||||
TryCast(View, ListView).CollectionSource.Criteria("ByPartner") = CriteriaOperator.Parse("Customers = ?", _Contacts.Customers)
|
||||
Else
|
||||
TryCast(View, ListView).CollectionSource.Criteria("ByPartner") = CriteriaOperator.Parse("1=2")
|
||||
End If
|
||||
Else
|
||||
TryCast(View, ListView).CollectionSource.Criteria("ByPartner") = CriteriaOperator.Parse("1=2")
|
||||
End If
|
||||
_AppearanceController = Frame.GetController(Of AppearanceController)()
|
||||
|
||||
If _AppearanceController IsNot Nothing Then
|
||||
AddHandler _AppearanceController.CustomApplyAppearance, AddressOf _AppearanceController_CustomApplyAppearance
|
||||
AddHandler _AppearanceController.AppearanceApplied, AddressOf _AppearanceController_AppearanceApplied
|
||||
End If
|
||||
End If
|
||||
|
||||
If View.Id = "Question_WorkItem_ListView" Then
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "QuestionClosePopup_DetailView" Then
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", False)
|
||||
End If
|
||||
If View.Id = "Question_ListView_Subcontractor" Then
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aCreateWorkSheetfromQuestion.Active.SetItemValue("", True)
|
||||
|
||||
Dim _Criteria As String = ""
|
||||
|
||||
Dim _Contacts As Contacts = _ocur.FindObject(Of Contacts)(CriteriaOperator.Parse("User = ?", _ocur.GetObject(SecuritySystem.CurrentUser)))
|
||||
Dim _Contact_Collection As XPCollection(Of Contacts) = New XPCollection(Of Contacts)(_ocur.Session, CriteriaOperator.Parse("Customers=? And IsNull(User)=False", _Contacts.Customers))
|
||||
|
||||
|
||||
If _Contacts IsNot Nothing Then
|
||||
If _Contact_Collection.Count > 0 Then
|
||||
For ik = 0 To _Contact_Collection.Count - 1
|
||||
If ik < _Contact_Collection.Count - 1 Then
|
||||
_Criteria += "UserResponsible.Oid = " + "'" + _Contact_Collection(ik).User.Oid.ToString + "'" + " Or "
|
||||
Else
|
||||
_Criteria += "UserResponsible.Oid = " + "'" + _Contact_Collection(ik).User.Oid.ToString + "'"
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
_Criteria = "1=2"
|
||||
End If
|
||||
|
||||
If _Contacts.Customers IsNot Nothing Then
|
||||
TryCast(View, ListView).CollectionSource.Criteria("ByUserResponsible") = CriteriaOperator.Parse(_Criteria)
|
||||
Else
|
||||
TryCast(View, ListView).CollectionSource.Criteria("ByUserResponsible") = CriteriaOperator.Parse("1=2")
|
||||
End If
|
||||
Else
|
||||
TryCast(View, ListView).CollectionSource.Criteria("ByUserResponsible") = CriteriaOperator.Parse("1=2")
|
||||
End If
|
||||
End If
|
||||
'-------------- DetailViewZ---------------------------
|
||||
|
||||
If View.Id = "Question_DetailView" Or View.Id = "Question_DetailView_Info" Then
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", False)
|
||||
End If
|
||||
|
||||
If View.Id = "Question_DetailView" Then
|
||||
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aCreateQuestion.Active.SetItemValue("", True)
|
||||
If SecuritySystem.CurrentUserName <> "ivan.szabo" Then Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
|
||||
End If
|
||||
|
||||
If View.Id = "Question_DetailView_User" Then
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aCreateQuestion.Active.SetItemValue("", True)
|
||||
If SecuritySystem.CurrentUserName <> "ivan.szabo" Then Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
End If
|
||||
|
||||
If View.Id = "Question_DetailView_Info" Then
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aCreateQuestion.Active.SetItemValue("", False)
|
||||
If SecuritySystem.CurrentUserName <> "ivan.szabo" Then Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
|
||||
_Question = TryCast(View.SelectedObjects(0), Question)
|
||||
If _Question IsNot Nothing Then
|
||||
If _Question.QuestionClosed = eQuestionClosed.eClosed Then Frame.GetController(Of QuestionVC).aCloseQuestion.Active.SetItemValue("", False)
|
||||
Dim _User As User = _ocur.GetObject(SecuritySystem.CurrentUser)
|
||||
|
||||
If _Question.UserCreated.Oid <> _User.Oid Then
|
||||
If _Question.AliasUser IsNot Nothing Then
|
||||
If _Question.AliasUser.Email <> _User.Email Then
|
||||
Frame.GetController(Of QuestionVC).aCloseQuestion.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aCreateReply.Active.SetItemValue("", False)
|
||||
Else
|
||||
Frame.GetController(Of QuestionVC).aCreateReply.Active.SetItemValue("", True)
|
||||
If _Question.QuestionClosed <> eQuestionClosed.eClosed Then Frame.GetController(Of QuestionVC).aCloseQuestion.Active.SetItemValue("", True)
|
||||
End If
|
||||
Else
|
||||
Frame.GetController(Of QuestionVC).aCloseQuestion.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aCreateReply.Active.SetItemValue("", False)
|
||||
End If
|
||||
Else
|
||||
Frame.GetController(Of QuestionVC).aCreateReply.Active.SetItemValue("", True)
|
||||
If _Question.QuestionClosed <> eQuestionClosed.eClosed Then Frame.GetController(Of QuestionVC).aCloseQuestion.Active.SetItemValue("", True)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If View.Id = "WorkSheet_Header_DetailView" Then
|
||||
Frame.GetController(Of QuestionVC).aCreateWorkSheetfromQuestion.Active.SetItemValue("", False)
|
||||
End If
|
||||
|
||||
If View.Id = "Reply_DetailView" Then
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", False)
|
||||
If SecuritySystem.CurrentUserName <> "ivan.szabo" Then Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub aCloseQuestion_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aCloseQuestion.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _Events As Events
|
||||
Dim _Question As Question = TryCast(View.SelectedObjects(0), Question)
|
||||
Dim _QuestionClosePopup As QuestionClosePopup = _ocur.GetObject(TryCast(e.PopupWindow.View.SelectedObjects(0), QuestionClosePopup))
|
||||
|
||||
If _Question IsNot Nothing Then
|
||||
_Question.QuestionStatus = eQuestionStatus.eProcessedCustomerClosed
|
||||
_Question.QuestionClosed = eQuestionClosed.eClosed
|
||||
_Question.Save()
|
||||
|
||||
_Events = _ocur.CreateObject(Of Events)()
|
||||
_Events.Question = _Question
|
||||
_Events.QuestionStatus = eQuestionStatus.eProcessedCustomerClosed
|
||||
_Events.Description = _QuestionClosePopup.Description
|
||||
_Events.Save()
|
||||
_Events.EventDirection = eEventDirection.eIn
|
||||
|
||||
_ocur.CommitChanges()
|
||||
|
||||
Try
|
||||
Dim _WebParameters As WebParameters = _ocur.FindObject(Of WebParameters)(CriteriaOperator.Parse("1=1"))
|
||||
If _WebParameters Is Nothing Then Throw New Exception("*Nincsnek e-mail paraméterek beállítva!")
|
||||
If _WebParameters.SMTPHost Is Nothing Then Throw New Exception("*Nincs SMTP server beállítva!")
|
||||
If _WebParameters.SMTPUserName = "" Then Throw New Exception("*Nincs felhasználói név beállítva!")
|
||||
If _WebParameters.SMTPPort = 0 Then Throw New Exception("*Nincs SMTP port beállítva!")
|
||||
|
||||
|
||||
|
||||
Dim _MailMessage As New MailMessage
|
||||
Dim _SmtpClient As SmtpClient = New SmtpClient(_WebParameters.SMTPHost)
|
||||
_MailMessage.From = New MailAddress(_WebParameters.Email_SupportAdmin)
|
||||
_MailMessage.To.Add(_Question.UserCreated.Email)
|
||||
_MailMessage.Subject = _Question.DocumentNumber + " számú bejelentés"
|
||||
_MailMessage.IsBodyHtml = True
|
||||
|
||||
Dim _EmailBody As String = _WebParameters.HTMLMailTemplate_QuestionStatusUpdate.HTMLBody
|
||||
_EmailBody = String.Format(_EmailBody, _Question.UserCreated.FullName, _Question.DocumentNumber, DevExpress.ExpressApp.Utils.CaptionHelper.GetLocalizedText("Enums\SISBusiness.Module.eQuestionStatus", _Question.QuestionStatus.ToString) + _
|
||||
vbNewLine, TryCast(SecuritySystem.CurrentUser, User).FullName)
|
||||
|
||||
_EmailBody = _EmailBody + vbNewLine + _Question.HTMLEvents
|
||||
_MailMessage.Body = _EmailBody
|
||||
|
||||
|
||||
_SmtpClient.Port = _WebParameters.SMTPPort
|
||||
_SmtpClient.Credentials = New System.Net.NetworkCredential(_WebParameters.SMTPUserName, _WebParameters.SMTPPassword)
|
||||
_SmtpClient.EnableSsl = _WebParameters.EnableSsl
|
||||
|
||||
_SmtpClient.Send(_MailMessage)
|
||||
|
||||
Catch ex As Exception
|
||||
Dim sf As StackFrame = New StackFrame()
|
||||
Dim _ErrorLog As ErrorLog = _ocur.CreateObject(Of ErrorLog)()
|
||||
_ErrorLog.Description = ex.Message
|
||||
_ErrorLog.SubName = TryCast(sf.GetMethod(), MethodBase).Name
|
||||
_ocur.CommitChanges()
|
||||
End Try
|
||||
|
||||
Dim nestedFrame As NestedFrame = TryCast(Frame, NestedFrame)
|
||||
If nestedFrame IsNot Nothing Then
|
||||
Dim parentView As View = nestedFrame.View
|
||||
parentView.ObjectSpace.Refresh()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
'Protected Sub aCreateWorkSheetfromQuestion_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCreateWorkSheetfromQuestionqqq.Execute
|
||||
' Try
|
||||
' Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
|
||||
' Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
|
||||
' Dim _Question As Question = TryCast(View.SelectedObjects(0), Question)
|
||||
|
||||
' If _Question Is Nothing Then Throw New Exception("*Nincs kiválasztott elem!")
|
||||
|
||||
' Dim _WorkSheet_Header As WorkSheet_Header = _onew.CreateObject(Of WorkSheet_Header)()
|
||||
' _WorkSheet_Header.Question = _onew.GetObject(_Question)
|
||||
' _WorkSheet_Header.WorkSheetState = eWorkSheetState.eOpened
|
||||
|
||||
' e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "WorkSheet_Header_DetailView", True, _WorkSheet_Header)
|
||||
' Catch exp As Exception
|
||||
' MsgBox(exp.Message)
|
||||
' End Try
|
||||
'End Sub
|
||||
|
||||
Protected Sub aCreateWorkSheetfromQuestion_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aCreateWorkSheetfromQuestion.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _WorkSheetfromQuestion_PopUp As WorkSheetfromQuestion_PopUp = _onew.CreateObject(Of WorkSheetfromQuestion_PopUp)()
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "WorkSheetfromQuestion_PopUp_DetailView", False, _WorkSheetfromQuestion_PopUp)
|
||||
End Sub
|
||||
Protected Sub aCreateWorkSheetfromQuestion_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aCreateWorkSheetfromQuestion.Execute
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
|
||||
Dim _Question As Question = TryCast(View.SelectedObjects(0), Question)
|
||||
Dim _WorkSheet_Header As WorkSheet_Header = _onew.CreateObject(Of WorkSheet_Header)()
|
||||
Dim _WorkSheetfromQuestion_PopUp As WorkSheetfromQuestion_PopUp = _onew.GetObject(TryCast(e.PopupWindow.View.SelectedObjects(0), WorkSheetfromQuestion_PopUp))
|
||||
|
||||
_WorkSheet_Header.Question = _onew.GetObject(_Question)
|
||||
_WorkSheet_Header.Customers = _onew.GetObjectByKey(Of Customers)(_Question.Customers.Oid)
|
||||
|
||||
_WorkSheet_Header.WorkSheetState = eWorkSheetState.eOpened
|
||||
_WorkSheet_Header.CustomersFrom = _onew.GetObject(_WorkSheetfromQuestion_PopUp.CustomersFrom)
|
||||
_WorkSheet_Header.WorkSheetType = _onew.GetObject(_WorkSheetfromQuestion_PopUp.WorkSheetType)
|
||||
_WorkSheet_Header.DateCreated = GetSQLTime(_onew.Session)
|
||||
|
||||
Dim _ShowViewParameters As New ShowViewParameters
|
||||
Dim _ShowViewSource As New ShowViewSource(Frame, Nothing)
|
||||
|
||||
_ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "WorkSheet_Header_DetailView", True, _WorkSheet_Header)
|
||||
_ShowViewParameters.NewWindowTarget = NewWindowTarget.MdiChild
|
||||
_ShowViewParameters.TargetWindow = TargetWindow.NewWindow
|
||||
Application.ShowViewStrategy.ShowView(_ShowViewParameters, _ShowViewSource)
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
Frame.GetController(Of QuestionVC).aViewQuestionInfo.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aCreateAnswer.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aCloseQuestion.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aCreateQuestion.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aCreateWorkSheetfromQuestion.Active.SetItemValue("", False)
|
||||
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _Question As Question
|
||||
|
||||
If View.Id Like "Question_ListView" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of QuestionVC).aCreateWorkSheetfromQuestion.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aCreateAnswer.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aViewQuestionInfo.Active.SetItemValue("", False)
|
||||
_AppearanceController = Frame.GetController(Of AppearanceController)()
|
||||
|
||||
If _AppearanceController IsNot Nothing Then
|
||||
AddHandler _AppearanceController.CustomApplyAppearance, AddressOf _AppearanceController_CustomApplyAppearance
|
||||
AddHandler _AppearanceController.AppearanceApplied, AddressOf _AppearanceController_AppearanceApplied
|
||||
End If
|
||||
End If
|
||||
|
||||
If View.Id = "Question_ListView_User" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of SISBusiness.Module.AuditTrailVC).aGetAuditTrail.Active.SetItemValue("", True)
|
||||
TryCast(View, ListView).CollectionSource.Criteria("ByUser") = CriteriaOperator.Parse("User = ?", _ocur.GetObject(SecuritySystem.CurrentUser))
|
||||
Frame.GetController(Of QuestionVC).aViewQuestionInfo.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", True)
|
||||
_AppearanceController = Frame.GetController(Of AppearanceController)()
|
||||
If _AppearanceController IsNot Nothing Then
|
||||
AddHandler _AppearanceController.CustomApplyAppearance, AddressOf _AppearanceController_CustomApplyAppearance
|
||||
AddHandler _AppearanceController.AppearanceApplied, AddressOf _AppearanceController_AppearanceApplied
|
||||
End If
|
||||
End If
|
||||
|
||||
If View.Id = "Question_ListView_Customers" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of QuestionVC).aViewQuestionInfo.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of QuestionVC).aViewQuestionInfo.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of RefreshController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", True)
|
||||
Dim _User As Contacts = _ocur.FindObject(Of Contacts)(CriteriaOperator.Parse("User = ?", _ocur.GetObject(SecuritySystem.CurrentUser)))
|
||||
If _User IsNot Nothing Then
|
||||
If _User.Customers IsNot Nothing Then
|
||||
TryCast(View, ListView).CollectionSource.Criteria("ByPartner") = CriteriaOperator.Parse("Customers = ?", _User.Customers)
|
||||
Else
|
||||
TryCast(View, ListView).CollectionSource.Criteria("ByPartner") = CriteriaOperator.Parse("1=2")
|
||||
End If
|
||||
Else
|
||||
TryCast(View, ListView).CollectionSource.Criteria("ByPartner") = CriteriaOperator.Parse("1=2")
|
||||
End If
|
||||
_AppearanceController = Frame.GetController(Of AppearanceController)()
|
||||
|
||||
If _AppearanceController IsNot Nothing Then
|
||||
AddHandler _AppearanceController.CustomApplyAppearance, AddressOf _AppearanceController_CustomApplyAppearance
|
||||
AddHandler _AppearanceController.AppearanceApplied, AddressOf _AppearanceController_AppearanceApplied
|
||||
End If
|
||||
End If
|
||||
|
||||
If View.Id = "Question_WorkItem_ListView" Then
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of LinkUnlinkController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "QuestionClosePopup_DetailView" Then
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
If View.Id = "Question_ListView_Subcontractor" Then
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ListViewProcessCurrentObjectController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of QuestionVC).aCreateWorkSheetfromQuestion.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aCreateAnswer.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aViewQuestionInfo.Active.SetItemValue("", False)
|
||||
End If
|
||||
'-------------- DetailViewZ---------------------------
|
||||
|
||||
If View.Id = "Question_DetailView" Or View.Id = "Question_DetailView_Info" Then
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
|
||||
If View.Id = "Question_DetailView" Then
|
||||
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of QuestionVC).aCreateQuestion.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
|
||||
End If
|
||||
|
||||
If View.Id = "Question_DetailView_User" Then
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of QuestionVC).aCreateQuestion.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
|
||||
If View.Id = "Question_DetailView_Info" Then
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAndCloseAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of ModificationsController).SaveAndNewAction.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of QuestionVC).aCreateQuestion.Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
|
||||
_Question = TryCast(View.SelectedObjects(0), Question)
|
||||
If _Question IsNot Nothing Then
|
||||
If _Question.QuestionClosed = eQuestionClosed.eClosed Then Frame.GetController(Of QuestionVC).aCloseQuestion.Active.SetItemValue("", False)
|
||||
Dim _User As User = _ocur.GetObject(SecuritySystem.CurrentUser)
|
||||
If _User IsNot Nothing Then
|
||||
If _Question.UserCreated.Email <> _User.Email Then
|
||||
Frame.GetController(Of QuestionVC).aCloseQuestion.Active.SetItemValue("", False)
|
||||
Frame.GetController(Of QuestionVC).aCreateReply.Active.SetItemValue("", False)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If View.Id = "WorkSheet_Header_DetailView" Then
|
||||
Frame.GetController(Of QuestionVC).aCreateWorkSheetfromQuestion.Active.SetItemValue("", False)
|
||||
End If
|
||||
|
||||
If View.Id = "Reply_DetailView" Then
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", True)
|
||||
End Sub
|
||||
|
||||
Protected Overridable Sub CustomizeDisabledEditorsAppearance(ByVal e As ApplyAppearanceEventArgs)
|
||||
End Sub
|
||||
Private Sub _AppearanceController_AppearanceApplied(ByVal sender As Object, ByVal e As ApplyAppearanceEventArgs)
|
||||
If e.AppearanceObject.Enabled = False Then
|
||||
CustomizeDisabledEditorsAppearance(e)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub _AppearanceController_CustomApplyAppearance(ByVal sender As Object, ByVal e As ApplyAppearanceEventArgs)
|
||||
'If (TypeOf View Is ListView) AndAlso (e.ItemType = AppearanceItemType.ViewItem.ToString()) AndAlso (e.ItemName = "Category") AndAlso (e.ContextObjects.Length > 0) Then
|
||||
' If View.SelectedObjects.Contains(e.ContextObjects(0)) Then
|
||||
' CType(e.Item, IAppearanceFormat).FontColor = System.Drawing.Color.Black
|
||||
' e.Handled = True
|
||||
' End If
|
||||
'End If
|
||||
'Dim _Question As Question = TryCast(e.ContextObjects(0), Question)
|
||||
'If (TypeOf View Is ListView) Then
|
||||
' If _Question IsNot Nothing Then
|
||||
' If _Question.QuestionStatus = eQuestionStatus.eActive Then
|
||||
' CType(e.Item, IAppearanceFormat).FontStyle = Drawing.FontStyle.Bold
|
||||
' e.Handled = True
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Private Sub Question_ListView_SelectionChanged(sender As Object, e As EventArgs)
|
||||
Dim _Question As Question
|
||||
If _noselect Then Exit Sub
|
||||
|
||||
If View Is Nothing Then Exit Sub
|
||||
If View.SelectedObjects.Count > 0 Then
|
||||
_selection.Clear()
|
||||
For Each _Question In View.SelectedObjects
|
||||
_selection.Add(_Question)
|
||||
Next
|
||||
End If
|
||||
|
||||
End Sub
|
||||
'---Action codeZ---
|
||||
Protected Sub aCreateAnswer_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCreateAnswer.Execute
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _Question As Question = View.SelectedObjects(0)
|
||||
Dim _Answer = _onew.CreateObject(Of Answer)()
|
||||
If _Question IsNot Nothing Then
|
||||
_Answer.Question = _onew.GetObject(_Question)
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "Answer_DetailView", True, _Answer)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub aCreateReply_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCreateReply.Execute
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _Question As Question = View.SelectedObjects(0)
|
||||
Dim _Reply As Reply
|
||||
|
||||
If _Question IsNot Nothing Then
|
||||
_Reply = _onew.CreateObject(Of Reply)()
|
||||
_Reply.Question = _onew.GetObject(_Question)
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "Reply_DetailView", True, _Reply)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub aCreateQuestion_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCreateQuestion.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _Question As Question = TryCast(View.SelectedObjects(0), Question)
|
||||
Dim _Events As Events
|
||||
If _Question IsNot Nothing Then
|
||||
If _Question.AliasUser IsNot Nothing Then
|
||||
Dim _Contacts As Contacts
|
||||
If _Question.AliasUser IsNot Nothing Then
|
||||
_Contacts = _ocur.FindObject(Of Contacts)(CriteriaOperator.Parse("User.Oid=?", _Question.AliasUser.Oid))
|
||||
Else
|
||||
_Contacts = _ocur.FindObject(Of Contacts)(CriteriaOperator.Parse("User.Oid=?", _Question.User.Oid))
|
||||
End If
|
||||
If _Contacts IsNot Nothing Then
|
||||
_Question.Customers = _Contacts.Customers
|
||||
_Question.User = _Question.AliasUser
|
||||
End If
|
||||
End If
|
||||
Replace(Replace(_Question.Description, "file:///P:/", "http://sis-r.hu/user/images/userimages/"), "\", "/")
|
||||
_ocur.CommitChanges()
|
||||
|
||||
_Events = _onew.CreateObject(Of Events)()
|
||||
_Events.Question = _onew.GetObject(_Question)
|
||||
_Events.Description = _Question.Description
|
||||
If _Question.Attachment IsNot Nothing Then _Events.Attachment = _onew.GetObject(_Question.Attachment)
|
||||
_Events.Save()
|
||||
_Events.EventDirection = eEventDirection.eIn
|
||||
_onew.CommitChanges()
|
||||
|
||||
Try
|
||||
Dim _WebParameters As WebParameters = _ocur.FindObject(Of WebParameters)(CriteriaOperator.Parse("1=1"))
|
||||
If _WebParameters Is Nothing Then Throw New Exception("*Nincsnek e-mail paraméterek beállítva!")
|
||||
If _WebParameters.SMTPHost Is Nothing Then Throw New Exception("*Nincs SMTP server beállítva!")
|
||||
If _WebParameters.SMTPUserName = "" Then Throw New Exception("*Nincs felhasználói név beállítva!")
|
||||
If _WebParameters.SMTPPort = 0 Then Throw New Exception("*Nincs SMTP port beállítva!")
|
||||
|
||||
|
||||
Dim _MailMessage As New MailMessage
|
||||
Dim _SmtpClient As SmtpClient = New SmtpClient(_WebParameters.SMTPHost)
|
||||
_MailMessage.From = New MailAddress(_WebParameters.Email_SupportAdmin)
|
||||
_MailMessage.To.Add(_Question.User.Email)
|
||||
_MailMessage.Subject = _Question.DocumentNumber + " számú bejelentés"
|
||||
_MailMessage.IsBodyHtml = True
|
||||
|
||||
Dim _EmailBody As String = _WebParameters.HTMLMailTemplate_QuestionUpdate.HTMLBody
|
||||
_EmailBody = String.Format(_EmailBody, _Question.UserCreated.FullName, _Question.ObjectCreated.ToString(), _Question.Description, TryCast(SecuritySystem.CurrentUser, User).FullName)
|
||||
|
||||
_MailMessage.Body = _EmailBody
|
||||
|
||||
_SmtpClient.Port = _WebParameters.SMTPPort
|
||||
_SmtpClient.Credentials = New System.Net.NetworkCredential(_WebParameters.SMTPUserName, _WebParameters.SMTPPassword)
|
||||
_SmtpClient.EnableSsl = _WebParameters.EnableSsl
|
||||
|
||||
_SmtpClient.Send(_MailMessage)
|
||||
|
||||
_MailMessage.To.Clear()
|
||||
_MailMessage.To.Add(_WebParameters.Email_SupportAdmin)
|
||||
_MailMessage.Subject = "Új kérdés"
|
||||
_MailMessage.Body = String.Format("{0} felhasználó új kérdést rögzített {1} számmal.", _Question.User.FullName, _Question.DocumentNumber)
|
||||
|
||||
_SmtpClient.Send(_MailMessage)
|
||||
Catch ex As Exception
|
||||
Dim sf As StackFrame = New StackFrame()
|
||||
Dim _ErrorLog As ErrorLog = _ocur.CreateObject(Of ErrorLog)()
|
||||
_ErrorLog.Description = ex.Message
|
||||
_ErrorLog.SubName = TryCast(sf.GetMethod(), MethodBase).Name
|
||||
_ocur.CommitChanges()
|
||||
End Try
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "Question_DetailView_Info", True, _onew.GetObject(_Question))
|
||||
View.Close()
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub aViewQuestionInfo_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aViewQuestionInfo.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _Question As Question = TryCast(View.SelectedObjects(0), Question)
|
||||
Dim _Events As Events
|
||||
Dim _Contacts As Contacts = _ocur.FindObject(Of Contacts)(CriteriaOperator.Parse("User = ?", _ocur.GetObject(SecuritySystem.CurrentUser)))
|
||||
|
||||
If _Question IsNot Nothing Then
|
||||
|
||||
If _Question.QuestionStatus = eQuestionStatus.eActive Then
|
||||
If _Contacts IsNot Nothing Then
|
||||
If _Contacts.Customers IsNot Nothing Then
|
||||
If SecuritySystemHelper.IsUserInRoleCurrentUser("Supporter") Then
|
||||
|
||||
_Question.QuestionStatus = eQuestionStatus.eReviewed
|
||||
|
||||
_Events = _ocur.CreateObject(Of Events)()
|
||||
_Events.Question = _Question
|
||||
_Events.QuestionStatus = eQuestionStatus.eReviewed
|
||||
_Events.Description = ""
|
||||
_Events.EventDirection = eEventDirection.eOut
|
||||
|
||||
_ocur.CommitChanges()
|
||||
|
||||
Try
|
||||
Dim _WebParameters As WebParameters = _ocur.FindObject(Of WebParameters)(CriteriaOperator.Parse("1=1"))
|
||||
If _WebParameters Is Nothing Then Throw New Exception("*Nincsnek e-mail paraméterek beállítva!")
|
||||
If _WebParameters.SMTPHost Is Nothing Then Throw New Exception("*Nincs SMTP server beállítva!")
|
||||
If _WebParameters.SMTPUserName = "" Then Throw New Exception("*Nincs felhasználói név beállítva!")
|
||||
If _WebParameters.SMTPPort = 0 Then Throw New Exception("*Nincs SMTP port beállítva!")
|
||||
|
||||
|
||||
Dim _MailMessage As New MailMessage
|
||||
Dim _Attachment As Attachment
|
||||
Dim _SmtpClient As SmtpClient = New SmtpClient(_WebParameters.SMTPHost)
|
||||
_MailMessage.From = New MailAddress(_WebParameters.Email_SupportAdmin)
|
||||
_MailMessage.To.Add(_Question.UserCreated.Email)
|
||||
_MailMessage.Subject = _Question.DocumentNumber + " számú bejelentés"
|
||||
_MailMessage.IsBodyHtml = True
|
||||
|
||||
Dim _EmailBody As String = _WebParameters.HTMLMailTemplate_QuestionStatusUpdate.HTMLBody
|
||||
_EmailBody = String.Format(_EmailBody, _Question.UserCreated.FullName, _Question.DocumentNumber, DevExpress.ExpressApp.Utils.CaptionHelper.GetLocalizedText("Enums\SISBusiness.Module.eQuestionStatus", _Question.QuestionStatus.ToString) + _
|
||||
vbNewLine, TryCast(SecuritySystem.CurrentUser, User).FullName)
|
||||
_EmailBody = _EmailBody + vbNewLine + CreateHTMLEventsMail(_Question, _ocur.Session)
|
||||
|
||||
_MailMessage.Body = _EmailBody
|
||||
_MailMessage.Attachments.Clear()
|
||||
|
||||
_Attachment = New Attachment(GLOBAL_ApplicationStartupPath_Mail & "Images\iRedArrow.png")
|
||||
_Attachment.ContentId = "c001"
|
||||
_MailMessage.Attachments.Add(_Attachment)
|
||||
|
||||
_Attachment = New Attachment(GLOBAL_ApplicationStartupPath_Mail & "Images\iGreenArrow.png")
|
||||
_Attachment.ContentId = "c002"
|
||||
_MailMessage.Attachments.Add(_Attachment)
|
||||
|
||||
|
||||
_SmtpClient.Port = _WebParameters.SMTPPort
|
||||
_SmtpClient.Credentials = New System.Net.NetworkCredential(_WebParameters.SMTPUserName, _WebParameters.SMTPPassword)
|
||||
_SmtpClient.EnableSsl = _WebParameters.EnableSsl
|
||||
|
||||
_SmtpClient.Send(_MailMessage)
|
||||
Catch ex As Exception
|
||||
Dim sf As StackFrame = New StackFrame()
|
||||
Dim _ErrorLog As ErrorLog = _ocur.CreateObject(Of ErrorLog)()
|
||||
_ErrorLog.Description = ex.Message
|
||||
_ErrorLog.SubName = TryCast(sf.GetMethod(), MethodBase).Name
|
||||
_ocur.CommitChanges()
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "Question_DetailView_Info", True, _onew.GetObject(_Question))
|
||||
End Sub
|
||||
Protected Sub aCloseQuestion_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aCloseQuestion.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _QuestionClosePopup As QuestionClosePopup = _onew.CreateObject(Of QuestionClosePopup)()
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "QuestionClosePopup_DetailView", False, _QuestionClosePopup)
|
||||
End Sub
|
||||
Private Sub aSetUserResponsibleQuestion_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aSetUserResponsibleQuestion.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _CollectionSource As New CollectionSource(_onew, GetType(User))
|
||||
|
||||
_CollectionSource.BeginUpdateCriteria()
|
||||
_CollectionSource.Criteria.Clear()
|
||||
_CollectionSource.Criteria("1") = CriteriaOperator.Parse("1=2")
|
||||
_CollectionSource.EndUpdateCriteria()
|
||||
|
||||
Dim _UserResponsibles_Collection As XPCollection(Of User) = New XPCollection(Of User)(_onew.Session, CriteriaOperator.Parse("1=1"))
|
||||
Dim _UserResponsibles_Back_Collection As New XPCollection(Of User)(_onew.Session, CriteriaOperator.Parse("1=2"))
|
||||
Dim _Need As Boolean = False
|
||||
For Each _ActUser As User In _UserResponsibles_Collection
|
||||
_Need = False
|
||||
If SecuritySystemHelper.IsUserInRole("Supporter", _ActUser) Then
|
||||
_Need = True
|
||||
Else
|
||||
Dim _Contacts As Contacts = _onew.FindObject(Of Contacts)(CriteriaOperator.Parse("User.Oid=?", _ActUser.Oid))
|
||||
If _Contacts IsNot Nothing Then
|
||||
Dim _Customers As Customers = _Contacts.Customers
|
||||
|
||||
Dim _Subcontractor As Subcontractor = _onew.FindObject(Of Subcontractor)(CriteriaOperator.Parse("Customers=?", _Customers))
|
||||
If _Subcontractor IsNot Nothing Then
|
||||
_Need = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
_UserResponsibles_Back_Collection.Add(_ActUser)
|
||||
Next
|
||||
|
||||
For Each _User As User In _UserResponsibles_Back_Collection
|
||||
_CollectionSource.Add(_User)
|
||||
Next
|
||||
|
||||
_noselect = True
|
||||
e.View = Application.CreateListView("User_ListView_Find", _CollectionSource, True)
|
||||
End Sub
|
||||
Private Sub aSetUserResponsibleQuestion_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aSetUserResponsibleQuestion.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _UserResponsible = _ocur.GetObject(TryCast(e.PopupWindow.View.SelectedObjects(0), User))
|
||||
Dim _Question_Selection As Question
|
||||
Dim _Question As Question
|
||||
Dim _Events As Events
|
||||
For Each _Question_Selection In _selection
|
||||
_Question = _ocur.GetObject(_Question_Selection)
|
||||
If _Question.UserResponsible Is Nothing Then
|
||||
_Events = _ocur.CreateObject(Of Events)()
|
||||
_Events.QuestionStatus = eQuestionStatus.eInProgress
|
||||
_Events.Question = _ocur.GetObject(_Question)
|
||||
_Events.Description = ""
|
||||
_Events.EventDirection = eEventDirection.eOut
|
||||
End If
|
||||
_Question.QuestionStatus = eQuestionStatus.eInProgress
|
||||
_Question.UserResponsible = _UserResponsible
|
||||
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
'View.Refresh()
|
||||
|
||||
_noselect = False
|
||||
End Sub
|
||||
Protected Sub aOpenWorkSheet_Subcontractor_Question_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aOpenWorkSheet_Subcontractor_Question.CustomizePopupWindowParams
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _Question As Question = _onew.GetObject(TryCast(View.SelectedObjects(0), Question))
|
||||
|
||||
Dim _User As User
|
||||
If _ocur IsNot Nothing Then
|
||||
_User = _ocur.GetObjectByKey(Of User)(_ocur.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
End If
|
||||
Dim _Contacts As Contacts = _ocur.FindObject(Of Contacts)(CriteriaOperator.Parse("User=?", _User))
|
||||
Dim _SubcontractorCustomers As Customers = _Contacts.Customers
|
||||
Dim _OpenWorkSheet_SubcontractorPopUp As OpenWorkSheet_SubcontractorPopUp = _onew.CreateObject(Of OpenWorkSheet_SubcontractorPopUp)()
|
||||
_OpenWorkSheet_SubcontractorPopUp.Question = _Question
|
||||
Dim _Subcontractor As Subcontractor = _onew.FindObject(Of Subcontractor)(CriteriaOperator.Parse("Customers.Oid=?", _SubcontractorCustomers.Oid))
|
||||
|
||||
_OpenWorkSheet_SubcontractorPopUp.Subcontractor = _onew.GetObject(_Subcontractor)
|
||||
|
||||
e.View = Application.CreateDetailView(_onew, "OpenWorkSheet_SubcontractorPopUp_DetailView", False, _OpenWorkSheet_SubcontractorPopUp)
|
||||
End Sub
|
||||
Protected Sub aOpenWorkSheet_Subcontractor_Question_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aOpenWorkSheet_Subcontractor_Question.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _OpenWorkSheet_SubcontractorPopUp As OpenWorkSheet_SubcontractorPopUp = _ocur.GetObject(TryCast(e.PopupWindow.View.SelectedObjects(0), OpenWorkSheet_SubcontractorPopUp))
|
||||
Dim _Subcontractor As Subcontractor = _ocur.GetObjectByKey(Of Subcontractor)(_OpenWorkSheet_SubcontractorPopUp.Subcontractor.Oid)
|
||||
Dim _User As User
|
||||
If _ocur IsNot Nothing Then
|
||||
_User = _ocur.GetObjectByKey(Of User)(_ocur.GetKeyValue(SecuritySystem.CurrentUser))
|
||||
End If
|
||||
Dim _Contacts As Contacts = _ocur.FindObject(Of Contacts)(CriteriaOperator.Parse("User=?", _User))
|
||||
Dim _SubcontractorCustomers As Customers = _Contacts.Customers
|
||||
Dim _ReportData As ReportData
|
||||
Dim _Question As Question = TryCast(View.SelectedObjects(0), Question)
|
||||
|
||||
Dim _WorkSheet_Header As WorkSheet_Header = _ocur.CreateObject(Of WorkSheet_Header)()
|
||||
_WorkSheet_Header.Customers = _Question.Customers
|
||||
_WorkSheet_Header.Question = _Question
|
||||
_WorkSheet_Header.CustomersFrom = _ocur.GetObjectByKey(Of CustomersFrom)(_OpenWorkSheet_SubcontractorPopUp.CustomersFrom.Oid)
|
||||
_WorkSheet_Header.WorkSheetType = _ocur.GetObjectByKey(Of WorkSheetType)(_OpenWorkSheet_SubcontractorPopUp.WorkSheetType.Oid)
|
||||
_WorkSheet_Header.DateExecution = _OpenWorkSheet_SubcontractorPopUp.DateCreated
|
||||
_WorkSheet_Header.DateCreated = GetSQLTime(_ocur.Session)
|
||||
_WorkSheet_Header.IsSubcontractor = True
|
||||
_WorkSheet_Header.SubcontractorCustomers = _SubcontractorCustomers
|
||||
_WorkSheet_Header.Description = _OpenWorkSheet_SubcontractorPopUp.Description
|
||||
_WorkSheet_Header.WorkPlace = _ocur.GetObjectByKey(Of WorkPlace)(_OpenWorkSheet_SubcontractorPopUp.WorkPlace.Oid)
|
||||
_WorkSheet_Header.WorkSheetState = eWorkSheetState.eOpened
|
||||
_WorkSheet_Header.CurrencyName = _ocur.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName='HUF'"))
|
||||
_WorkSheet_Header.WorkHour = _OpenWorkSheet_SubcontractorPopUp.WorkHour
|
||||
_WorkSheet_Header.WorkDescription = _OpenWorkSheet_SubcontractorPopUp.WorkDescription
|
||||
_WorkSheet_Header.WorkUsedMaterialDescription = _OpenWorkSheet_SubcontractorPopUp.WorkUsedMaterialDescription
|
||||
_WorkSheet_Header.WorkDescriptionOther = _OpenWorkSheet_SubcontractorPopUp.WorkDescriptionOther
|
||||
_WorkSheet_Header.WorkTravelKm = _OpenWorkSheet_SubcontractorPopUp.WorkTravelKm
|
||||
|
||||
|
||||
_ocur.CommitChanges()
|
||||
_ReportData = _ocur.FindObject(Of ReportData)(CriteriaOperator.Parse("Oid=?", _WorkSheet_Header.WorkSheetType.ReportData.Oid), True)
|
||||
If _ReportData IsNot Nothing Then
|
||||
Dim _XafReport As XafReport = _ReportData.LoadReport(_ocur)
|
||||
|
||||
Dim _Param_Colletion As DevExpress.XtraReports.Parameters.ParameterCollection = _XafReport.Parameters
|
||||
|
||||
For Each _Param As DevExpress.XtraReports.Parameters.Parameter In _Param_Colletion
|
||||
If _Param.Name = "Workplace" Then
|
||||
Dim _SubcontractorCustomers_WorkPLace As SubcontractorCustomers = _ocur.FindObject(Of SubcontractorCustomers) _
|
||||
(CriteriaOperator.Parse("Subcontractor=? AND Customers=?", _Subcontractor, _WorkSheet_Header.Customers))
|
||||
If _SubcontractorCustomers_WorkPLace.Workplace Is Nothing Then
|
||||
_Param.Value = "Nincs megadva!"
|
||||
Else
|
||||
_Param.Value = _SubcontractorCustomers_WorkPLace.Workplace.ShortName
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim _FilterString As String = "[Oid]='" & _WorkSheet_Header.Oid.ToString & "'"
|
||||
_XafReport.FilterString = _FilterString
|
||||
Dim _FileName As String = Path.GetTempPath & _WorkSheet_Header.DocumentNumber & "_Munkalap.pdf"
|
||||
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
|
||||
|
||||
_XafReport.ExportToPdf(_StreamFile)
|
||||
_StreamFile.Close()
|
||||
|
||||
Dim _StreamFile2 As New FileStream(_FileName, FileMode.Open)
|
||||
|
||||
_WorkSheet_Header.WorkSheetFile_Original = New FileData(_ocur.Session)
|
||||
_WorkSheet_Header.WorkSheetFile_Original.LoadFromStream(_WorkSheet_Header.DocumentNumber + "_Munkalap.pdf", _StreamFile2)
|
||||
_StreamFile2.Close()
|
||||
Process.Start(_FileName)
|
||||
End If
|
||||
_ocur.CommitChanges()
|
||||
|
||||
'Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("Oid=?", _WorkSheet_Header.Oid), True)
|
||||
|
||||
View.Close()
|
||||
End Sub
|
||||
|
||||
Protected Sub aViewQuestionInfo_Subcontractor_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aViewQuestionInfo_Subcontractor.Execute
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _Question As Question = TryCast(View.SelectedObjects(0), Question)
|
||||
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "Question_DetailView_Info", True, _onew.GetObject(_Question))
|
||||
End Sub
|
||||
End Class
|
||||
@@ -0,0 +1,93 @@
|
||||
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 DevExpress.ExpressApp.ConditionalAppearance
|
||||
|
||||
<DefaultClassOptions()> _
|
||||
<NavigationItem(False)> _
|
||||
<CreatableItem(False)> _
|
||||
<Appearance("Reply - Disable ObjectCreated OrderOutHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
|
||||
<Appearance("Reply - Disable UserCreated OrderOutHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)> _
|
||||
<Appearance("Reply - Disable Question when is not empty", TargetItems:="Question", Criteria:="IsNull(Question) = False", Enabled:=False, Context:="DetailView")> _
|
||||
Public Class Reply
|
||||
Inherits BaseObject
|
||||
Private _Question As Question
|
||||
Private _UserCreated As User
|
||||
Private _ObjectCreated As Date
|
||||
Private _Description As String
|
||||
Private _Attachment As FileData
|
||||
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
|
||||
Property Question As Question
|
||||
Get
|
||||
Return _Question
|
||||
End Get
|
||||
Set(value As Question)
|
||||
SetPropertyValue("Question", _Question, 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
|
||||
<NonCloneable> _
|
||||
Property ObjectCreated As Date
|
||||
Get
|
||||
Return _ObjectCreated
|
||||
End Get
|
||||
Set(value As Date)
|
||||
SetPropertyValue("ObjectCreated", _ObjectCreated, value)
|
||||
End Set
|
||||
End Property
|
||||
<Size(-1)> _
|
||||
Property Description As String
|
||||
Get
|
||||
Return _Description
|
||||
End Get
|
||||
Set(value As String)
|
||||
SetPropertyValue("Description", _Description, value)
|
||||
End Set
|
||||
End Property
|
||||
<VisibleInListView(False)> _
|
||||
Property Attachment As FileData
|
||||
Get
|
||||
Return _Attachment
|
||||
End Get
|
||||
Set(value As FileData)
|
||||
SetPropertyValue("Attachment", _Attachment, value)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
<VisibleInListView(False)> _
|
||||
<Size(-1)> _
|
||||
ReadOnly Property HTMLEvents As String
|
||||
Get
|
||||
Return CreateHTMLEvents(Me.Question, Session)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,49 @@
|
||||
Partial Class Reply_VC
|
||||
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
|
||||
MyClass.New()
|
||||
|
||||
'Required for Windows.Forms Class Composition Designer support
|
||||
Container.Add(Me)
|
||||
|
||||
End Sub
|
||||
|
||||
'Component overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Component Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Component Designer
|
||||
'It can be modified using the Component Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Me.aSaveReply = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aSaveReply
|
||||
'
|
||||
Me.aSaveReply.Caption = "Save reply"
|
||||
Me.aSaveReply.Category = "Save"
|
||||
Me.aSaveReply.ConfirmationMessage = Nothing
|
||||
Me.aSaveReply.Id = "aSaveReply"
|
||||
Me.aSaveReply.ImageName = "disk_red"
|
||||
Me.aSaveReply.Shortcut = Nothing
|
||||
Me.aSaveReply.Tag = Nothing
|
||||
Me.aSaveReply.TargetObjectsCriteria = Nothing
|
||||
Me.aSaveReply.TargetViewId = ""
|
||||
Me.aSaveReply.ToolTip = Nothing
|
||||
Me.aSaveReply.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aSaveReply As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aSaveReply.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -0,0 +1,126 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports System.Net.Mail
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports System.Reflection
|
||||
|
||||
Public Class Reply_VC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
Frame.GetController(Of Reply_VC).aSaveReply.Active.SetItemValue("", False)
|
||||
|
||||
|
||||
If View.Id = "Reply_DetailView" Then
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", False)
|
||||
Frame.GetController(Of Reply_VC).aSaveReply.Active.SetItemValue("", True)
|
||||
If SecuritySystem.CurrentUserName <> "ivan.szabo" Then Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", False)
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "Reply_DetailView" Then
|
||||
Frame.GetController(Of ModificationsController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of NewObjectViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of DeleteObjectsViewController).Active.SetItemValue("", True)
|
||||
Frame.GetController(Of Reply_VC)().aSaveReply.Active.SetItemValue("", False)
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub aSaveReply_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aSaveReply.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _Reply As Reply = TryCast(View.SelectedObjects(0), Reply)
|
||||
|
||||
Dim _Events As Events
|
||||
If _Reply IsNot Nothing Then
|
||||
_Reply.Question.QuestionStatus = eQuestionStatus.eActive
|
||||
_Reply.Question.QuestionClosed = eQuestionClosed.eOpen
|
||||
_Reply.Question.Save()
|
||||
_Reply.Save()
|
||||
|
||||
_ocur.CommitChanges()
|
||||
|
||||
_Events = _onew.CreateObject(Of Events)()
|
||||
_Events.Question = _onew.GetObject(_Reply.Question)
|
||||
_Events.Description = _Reply.Description
|
||||
If _Reply.Attachment IsNot Nothing Then _Events.Attachment = _onew.GetObject(_Reply.Attachment)
|
||||
_Events.Save()
|
||||
_Events.EventDirection = eEventDirection.eIn
|
||||
_onew.CommitChanges()
|
||||
|
||||
Try
|
||||
Dim _WebParameters As WebParameters = _ocur.FindObject(Of WebParameters)(CriteriaOperator.Parse("1=1"))
|
||||
If _WebParameters Is Nothing Then Throw New Exception("*Nincsnek e-mail paraméterek beállítva!")
|
||||
If _WebParameters.SMTPHost Is Nothing Then Throw New Exception("*Nincs SMTP server beállítva!")
|
||||
If _WebParameters.SMTPUserName = "" Then Throw New Exception("*Nincs felhasználói név beállítva!")
|
||||
If _WebParameters.SMTPPort = 0 Then Throw New Exception("*Nincs SMTP port beállítva!")
|
||||
|
||||
|
||||
|
||||
Dim _MailMessage As New MailMessage
|
||||
Dim _Attachment As Attachment
|
||||
Dim _SmtpClient As SmtpClient = New SmtpClient(_WebParameters.SMTPHost)
|
||||
_MailMessage.From = New MailAddress(_WebParameters.Email_SupportAdmin)
|
||||
_MailMessage.To.Add(_Reply.Question.UserCreated.Email)
|
||||
_MailMessage.Subject = _Reply.Question.DocumentNumber + " számú bejelentés"
|
||||
_MailMessage.IsBodyHtml = True
|
||||
|
||||
Dim _EmailBody As String = _WebParameters.HTMLMailTemplate_QuestionStatusUpdate.HTMLBody
|
||||
_EmailBody = String.Format(_EmailBody, _Reply.Question.UserCreated.FullName, _Reply.Question.DocumentNumber, _
|
||||
DevExpress.ExpressApp.Utils.CaptionHelper.GetLocalizedText("Enums\SISBusiness.Module.eQuestionStatus", _Reply.Question.QuestionStatus.ToString) + _
|
||||
vbNewLine, TryCast(SecuritySystem.CurrentUser, User).FullName)
|
||||
|
||||
_EmailBody = _EmailBody + vbNewLine + CreateHTMLEventsMail(_Reply.Question, _ocur.Session)
|
||||
|
||||
_MailMessage.Body = _EmailBody
|
||||
_MailMessage.Attachments.Clear()
|
||||
|
||||
_Attachment = New Attachment(GLOBAL_ApplicationStartupPath_Mail & "Images\iRedArrow.png")
|
||||
_Attachment.ContentId = "c001"
|
||||
_MailMessage.Attachments.Add(_Attachment)
|
||||
|
||||
_Attachment = New Attachment(GLOBAL_ApplicationStartupPath_Mail & "Images\iGreenArrow.png")
|
||||
_Attachment.ContentId = "c002"
|
||||
_MailMessage.Attachments.Add(_Attachment)
|
||||
|
||||
_SmtpClient.Port = _WebParameters.SMTPPort
|
||||
_SmtpClient.Credentials = New System.Net.NetworkCredential(_WebParameters.SMTPUserName, _WebParameters.SMTPPassword)
|
||||
_SmtpClient.EnableSsl = _WebParameters.EnableSsl
|
||||
|
||||
_SmtpClient.Send(_MailMessage)
|
||||
|
||||
_MailMessage.To.Clear()
|
||||
_MailMessage.To.Add(_WebParameters.Email_SupportAdmin)
|
||||
_MailMessage.Subject = "Új válasz érkezett"
|
||||
_MailMessage.Body = String.Format("{0} felhasználó a(z) {1} kérdéshez új választ rögzített.", _Reply.Question.UserCreated.FullName, _Reply.Question.DocumentNumber)
|
||||
_SmtpClient.Send(_MailMessage)
|
||||
|
||||
Catch ex As Exception
|
||||
Dim sf As StackFrame = New StackFrame()
|
||||
Dim _ErrorLog As ErrorLog = _ocur.CreateObject(Of ErrorLog)()
|
||||
_ErrorLog.Description = ex.Message
|
||||
_ErrorLog.SubName = TryCast(sf.GetMethod(), MethodBase).Name
|
||||
_ocur.CommitChanges()
|
||||
End Try
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "Question_DetailView_Info", True, _onew.GetObject(_Reply.Question))
|
||||
View.Close()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user