First create solution

This commit is contained in:
2017-03-08 11:21:27 +01:00
commit a2fb86bacf
5508 changed files with 1082238 additions and 0 deletions
@@ -0,0 +1,56 @@
Imports System
Imports System.ComponentModel
Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering
Imports DevExpress.ExpressApp
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation
Imports System.IO
Imports System.Net.Mail
Imports System.Drawing
Imports System.Collections
Imports DevExpress.XtraReports.UI
<NavigationItem(False), CreatableItem(False)> _
Public Class EmailSender
Inherits BaseObject
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Sub Sendmail() '---- Nem működ még csak próba adatokkal lett megcsinálva
Try
' Create a new report.
Dim Report As New XtraReport1()
' Create a new memory stream and export the report into it as PDF.
Dim Mem As New MemoryStream()
Report.ExportToPdf(Mem)
' Create a new attachment and put the PDF report into it.
Mem.Seek(0, System.IO.SeekOrigin.Begin)
Dim Att = New Attachment(Mem, "TestReport.pdf", "application/pdf")
' Create a new message and attach the PDF report to it.
Dim Mail As New MailMessage()
Mail.Attachments.Add(Att)
' Specify sender and recipient options for the e-mail message.
Mail.From = New MailAddress("totyota@gmail.com", "Someone")
Mail.To.Add(New MailAddress("totyota@gmail.com", "Someone"))
' Specify other e-mail options.
Mail.Subject = "Próba"
Mail.Body = "This is a test e-mail message sent by an application."
' Send the e-mail message via the specified SMTP server.
Dim Smtp = New SmtpClient("smtp.gmail.com")
Smtp.Send(Mail)
' Close the memory stream.
Mem.Close()
Mem.Flush()
Catch ex As Exception
'MessageBox.Show(Me, "Error sending a report.\n" + ex.ToString())
End Try
End Sub
End Class
Partial Public Class XtraReport1
Inherits DevExpress.XtraReports.UI.XtraReport
Public Sub New()
'InitializeComponent()
End Sub
End Class
@@ -0,0 +1,30 @@
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 HTMLMailGetContacts
Inherits BaseObject
Public Sub New(ByVal session As Session)
MyBase.New(session)
' This constructor is used when an object is loaded from a persistent storage.
' Do not place any code here or place it only when the IsLoading property is false:
' if (!IsLoading){
' It is now OK to place your initialization code here.
' }
' or as an alternative, move your initialization code into the AfterConstruction method.
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
' Place here your initialization code.
End Sub
Property ContactsProperties As String
End Class
@@ -0,0 +1,99 @@
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 eHTMLMailTemplateState
eInProgress = 0
eReady = 1
eDisposed = 2
End Enum
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False)> _
Public Class HTMLMailTemplate
Inherits BaseObject
Private _HTMLMailTemplateState As eHTMLMailTemplateState
Private _ShortName As String
Private _HTMLBody As String
Private _ObjectCreated As Date
Private _UserCreated As User
Private _ContactsProperties As String
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
<RuleRequiredField("HTMLMailTemplate-HTMLMailTemplateState", DefaultContexts.Save)> _
Property HTMLMailTemplateState As eHTMLMailTemplateState
Get
Return _HTMLMailTemplateState
End Get
Set(value As eHTMLMailTemplateState)
SetPropertyValue("HTMLMailTemplateState", _HTMLMailTemplateState, value)
End Set
End Property
<Size(255)> _
<RuleRequiredField("HTMLMailTemplate-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)> _
<RuleRequiredField("HTMLMailTemplate-HTMLBody", DefaultContexts.Save)> _
Property HTMLBody As String
Get
Return _HTMLBody
End Get
Set(value As String)
SetPropertyValue("HTMLBody", _HTMLBody, 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
<VisibleInListView(False), VisibleInLookupListView(False)> _
<NonPersistent()> _
Property ContactsProperties As String
Get
Return _ContactsProperties
End Get
Set(value As String)
SetPropertyValue("ContactsProperties", _ContactsProperties, value)
End Set
End Property
End Class
@@ -0,0 +1,51 @@
Partial Class HTMLMailTemplateVC
<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.aCopyProperty = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
'
'aCopyProperty
'
Me.aCopyProperty.Caption = "aCopy Property"
Me.aCopyProperty.ConfirmationMessage = Nothing
Me.aCopyProperty.Id = "aCopyProperty"
Me.aCopyProperty.ImageName = "copy"
Me.aCopyProperty.Shortcut = Nothing
Me.aCopyProperty.Tag = Nothing
Me.aCopyProperty.TargetObjectsCriteria = Nothing
Me.aCopyProperty.TargetObjectType = GetType(Nuvolar.[Module].HTMLMailTemplate)
Me.aCopyProperty.TargetViewId = Nothing
Me.aCopyProperty.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aCopyProperty.ToolTip = "A kapcsolat tulajdonságati másolja. A Ctrl+V vagy a beillesztés gombra kattintva " & _
"helyezhetõ el a HTML testben."
Me.aCopyProperty.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
End Sub
Friend WithEvents aCopyProperty 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="aCopyProperty.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>110, 52</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,37 @@
Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Actions
Imports System.Windows.Forms
Imports DevExpress.ExpressApp.Utils
Public Class HTMLMailTemplateVC
Inherits ViewController
Public Sub New()
MyBase.New()
'This call is required by the Component Designer.
InitializeComponent()
RegisterActions(components)
End Sub
Private Sub aCopyProperty_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aCopyProperty.Execute
Try
Dim _DetailView As DetailView = TryCast(View, DetailView)
Dim _HTMLMailTemplate As HTMLMailTemplate = TryCast(_DetailView.CurrentObject, HTMLMailTemplate)
If _HTMLMailTemplate.ContactsProperties IsNot Nothing Then
Dim _copy As String = String.Format("{{{0}}}", _HTMLMailTemplate.ContactsProperties)
Clipboard.Clear()
' Clipboard.SetText(_copy)
Clipboard.SetData(DataFormats.Text, CType(_copy, String))
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, CaptionHelper.GetLocalizedText("Exceptions\NuvolarExceptions", "MsgBoxCheckItAgain"))
End Try
End Sub
End Class
@@ -0,0 +1,26 @@
Imports System.Net.Mail
Imports DevExpress.ExpressApp
Module MailSender
Sub SendSMTPMail(_ocur As Xpo.XPObjectSpace, _HRPerson As HRPerson, _ToAddress As String, _Subject As String, _Body As String)
Dim _SMTPServer As New SmtpClient
Dim _Mail As New MailMessage
Try
_SMTPServer.Credentials = New Net.NetworkCredential(_HRPerson.SMTPUserName, _HRPerson.SMTPPassword)
_SMTPServer.Port = _HRPerson.SMTPPort
_SMTPServer.Host = _HRPerson.SMTPHost
_Mail.From = New MailAddress(_HRPerson.Email)
_Mail.To.Add(_ToAddress)
_Mail.Subject = _Subject
_Mail.Body = _Body
_SMTPServer.Send(_Mail)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
End Module
@@ -0,0 +1,141 @@
Imports System.ComponentModel
Imports DevExpress.Xpo
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports System.Net.Mail
Imports System.Net
<DefaultClassOptions()>
<NavigationItem(False)> _
<CreatableItem(False)> _
Public Class WebParameters
Inherits BaseObject
Private _SMTPHost As String
Private _SMTPPort As Long = 25
Private _SMTPUserName As String
Private _SMTPPassword As String
Private _SMTPRequiresAuthentication As Boolean
Private _EnableSsl As Boolean
Private _Email_SupportAdmin As String
Private _HTMLMailTemplate_QuestionUpdate As HTMLMailTemplate
Private _HTMLMailTemplate_QuestionStatusUpdate As HTMLMailTemplate
Private _HTMLMailTemplate_AnswerUpdate As HTMLMailTemplate
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
EnableSsl = True
End Sub
Property SMTPHost As String
Get
Return _SMTPHost
End Get
Set(value As String)
SetPropertyValue("SMTPHost", _SMTPHost, value)
End Set
End Property
Property SMTPPort As Long
Get
Return _SMTPPort
End Get
Set(value As Long)
SetPropertyValue("SMTPPort", _SMTPPort, value)
End Set
End Property
Property SMTPUserName As String
Get
Return _SMTPUserName
End Get
Set(value As String)
SetPropertyValue("SMTPUserName", _SMTPUserName, value)
End Set
End Property
<PasswordPropertyText()>
Property SMTPPassword As String
Get
Return _SMTPPassword
End Get
Set(value As String)
SetPropertyValue("SMTPPassword", _SMTPPassword, value)
End Set
End Property
Property SMTPRequiresAuthentication As Boolean
Get
Return _SMTPRequiresAuthentication
End Get
Set(value As Boolean)
SetPropertyValue("SMTPRequiresAuthentication", _SMTPRequiresAuthentication, value)
End Set
End Property
Property EnableSsl As Boolean
Get
Return _EnableSsl
End Get
Set(value As Boolean)
SetPropertyValue("EnableSsl", _EnableSsl, value)
End Set
End Property
Property Email_SupportAdmin As String
Get
Return _Email_SupportAdmin
End Get
Set(value As String)
SetPropertyValue("Email_SupportAdmin", _Email_SupportAdmin, value)
End Set
End Property
Property HTMLMailTemplate_QuestionUpdate As HTMLMailTemplate
Get
Return _HTMLMailTemplate_QuestionUpdate
End Get
Set(value As HTMLMailTemplate)
SetPropertyValue("HTMLMailTemplate_QuestionUpdate", _HTMLMailTemplate_QuestionUpdate, value)
End Set
End Property
Property HTMLMailTemplate_QuestionStatusUpdate As HTMLMailTemplate
Get
Return _HTMLMailTemplate_QuestionStatusUpdate
End Get
Set(value As HTMLMailTemplate)
SetPropertyValue("HTMLMailTemplate_QuestionStatusUpdate", _HTMLMailTemplate_QuestionStatusUpdate, value)
End Set
End Property
Property HTMLMailTemplate_AnswerUpdate As HTMLMailTemplate
Get
Return _HTMLMailTemplate_AnswerUpdate
End Get
Set(value As HTMLMailTemplate)
SetPropertyValue("HTMLMailTemplate_AnswerUpdate", _HTMLMailTemplate_AnswerUpdate, value)
End Set
End Property
Public Function SendMail(_To As String, _Subject As String, _Body As String) As String
Dim _SmtpClient As SmtpClient = New SmtpClient(SMTPHost)
Dim _MailMessage As New MailMessage
Dim _ReturnString As String = ""
Try
_SmtpClient.Port = SMTPPort
If SMTPRequiresAuthentication Then
_SmtpClient.Credentials = New NetworkCredential(SMTPUserName, SMTPPassword)
_SmtpClient.EnableSsl = EnableSsl
Else
_SmtpClient.UseDefaultCredentials = True
End If
_MailMessage.To.Add(_To)
_MailMessage.From = New MailAddress(Email_SupportAdmin)
_MailMessage.Subject = ""
_MailMessage.IsBodyHtml = True
_MailMessage.Body = ""
_SmtpClient.Send(_MailMessage)
Catch ex As Exception
_ReturnString = ex.Message
End Try
Return _ReturnString
End Function
End Class
@@ -0,0 +1,51 @@
Partial Class WebParameters_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.aSMTPTest = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
'
'aSMTPTest
'
Me.aSMTPTest.Caption = "aSMTPTest"
Me.aSMTPTest.Category = ""
Me.aSMTPTest.ConfirmationMessage = Nothing
Me.aSMTPTest.Id = "aSMTPTest"
Me.aSMTPTest.ImageName = Nothing
Me.aSMTPTest.Shortcut = Nothing
Me.aSMTPTest.Tag = Nothing
Me.aSMTPTest.TargetObjectsCriteria = Nothing
Me.aSMTPTest.TargetObjectType = GetType(Nuvolar.[Module].WebParameters)
Me.aSMTPTest.TargetViewId = Nothing
Me.aSMTPTest.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aSMTPTest.ToolTip = Nothing
Me.aSMTPTest.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
End Sub
Friend WithEvents aSMTPTest 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="aSMTPTest.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,67 @@
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
Public Class WebParameters_VC
Inherits DevExpress.ExpressApp.ViewController
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
Private Sub aSMTPTest_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aSMTPTest.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _WebParameters As WebParameters = TryCast(View.SelectedObjects(0), WebParameters)
If _WebParameters Is Nothing Then Throw New Exception("*Váratlan hiba történt, a folyamat megszakadt!")
If String.IsNullOrEmpty(_WebParameters.SMTPHost) Then Throw New Exception("*Nincs megadva SMTP szerver!")
If _WebParameters.SMTPPort < 1 Then Throw New Exception("*Érvénytelen SMTP Port!")
If String.IsNullOrEmpty(_WebParameters.SMTPUserName) Then Throw New Exception("*Nincs megadva SMTP Felhasználói név!")
If String.IsNullOrEmpty(_WebParameters.SMTPPassword) Then Throw New Exception("*Nincs megadva SMTP jelszó!")
If String.IsNullOrEmpty(_WebParameters.Email_SupportAdmin) Then Throw New Exception("*Nincs megadva Support Admin e-mail cím!")
If _WebParameters.HTMLMailTemplate_QuestionUpdate Is Nothing Then Throw New Exception("*Nincs beállítva Kérdés e-mail sablon!")
If _WebParameters.HTMLMailTemplate_QuestionUpdate Is Nothing Then Throw New Exception("*Nincs beállítva Státusz e-mail sablon!")
If _WebParameters.HTMLMailTemplate_AnswerUpdate Is Nothing Then Throw New Exception("*Nincs beállítva Válasz e-mail sablon!")
Dim _MailMessage As New System.Net.Mail.MailMessage
Dim _SmtpClient As System.Net.Mail.SmtpClient = New System.Net.Mail.SmtpClient(_WebParameters.SMTPHost)
_MailMessage.From = New System.Net.Mail.MailAddress(_WebParameters.Email_SupportAdmin)
_MailMessage.To.Add(_WebParameters.Email_SupportAdmin)
_MailMessage.Subject = "Nuvolar SMTP beállítások - T E S Z T E M A I L"
_MailMessage.IsBodyHtml = True
Dim _EmailBody As String = ""
_EmailBody += String.Format("<b>SMTP szerver: </b>{0}<br><b>SMTP Port: </b>{1}<br><b>SMTP Felhasználó: </b>{2}<br><b>SMTP jelszó: </b>{3}<br><br>", _
_WebParameters.SMTPHost, _WebParameters.SMTPPort, _WebParameters.SMTPUserName, _WebParameters.SMTPPassword)
_EmailBody += "<h1><b><u>Kérdés sablon:</h1></b></u><br><br>"
_EmailBody += _WebParameters.HTMLMailTemplate_QuestionStatusUpdate.HTMLBody
_EmailBody += "<h1><b><u>Státusz sablon:</h1></b></u><br><br>"
_EmailBody += _WebParameters.HTMLMailTemplate_QuestionStatusUpdate.HTMLBody
_EmailBody += "<h1><b><u>Válasz sablon:</h1></b></u><br><br>"
_EmailBody += _WebParameters.HTMLMailTemplate_AnswerUpdate.HTMLBody
_MailMessage.Body = _EmailBody
_SmtpClient.Port = _WebParameters.SMTPPort
_SmtpClient.Credentials = New System.Net.NetworkCredential(_WebParameters.SMTPUserName, _WebParameters.SMTPPassword)
_SmtpClient.EnableSsl = _WebParameters.EnableSsl
_SmtpClient.Send(_MailMessage)
Throw New Exception("*A teszt sikeres!" + vbNewLine + "Kérem ellenõrizze az e-mail-t!" + vbNewLine + _
String.Format("A címzett: {0}", _WebParameters.Email_SupportAdmin))
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly, "SMTP teszt")
End Try
End Sub
End Class