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,252 @@
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 System.Net.Mail
Public Enum eMeetPlace
eCustomersOffice = 0
eOurOffice = 1
eOtherPlace = 2
End Enum
<DefaultClassOptions()> _
<NavigationItem(False)> _
<CreatableItem(False)> _
<Appearance("Disable CustomersMeeting - ObjectCreated all times", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
<Appearance("Disable CustomersMeeting - UserCreated all times", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)> _
<Appearance("Disable CustomersMeeting - Months all times", AppearanceItemType.ViewItem, "1=1", TargetItems:="Months", Enabled:=False)> _
<Appearance("Disable CustomersMeeting - DocumentNumber all times", AppearanceItemType.ViewItem, "1=1", TargetItems:="DocumentNumber", Enabled:=False)> _
<Appearance("Disable CustomersMeeting - all properties, when IsEditable=False", AppearanceItemType.ViewItem, "IsEditable=False", TargetItems:="*", Enabled:=False)> _
Public Class CustomersMeeting
Inherits BaseObject
Private _MeetPlace As eMeetPlace
Private _CustomersMeetingType As CustomersMeetingType
Private _Customers As Customers
Private _DocumentNumber As String
Private _DateExecution As Date
Private _ShortName As String
Private _Description As String
Private _UserCreated As User
Private _ObjectCreated As Date
Private _IsEditable As Boolean
Private _Months As eMonths
Private _EmailHasBeenSent As Boolean
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
DateExecution = Now
IsEditable = True
EmailHasBeenSent = False
End Sub
Protected Overrides Sub OnSaving()
MyBase.OnSaving()
If Session.IsNewObject(Me) Then
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
ObjectCreated = Now
If String.IsNullOrEmpty(DocumentNumber) And NumberGenerator IsNot Nothing Then
DocumentNumber = NumberGenerator.GetNewNumber(NumberGenerator, Year(Now).ToString)
End If
Months = ObjectCreated.Month
If EmailHasBeenSent = False Then
Try
Dim _WebParameters As WebParameters = Session.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)
If Customers.Contacts.Count > 0 Then
For Each _Contacts As Contacts In Customers.Contacts
If Not String.IsNullOrEmpty(_Contacts.Email) Then _MailMessage.To.Add(_Contacts.Email)
Next
ElseIf Not String.IsNullOrEmpty(Customers.Email) Then
_MailMessage.To.Add(Customers.Email)
Else
Throw New Exception("*Nincs email cím beállítva!")
End If
_MailMessage.Subject = "Új egyeztetés"
_MailMessage.IsBodyHtml = True
_MailMessage.Body = String.Format("{0} számmal új egyeztetés készült az Ön részére", DocumentNumber)
_SmtpClient.Port = _WebParameters.SMTPPort
_SmtpClient.Credentials = New System.Net.NetworkCredential(_WebParameters.SMTPUserName, _WebParameters.SMTPPassword)
_SmtpClient.EnableSsl = _WebParameters.EnableSsl
_SmtpClient.Send(_MailMessage)
EmailHasBeenSent = True
Catch ex As Exception
Dim sf As StackFrame = New StackFrame()
Dim _uow As New UnitOfWork(Session.DataLayer)
Dim _ErrorLog As New ErrorLog(_uow)
_ErrorLog.Description = ex.Message
_ErrorLog.SubName = TryCast(sf.GetMethod(), System.Reflection.MethodBase).Name
_uow.CommitTransaction()
End Try
End If
End If
End Sub
Property MeetPlace As eMeetPlace
Get
Return _MeetPlace
End Get
Set(value As eMeetPlace)
SetPropertyValue("MeetPlace", _MeetPlace, value)
End Set
End Property
Property CustomersMeetingState As CustomersMeetingType 'ELBASZTAM a nevét! R.
Get
Return _CustomersMeetingType
End Get
Set(value As CustomersMeetingType)
SetPropertyValue("CustomersMeetingType", _CustomersMeetingType, value)
If Not Session.IsObjectsLoading And Not Session.IsObjectsSaving Then
If String.IsNullOrEmpty(ShortName) Then _
ShortName = value.ShortName
End If
End Set
End Property
<RuleRequiredField("CustomersMeeting - Customers", DefaultContexts.Save)> _
Property Customers As Customers
Get
Return _Customers
End Get
Set(value As Customers)
SetPropertyValue("Customers", _Customers, value)
End Set
End Property
Property DocumentNumber As String
Get
Return _DocumentNumber
End Get
Set(value As String)
SetPropertyValue("DocumentNumber", _DocumentNumber, value)
End Set
End Property
Property DateExecution As Date
Get
Return _DateExecution
End Get
Set(value As Date)
SetPropertyValue("DateExecution", _DateExecution, value)
End Set
End Property
Property ShortName As String
Get
Return _ShortName
End Get
Set(value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
<Size(-1)> _
<RuleRequiredField("CustomersMeeting - Description", DefaultContexts.Save)> _
Property Description As String
Get
Return _Description
End Get
Set(value As String)
SetPropertyValue("Description", _Description, 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)> _
Property IsEditable As Boolean
Get
Return _IsEditable
End Get
Set(value As Boolean)
SetPropertyValue("IsEditable", _IsEditable, value)
End Set
End Property
Property Months As eMonths
Get
Return _Months
End Get
Set(value As eMonths)
SetPropertyValue("Months", _Months, value)
End Set
End Property
<VisibleInListView(False)> _
<VisibleInDetailView(False)> _
<VisibleInLookupListView(False)> _
Property EmailHasBeenSent As Boolean
Get
Return _EmailHasBeenSent
End Get
Set(value As Boolean)
SetPropertyValue("EmailHasBeenSent", _EmailHasBeenSent, value)
End Set
End Property
<VisibleInListView(False)> _
<Association("CustomersMeeting-CustomersMeetingDocuments", GetType(CustomersMeetingDocuments))> _
ReadOnly Property CustomersMeetingDocuments As XPCollection(Of CustomersMeetingDocuments)
Get
Return GetCollection(Of CustomersMeetingDocuments)("CustomersMeetingDocuments")
End Get
End Property
<Browsable(False)> _
ReadOnly Property NumberGenerator As NumberGenerator
Get
Return TryCast(Session.FindObject(Of SupportNG)(CriteriaOperator.Parse("SupportType=2")), SupportNG).NumberGenerator
End Get
End Property
<Browsable(False)> _
ReadOnly Property CustomersMeetingSubContractorCustomers As XPCollection(Of Customers)
Get
If TryCast(SecuritySystem.CurrentUser, User) Is Nothing Then Return Nothing
Dim _SubContractorCustomers_Collection As New XPCollection(Of Customers)(Session, CriteriaOperator.Parse("1=2"))
Dim _User As User = Session.GetObjectByKey(Of User)(TryCast(SecuritySystem.CurrentUser, User).Oid)
Dim _Contacts As Contacts = Session.FindObject(Of Contacts)(DevExpress.Data.Filtering.CriteriaOperator.Parse("User = ?", _User))
If _Contacts.Customers IsNot Nothing Then
Dim _Subcontractor As Subcontractor = Session.FindObject(Of Subcontractor)(CriteriaOperator.Parse("Customers=?", _Contacts.Customers))
If _Subcontractor IsNot Nothing Then
For Each _SubcontractorCustomers As SubcontractorCustomers In _Subcontractor.SubcontractorCustomers
_SubContractorCustomers_Collection.Add(_SubcontractorCustomers.Customers)
Next
End If
Return _SubContractorCustomers_Collection
Else
Return Nothing
End If
End Get
End Property
End Class
@@ -0,0 +1,33 @@
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 CustomersMeetingDocuments
Inherits FileAttachmentBase
Private _CustomersMeeting As CustomersMeeting
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Association("CustomersMeeting-CustomersMeetingDocuments", GetType(CustomersMeeting))> _
Property CustomersMeeting As CustomersMeeting
Get
Return _CustomersMeeting
End Get
Set(value As CustomersMeeting)
SetPropertyValue("CustomersMeeting", _CustomersMeeting, value)
End Set
End Property
End Class
@@ -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
<DefaultClassOptions()> _
<NavigationItem("Support")> _
<CreatableItem(False)> _
Public Class CustomersMeetingType
Inherits BaseObject
Private _ShortName As String 'Megnevezés
Private _Description As String 'Leírás
Private _ReportData As ReportData
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<RuleRequiredField("CustomersMeetingType - 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
<RuleRequiredField("CustomersMeetingType - ReportData", DefaultContexts.Save)> _
Property ReportData As ReportData
Get
Return _ReportData
End Get
Set(value As ReportData)
SetPropertyValue("ReportData", _ReportData, value)
End Set
End Property
End Class
@@ -0,0 +1,51 @@
Partial Class CustomersMeeting_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.aCustomersMeeting_Print = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
'
'aCustomersMeeting_Print
'
Me.aCustomersMeeting_Print.Caption = "aCustomersMeeting_Print"
Me.aCustomersMeeting_Print.Category = "View"
Me.aCustomersMeeting_Print.ConfirmationMessage = Nothing
Me.aCustomersMeeting_Print.Id = "aCustomersMeeting_Print"
Me.aCustomersMeeting_Print.ImageName = Nothing
Me.aCustomersMeeting_Print.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aCustomersMeeting_Print.Shortcut = Nothing
Me.aCustomersMeeting_Print.Tag = Nothing
Me.aCustomersMeeting_Print.TargetObjectsCriteria = Nothing
Me.aCustomersMeeting_Print.TargetObjectType = GetType(Nuvolar.[Module].CustomersMeeting)
Me.aCustomersMeeting_Print.TargetViewId = Nothing
Me.aCustomersMeeting_Print.ToolTip = Nothing
Me.aCustomersMeeting_Print.TypeOfView = Nothing
End Sub
Friend WithEvents aCustomersMeeting_Print 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="aCustomersMeeting_Print.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,132 @@
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.ExpressApp.CloneObject
Imports DevExpress.Data.Filtering
Imports DevExpress.Persistent.BaseImpl
Public Class CustomersMeeting_VC
Inherits DevExpress.ExpressApp.ViewController
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
If View.Id = "CustomersMeeting_CustomersMeetingDocuments_ListView" Then
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", False)
End If
If View.Id = "CustomersMeeting_ListView_Support" Then
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _User As DevExpress.Persistent.BaseImpl.User = TryCast(SecuritySystem.CurrentUser, DevExpress.Persistent.BaseImpl.User)
Dim _Contacts As Contacts = _ocur.FindObject(Of Contacts)(DevExpress.Data.Filtering.CriteriaOperator.Parse("User = ?", _ocur.GetObject(_User)))
If _Contacts IsNot Nothing Then
If _Contacts.Customers IsNot Nothing Then
TryCast(View, ListView).CollectionSource.Criteria("BySupportCM") = DevExpress.Data.Filtering.CriteriaOperator.Parse("Customers.Oid = ?", _Contacts.Customers.Oid)
Else
TryCast(View, ListView).CollectionSource.Criteria("BySupportCM") = DevExpress.Data.Filtering.CriteriaOperator.Parse("1=2")
End If
Else
TryCast(View, ListView).CollectionSource.Criteria("BySupportCM") = DevExpress.Data.Filtering.CriteriaOperator.Parse("1=2")
End If
End If
If View.Id = "CustomersMeeting_ListView_Subcontractor" Then
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _User As DevExpress.Persistent.BaseImpl.User = TryCast(SecuritySystem.CurrentUser, DevExpress.Persistent.BaseImpl.User)
Dim _Contacts As Contacts = _ocur.FindObject(Of Contacts)(DevExpress.Data.Filtering.CriteriaOperator.Parse("User = ?", _ocur.GetObject(_User)))
If _Contacts IsNot Nothing Then
If _Contacts.Customers IsNot Nothing Then
Dim _Filter As String = "UserCreated.Oid in("
For Each _ContactsIn As Contacts In _Contacts.Customers.Contacts
_Filter += "'" + _ContactsIn.User.Oid.ToString + "',"
Next
_Filter = _Filter.Remove(_Filter.Length - 1, 1)
_Filter += ")"
TryCast(View, ListView).CollectionSource.Criteria("BySupportCM") = DevExpress.Data.Filtering.CriteriaOperator.Parse(_Filter)
Else
TryCast(View, ListView).CollectionSource.Criteria("BySupportCM") = DevExpress.Data.Filtering.CriteriaOperator.Parse("1=2")
End If
Else
TryCast(View, ListView).CollectionSource.Criteria("BySupportCM") = DevExpress.Data.Filtering.CriteriaOperator.Parse("1=2")
End If
End If
If View.Id = "CustomersMeeting_DetailView_Subcontractor" Then
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", False)
End If
If View.Id = "CustomersMeeting_DetailView" Then
Dim _CustomersMeeting As CustomersMeeting = TryCast(View.SelectedObjects(0), CustomersMeeting)
If _CustomersMeeting IsNot Nothing Then
If Not TryCast(View.ObjectSpace, Xpo.XPObjectSpace).Session.IsNewObject(_CustomersMeeting) Then
If _CustomersMeeting.IsEditable Then
Dim _NeedCommit As Boolean = False
If _CustomersMeeting.ObjectCreated.Year < GetSQLTime(TryCast(View.ObjectSpace, Xpo.XPObjectSpace).Session).Year Then
_CustomersMeeting.IsEditable = False
_NeedCommit = True
ElseIf _CustomersMeeting.ObjectCreated.Month < GetSQLTime(TryCast(View.ObjectSpace, Xpo.XPObjectSpace).Session).Month Then
_CustomersMeeting.IsEditable = False
_NeedCommit = True
ElseIf _CustomersMeeting.ObjectCreated.Day < GetSQLTime(TryCast(View.ObjectSpace, Xpo.XPObjectSpace).Session).Day Then
_CustomersMeeting.IsEditable = False
_NeedCommit = True
End If
If _NeedCommit Then TryCast(View.ObjectSpace, Xpo.XPObjectSpace).CommitChanges()
End If
End If
End If
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id = "CustomersMeeting_CustomersMeetingDocuments_ListView" Then
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
Frame.GetController(Of CloneObjectViewController)().Active.SetItemValue("", True)
End If
If View.Id = "CustomersMeeting_ListView_Support" Then
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
End If
If View.Id = "CustomersMeeting_ListView_Subcontractor" Then
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
End If
If View.Id = "CustomersMeeting_DetailView_Subcontractor" Then
Frame.GetController(Of CloneObjectViewController).Active.SetItemValue("", True)
End If
End Sub
Private Sub aCustomersMeeting_Print_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aCustomersMeeting_Print.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _CustomersMeeting As CustomersMeeting = TryCast(View.SelectedObjects(0), CustomersMeeting)
If _CustomersMeeting IsNot Nothing Then
If _CustomersMeeting.CustomersMeetingState IsNot Nothing Then
Dim _ReportData As ReportData = _CustomersMeeting.CustomersMeetingState.ReportData
If _ReportData IsNot Nothing Then
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("Oid=?", _CustomersMeeting.Oid), True)
Else
MsgBox("Nincs beállítva nyomtatvány!")
End If
Else
MsgBox("Nincs beállítva az egyeztetés típusa, így nem lehet nyomtatni!")
End If
End If
End Sub
End Class