Reconfigure for GIT

This commit is contained in:
2017-03-26 20:00:03 +02:00
commit 00637826ab
8056 changed files with 535977 additions and 0 deletions
@@ -0,0 +1,154 @@
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 eOfferAnswerInState
eReject = 0 'Elutasítás
eNotSet = -1 'Nincs beállítva
eAccept = 2 'Elfogadom
End Enum
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False)> _
Public Class OfferAnswerIn 'Bejövõ ajánlat fejléc
Inherits BaseObject
Private _RegistryHeader As RegistryHeader
Private _CustomersFrom As CustomersFrom
Private _Customers As Customers
Private _Contacts As Contacts
Private _JobNumberObjects As JobNumberObjects
Private _DocumentNumber As String
Private _DateValid As Date
Private _OfferAnswerInState As eOfferAnswerInState
Private _ObjectCreated As Date
Private _UserCreated As User
Private _OfferAskOut As OfferAskOut
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
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 RegistryHeader As RegistryHeader
Get
Return _RegistryHeader
End Get
Set(value As RegistryHeader)
SetPropertyValue("RegistryHeader", _RegistryHeader, value)
End Set
End Property
Property CustomersFrom As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
End Set
End Property
Property Customers As Customers
Get
Return _Customers
End Get
Set(value As Customers)
SetPropertyValue("Customers", _Customers, value)
End Set
End Property
Property Contacts As Contacts
Get
Return _Contacts
End Get
Set(value As Contacts)
SetPropertyValue("Contacts", _Contacts, value)
End Set
End Property
Property JobNumberObjects As JobNumberObjects
Get
Return _JobNumberObjects
End Get
Set(value As JobNumberObjects)
SetPropertyValue("JobNumberObjects", _JobNumberObjects, value)
End Set
End Property
Property DateValid As Date
Get
Return _DateValid
End Get
Set(value As Date)
SetPropertyValue("DateValid", _DateValid, value.Date)
End Set
End Property
Property OfferAnswerInState As eOfferAnswerInState
Get
Return _OfferAnswerInState
End Get
Set(value As eOfferAnswerInState)
SetPropertyValue("OfferAnswerInState", _OfferAnswerInState, 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
Property OfferAskOut As OfferAskOut
Get
Return _OfferAskOut
End Get
Set(value As OfferAskOut)
SetPropertyValue("OfferAskOut", _OfferAskOut, value)
End Set
End Property
'//XPCollections
<Association("OfferAnswerIn-OfferAnswerInRows", GetType(OfferAnswerInRows)), VisibleInListView(False), VisibleInLookupListView(False)> _
ReadOnly Property OfferAnswerInRows As XPCollection(Of OfferAnswerInRows)
Get
Return GetCollection(Of OfferAnswerInRows)("OfferAnswerInRows")
End Get
End Property
<Association("OfferAnswerIn-OfferAnswerInDocuments", GetType(OfferAnswerInDocuments)), VisibleInListView(False), VisibleInLookupListView(False)> _
ReadOnly Property OfferAnswerInDocuments As XPCollection(Of OfferAnswerInDocuments)
Get
Return GetCollection(Of OfferAnswerInDocuments)("OfferAnswerInDocuments")
End Get
End Property
End Class
@@ -0,0 +1,42 @@
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 OfferAnswerInDocuments
Inherits FileAttachmentBase
Private _OfferAnswerIn As OfferAnswerIn
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
<Association("OfferAnswerIn-OfferAnswerInDocuments", GetType(OfferAnswerIn))> _
Property OfferAnswerIn As OfferAnswerIn
Get
Return _OfferAnswerIn
End Get
Set(value As OfferAnswerIn)
SetPropertyValue("OfferAnswerIn", _OfferAnswerIn, value)
End Set
End Property
End Class
@@ -0,0 +1,79 @@
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 OfferAnswerInRows 'Bejövõ ajánlat sor
Inherits BaseObject
Private _OfferAnswerIn As OfferAnswerIn
Private _Operations As Operations
Private _AmountHUF As Double = 0
Private _AmountDEV As Double = 0
Private _Description As String
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
<Association("OfferAnswerIn-OfferAnswerInRows", GetType(OfferAnswerIn))> _
Property OfferAnswerIn As OfferAnswerIn
Get
Return _OfferAnswerIn
End Get
Set(value As OfferAnswerIn)
SetPropertyValue("OfferAnswerIn", _OfferAnswerIn, value)
End Set
End Property
Property Operations As Operations
Get
Return _Operations
End Get
Set(value As Operations)
SetPropertyValue("Operations", _Operations, value)
End Set
End Property
Property AmountHUF As Double
Get
Return _AmountHUF
End Get
Set(value As Double)
SetPropertyValue("AmountHUF", _AmountHUF, value)
End Set
End Property
Property AmountDEV As Double
Get
Return _AmountDEV
End Get
Set(value As Double)
SetPropertyValue("AmountDEV", _AmountDEV, 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,164 @@
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 eOfferAnswerOutState
eInProgress = 0 'Még dolgozunk rajta
eClosedWON = 1 'Elfogadták
eClosedLOST = 2 'Nem fogadták el
eInThinkingOf = 3 'Még gondolkodnak, hogy mi legyen vele !
End Enum
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False)> _
Public Class OfferAnswerOut
Inherits BaseObject
Private _CustomersFrom As CustomersFrom
Private _Customers As Customers
Private _Contacts As Contacts
Private _DateExecution As Date
Private _DateValid As Date
Private _JobNumberObjects As JobNumberObjects
Private _OfferAnswerOutState As eOfferAnswerOutState
Private _ObjectCreated As Date
Private _UserCreated As User
Private _HRPerson_Responsible As HRPerson
Private _OfferAnswerOut As OfferAnswerOut
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
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 CustomersFrom As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
End Set
End Property
Property Customers As Customers
Get
Return _Customers
End Get
Set(value As Customers)
SetPropertyValue("Customers", _Customers, value)
End Set
End Property
Property Contacts As Contacts
Get
Return _Contacts
End Get
Set(value As Contacts)
SetPropertyValue("Contacts", _Contacts, value)
End Set
End Property
Property JobNumberObjects As JobNumberObjects
Get
Return _JobNumberObjects
End Get
Set(value As JobNumberObjects)
SetPropertyValue("JobNumberObjects", _JobNumberObjects, value)
End Set
End Property
Property OfferAnswerOutState As eOfferAnswerOutState
Get
Return _OfferAnswerOutState
End Get
Set(value As eOfferAnswerOutState)
SetPropertyValue("OfferAnswerOutState", _OfferAnswerOutState, 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 DateValid As Date
Get
Return _DateValid
End Get
Set(value As Date)
SetPropertyValue("DateValid", _DateValid, 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
Property HRPerson_Responsible As HRPerson
Get
Return _HRPerson_Responsible
End Get
Set(value As HRPerson)
SetPropertyValue("HRPerson_Responsible", _HRPerson_Responsible, value)
End Set
End Property
Property OfferAnswerOut As OfferAnswerOut
Get
Return _OfferAnswerOut
End Get
Set(value As OfferAnswerOut)
SetPropertyValue("OfferAnswerOut", _OfferAnswerOut, value)
End Set
End Property
'//XPCollections
<Association("OfferAnswerOut-OfferAnswerOutRows", GetType(OfferAnswerOutRows))> _
ReadOnly Property OfferAnswerOutRows As XPCollection(Of OfferAnswerOutRows)
Get
Return GetCollection(Of OfferAnswerOutRows)("OfferAnswerOutRows")
End Get
End Property
<Association("OfferAnswerOut-OfferAnswerOutDocuments", GetType(OfferAnswerOutDocuments)), VisibleInListView(False), VisibleInLookupListView(False)> _
ReadOnly Property OfferAnswerOutDocuments As XPCollection(Of OfferAnswerOutDocuments)
Get
Return GetCollection(Of OfferAnswerOutDocuments)("OfferAnswerOutDocuments")
End Get
End Property
End Class
@@ -0,0 +1,41 @@
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 OfferAnswerOutDocuments
Inherits FileAttachmentBase
Private _OfferAnswerOut As OfferAnswerOut
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
<Association("OfferAnswerOut-OfferAnswerOutDocuments", GetType(OfferAnswerOut))> _
Property OfferAnswerOut As OfferAnswerOut
Get
Return _OfferAnswerOut
End Get
Set(value As OfferAnswerOut)
SetPropertyValue("OfferAnswerOut", _OfferAnswerOut, value)
End Set
End Property
End Class
@@ -0,0 +1,61 @@
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 OfferAnswerOutRows 'Kimenõ ajánlat sorok
Inherits BaseObject
Private _OfferAnswerOut As OfferAnswerOut
Private _Operations As Operations
Private _Description As String
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
<Association("OfferAnswerOut-OfferAnswerOutRows", GetType(OfferAnswerOut))> _
Property OfferAnswerOut As OfferAnswerOut
Get
Return _OfferAnswerOut
End Get
Set(value As OfferAnswerOut)
SetPropertyValue("OfferAnswerOut", _OfferAnswerOut, value)
End Set
End Property
Property Operations As Operations
Get
Return _Operations
End Get
Set(value As Operations)
SetPropertyValue("Operations", _Operations, 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,232 @@
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
Public Enum eOfferAskInState
eNotSet = -1
eInProgress = 0 'Folyamatban
eWin = 1 'Megnyert
eLost = 2 'Elvesztett
eNextStep = 3 'Következõ körös
eWait = 4 'Visszajelzésre vár
eWaitDecisions = 5
eRejected = 6 'Lemondott, nem adunk ajánlatot
End Enum
<DefaultClassOptions()> _
<NavigationItem(False)> _
<CreatableItem(False)> _
<Appearance("OfferAskIn - Disable ObjectCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
<Appearance("OfferAskIn - Disable UserCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)> _
Public Class OfferAskIn 'Bejövõ ajánlatkérés
Inherits BaseObject
Private _RegistryHeader As RegistryHeader 'Iktatás
Private _CustomersFrom As CustomersFrom 'Saját cég
Private _Customers As Customers 'Partner
Private _Contacts As Contacts 'Kapcsolat
Private _JobNumberObjects As JobNumberObjects 'Project
Private _DocumentNumber As String 'Dokumentum sorszáma
Private _OfferAskInState As eOfferAskInState 'Státusz
Private _DateExecution As Date 'Dátum
Private _DateValid As Date 'Határidõ
Private _ObjectCreated As Date 'Létrehozva
Private _UserCreated As User 'Létrehozta
Private _HRPerson_Responsible As HRPerson
Private _IsQualified As Boolean = False
Private _CustomersName As String
Private _ContactsName As String
Private _ContactsPhone As String
Private _ContactsEMail As String
Private _JobNumberName As String 'Ha nincs minõsítve, akkor a munka megnevezése
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 RegistryHeader As RegistryHeader
Get
Return _RegistryHeader
End Get
Set(value As RegistryHeader)
SetPropertyValue("RegistryHeader", _RegistryHeader, value)
End Set
End Property
Property CustomersFrom As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
End Set
End Property
Property Customers As Customers
Get
Return _Customers
End Get
Set(value As Customers)
SetPropertyValue("Customers", _Customers, value)
End Set
End Property
Property Contacts As Contacts
Get
Return _Contacts
End Get
Set(value As Contacts)
SetPropertyValue("Contacts", _Contacts, value)
End Set
End Property
Property JobNumberObjects As JobNumberObjects
Get
Return _JobNumberObjects
End Get
Set(value As JobNumberObjects)
SetPropertyValue("JobNumberObjects", _JobNumberObjects, 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 OfferAskInState As eOfferAskInState
Get
Return _OfferAskInState
End Get
Set(value As eOfferAskInState)
SetPropertyValue("OfferAskInState", _OfferAskInState, 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 DateValid As Date
Get
Return _DateValid
End Get
Set(value As Date)
SetPropertyValue("DateValid", _DateValid, 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
Property HRPerson_Responsible As HRPerson
Get
Return _HRPerson_Responsible
End Get
Set(value As HRPerson)
SetPropertyValue("HRPerson_Responsible", _HRPerson_Responsible, value)
End Set
End Property
Property IsQualified As Boolean
Get
Return _IsQualified
End Get
Set(value As Boolean)
SetPropertyValue("IsQualified", _IsQualified, value)
End Set
End Property
Property CustomersName As String
Get
Return _CustomersName
End Get
Set(value As String)
SetPropertyValue("CustomersName", _CustomersName, value)
End Set
End Property
Property ContactsName As String
Get
Return _ContactsName
End Get
Set(value As String)
SetPropertyValue("ContactsName", _ContactsName, value)
End Set
End Property
Property ContactsPhone As String
Get
Return _ContactsPhone
End Get
Set(value As String)
SetPropertyValue("ContactsPhone", _ContactsPhone, value)
End Set
End Property
Property ContactsEMail As String
Get
Return _ContactsEMail
End Get
Set(value As String)
SetPropertyValue("ContactsEMail", _ContactsEMail, value)
End Set
End Property
Property JobNumberName As String
Get
Return _JobNumberName
End Get
Set(value As String)
SetPropertyValue("JobNumberName", _JobNumberName, value)
End Set
End Property
'//XPCollection
<Association("OfferAskIn-OfferAskInRows", GetType(OfferAskInRows)), VisibleInListView(False), VisibleInLookupListView(False)> _
ReadOnly Property OfferAskInRows As XPCollection(Of OfferAskInRows)
Get
Return GetCollection(Of OfferAskInRows)("OfferAskInRows")
End Get
End Property
<Association("OfferAskIn-OfferAskInDocuments", GetType(OfferAskInDocuments)), VisibleInListView(False), VisibleInLookupListView(False)> _
ReadOnly Property OfferAskInDocuments As XPCollection(Of OfferAskInDocuments)
Get
Return GetCollection(Of OfferAskInDocuments)("OfferAskInDocuments")
End Get
End Property
End Class
@@ -0,0 +1,40 @@
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 OfferAskInDocuments
Inherits FileAttachmentBase
Private _OfferAskIn As OfferAskIn
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
<Association("OfferAskIn-OfferAskInDocuments", GetType(OfferAskIn))> _
Property OfferAskIn As OfferAskIn
Get
Return _OfferAskIn
End Get
Set(value As OfferAskIn)
SetPropertyValue("OfferAskIn", _OfferAskIn, value)
End Set
End Property
End Class
@@ -0,0 +1,54 @@
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 OfferAskInRows
Inherits BaseObject
Private _OfferAskIn As OfferAskIn
Private _Operations As Operations
Private _Description As String
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
' Place here your initialization code.
End Sub
<Association("OfferAskIn-OfferAskInRows", GetType(OfferAskIn))> _
Property OfferAskIn As OfferAskIn
Get
Return _OfferAskIn
End Get
Set(value As OfferAskIn)
SetPropertyValue("OfferAskIn", _OfferAskIn, value)
End Set
End Property
Property Operations As Operations
Get
Return _Operations
End Get
Set(value As Operations)
SetPropertyValue("Operations", _Operations, 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,70 @@
Partial Class OfferAskIn_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.aOfferAskInRowsAddOperations = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aOfferAskInCreateOfferAskOutFromCustomers = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
'
'aOfferAskInRowsAddOperations
'
Me.aOfferAskInRowsAddOperations.AcceptButtonCaption = Nothing
Me.aOfferAskInRowsAddOperations.CancelButtonCaption = Nothing
Me.aOfferAskInRowsAddOperations.Caption = "aOfferAskInRowsAddOperations"
Me.aOfferAskInRowsAddOperations.ConfirmationMessage = Nothing
Me.aOfferAskInRowsAddOperations.Id = "aOfferAskInRowsAddOperations"
Me.aOfferAskInRowsAddOperations.ImageName = Nothing
Me.aOfferAskInRowsAddOperations.Shortcut = Nothing
Me.aOfferAskInRowsAddOperations.Tag = Nothing
Me.aOfferAskInRowsAddOperations.TargetObjectsCriteria = Nothing
Me.aOfferAskInRowsAddOperations.TargetObjectType = GetType(SISBusiness.[Module].OfferAskInRows)
Me.aOfferAskInRowsAddOperations.TargetViewId = ""
Me.aOfferAskInRowsAddOperations.ToolTip = Nothing
Me.aOfferAskInRowsAddOperations.TypeOfView = GetType(DevExpress.ExpressApp.View)
'
'aOfferAskInCreateOfferAskOutFromCustomers
'
Me.aOfferAskInCreateOfferAskOutFromCustomers.AcceptButtonCaption = Nothing
Me.aOfferAskInCreateOfferAskOutFromCustomers.CancelButtonCaption = Nothing
Me.aOfferAskInCreateOfferAskOutFromCustomers.Caption = "aOfferAskInCreateOfferAskOutFromCustomers"
Me.aOfferAskInCreateOfferAskOutFromCustomers.ConfirmationMessage = Nothing
Me.aOfferAskInCreateOfferAskOutFromCustomers.Id = "aOfferAskInCreateOfferAskOutFromCustomers"
Me.aOfferAskInCreateOfferAskOutFromCustomers.ImageName = Nothing
Me.aOfferAskInCreateOfferAskOutFromCustomers.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aOfferAskInCreateOfferAskOutFromCustomers.Shortcut = Nothing
Me.aOfferAskInCreateOfferAskOutFromCustomers.Tag = Nothing
Me.aOfferAskInCreateOfferAskOutFromCustomers.TargetObjectsCriteria = Nothing
Me.aOfferAskInCreateOfferAskOutFromCustomers.TargetObjectType = GetType(SISBusiness.[Module].OfferAskInRows)
Me.aOfferAskInCreateOfferAskOutFromCustomers.TargetViewId = "OfferAskIn_OfferAskInRows_ListView"
Me.aOfferAskInCreateOfferAskOutFromCustomers.ToolTip = Nothing
Me.aOfferAskInCreateOfferAskOutFromCustomers.TypeOfView = GetType(DevExpress.ExpressApp.View)
End Sub
Friend WithEvents aOfferAskInRowsAddOperations As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aOfferAskInCreateOfferAskOutFromCustomers As DevExpress.ExpressApp.Actions.PopupWindowShowAction
End Class
@@ -0,0 +1,129 @@
<?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="aOfferAskInRowsAddOperations.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aOfferAskInCreateOfferAskOutFromCustomers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>318, 144</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,129 @@
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.Editors
Public Class OfferAskIn_VC
Inherits DevExpress.ExpressApp.ViewController
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
If View.Id = "OfferAskInCreateOfferAskOutFromCustomersPopUp_CustomersQualification_ListView" Then
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", False)
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id = "OfferAskInCreateOfferAskOutFromCustomersPopUp_CustomersQualification_ListView" Then
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.DeleteObjectsViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.NewObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.ListViewProcessCurrentObjectController)().Active.SetItemValue("", True)
End If
End Sub
Private Sub aOfferAskInRowsAddOperations_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aOfferAskInRowsAddOperations.CustomizePopupWindowParams
Try
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
e.View = Application.CreateListView(_onew, GetType(Operations), False)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
End Try
End Sub
Private Sub aOfferAskInRowsAddOperations_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aOfferAskInRowsAddOperations.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _OfferAskIn As OfferAskIn = Nothing
If TryCast(View, ListView) IsNot Nothing Then
_OfferAskIn = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, OfferAskIn)
If _OfferAskIn Is Nothing Then
_OfferAskIn = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, OfferAskInRows).OfferAskIn
End If
ElseIf TryCast(View, DetailView) IsNot Nothing Then
_OfferAskIn = TryCast(View.SelectedObjects(0), OfferAskInRows).OfferAskIn
End If
If _OfferAskIn Is Nothing Then Throw New Exception("*Nincs bejövõ ajánlat fejléc!")
For Each _Operations As Operations In e.PopupWindow.View.SelectedObjects
Dim _OfferAskInRows As OfferAskInRows
_OfferAskInRows = _ocur.FindObject(Of OfferAskInRows)(CriteriaOperator.Parse("OfferAskIn=? AND Operations=?", _ocur.GetObjectByKey(Of OfferAskIn)(_OfferAskIn.Oid), _
_ocur.GetObjectByKey(Of Operations)(_Operations.Oid)))
If _OfferAskInRows Is Nothing Then
_OfferAskInRows = _ocur.CreateObject(Of OfferAskInRows)()
_OfferAskInRows.OfferAskIn = _ocur.GetObjectByKey(Of OfferAskIn)(_OfferAskIn.Oid)
_OfferAskInRows.Operations = _ocur.GetObjectByKey(Of Operations)(_Operations.Oid)
End If
Next
_ocur.CommitChanges()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
End Try
End Sub
Private Sub aOfferAskInCreateOfferAskOutFromCustomers_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aOfferAskInCreateOfferAskOutFromCustomers.CustomizePopupWindowParams
Try
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _OfferAskInCreateOfferAskOutFromCustomersPopUp As OfferAskInCreateOfferAskOutFromCustomersPopUp = _onew.CreateObject(Of OfferAskInCreateOfferAskOutFromCustomersPopUp)()
Dim _OfferAskInRows As OfferAskInRows = TryCast(View.SelectedObjects(0), OfferAskInRows)
If _OfferAskInRows Is Nothing Then Throw New Exception("*Nincs kiválasztott mûvelet!")
_OfferAskInCreateOfferAskOutFromCustomersPopUp.Operations = _onew.GetObject(_OfferAskInRows.Operations)
e.View = Application.CreateDetailView(_onew, "OfferAskInCreateOfferAskOutFromCustomersPopUp_DetailView", False, _OfferAskInCreateOfferAskOutFromCustomersPopUp)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
End Try
End Sub
Private Sub aOfferAskInCreateOfferAskOutFromCustomers_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aOfferAskInCreateOfferAskOutFromCustomers.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _OfferAskInRows As OfferAskInRows = TryCast(View.SelectedObjects(0), OfferAskInRows)
Dim _OfferAskInCreateOfferAskOutFromCustomersPopUp As OfferAskInCreateOfferAskOutFromCustomersPopUp = TryCast(e.PopupWindow.View.SelectedObjects(0), OfferAskInCreateOfferAskOutFromCustomersPopUp)
Dim _OfferAskInRows_ListPropertyEditor As ListPropertyEditor = TryCast(e.PopupWindow.View, DetailView).FindItem("CustomersQualification")
For Each _CustomersQualification As CustomersQualification In _OfferAskInRows_ListPropertyEditor.ListView.SelectedObjects
Dim _OfferAskOut As OfferAskOut
_OfferAskOut = _ocur.FindObject(Of OfferAskOut)(CriteriaOperator.Parse("CustomersFrom=? AND Customers=? AND OfferAskOutState='eInProgress'", _
_ocur.GetObject(_OfferAskInRows.OfferAskIn.CustomersFrom), _ocur.GetObject(_CustomersQualification.Customers)))
If _OfferAskOut Is Nothing Then
_OfferAskOut = _ocur.CreateObject(Of OfferAskOut)()
_OfferAskOut.CustomersFrom = _ocur.GetObject(_OfferAskInRows.OfferAskIn.CustomersFrom)
_OfferAskOut.Customers = _ocur.GetObject(_CustomersQualification.Customers)
_OfferAskOut.OfferAskOutState = eOfferAskOutState.eInProgress
_OfferAskOut.JobNumberObjects = _ocur.GetObject(_OfferAskInRows.OfferAskIn.JobNumberObjects)
End If
_OfferAskOut.DateValid = _OfferAskInCreateOfferAskOutFromCustomersPopUp.DateValid
Dim _OfferAskOutRows As OfferAskOutRows = _ocur.CreateObject(Of OfferAskOutRows)()
_OfferAskOutRows.OfferAskOut = _ocur.GetObject(_OfferAskOut)
_OfferAskOutRows.Operations = _ocur.GetObjectByKey(Of Operations)(_OfferAskInCreateOfferAskOutFromCustomersPopUp.Operations.Oid)
Next
_ocur.CommitChanges()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
End Try
End Sub
End Class
@@ -0,0 +1,155 @@
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 eOfferAskOutState
eInProgress = 0 'Még dolgozunk rajta
eSent = 1 'Elküldük
End Enum
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False)> _
Public Class OfferAskOut 'Kimenõ ajánlatkérés fejléc
Inherits BaseObject
Private _CustomersFrom As CustomersFrom
Private _Customers As Customers
Private _Contacts As Contacts
Private _JobNumberObjects As JobNumberObjects
Private _DocumentNumber As String
Private _OfferAskOutState As eOfferAskOutState
Private _DateExecution As Date
Private _DateValid As Date
Private _ObjectCreated As Date
Private _UserCreated As User
Private _OfferAskIn As OfferAskIn
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 CustomersFrom As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
End Set
End Property
Property Customers As Customers
Get
Return _Customers
End Get
Set(value As Customers)
SetPropertyValue("Customers", _Customers, value)
End Set
End Property
Property Contacts As Contacts
Get
Return _Contacts
End Get
Set(value As Contacts)
SetPropertyValue("Contacts", _Contacts, value)
End Set
End Property
Property JobNumberObjects As JobNumberObjects
Get
Return _JobNumberObjects
End Get
Set(value As JobNumberObjects)
SetPropertyValue("JobNumberObjects", _JobNumberObjects, 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 OfferAskOutState As eOfferAskOutState
Get
Return _OfferAskOutState
End Get
Set(value As eOfferAskOutState)
SetPropertyValue("OfferAskOutState", _OfferAskOutState, 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 DateValid As Date
Get
Return _DateValid
End Get
Set(value As Date)
SetPropertyValue("DateValid", _DateValid, 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
Property OfferAskIn As OfferAskIn
Get
Return _OfferAskIn
End Get
Set(value As OfferAskIn)
SetPropertyValue("OfferAskIn", _OfferAskIn, value)
End Set
End Property
'//XPCollections
<Association("OfferAskOut-OfferAskOutRows", GetType(OfferAskOutRows)), VisibleInListView(False), VisibleInLookupListView(False)> _
ReadOnly Property OfferAskOutRows As XPCollection(Of OfferAskOutRows)
Get
Return GetCollection(Of OfferAskOutRows)("OfferAskOutRows")
End Get
End Property
<Association("OfferAskOut-OfferAskOutDocuments", GetType(OfferAskOutDocuments)), VisibleInListView(False), VisibleInLookupListView(False)> _
ReadOnly Property OfferAskOutDocuments As XPCollection(Of OfferAskOutDocuments)
Get
Return GetCollection(Of OfferAskOutDocuments)("OfferAskOutDocuments")
End Get
End Property
End Class
@@ -0,0 +1,41 @@
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 OfferAskOutDocuments
Inherits FileAttachmentBase
Private _OfferAskOut As OfferAskOut
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
<Association("OfferAskOut-OfferAskOutDocuments", GetType(OfferAskOut))> _
Property OfferAskOut As OfferAskOut
Get
Return _OfferAskOut
End Get
Set(value As OfferAskOut)
SetPropertyValue("OfferAskOut", _OfferAskOut, value)
End Set
End Property
End Class
@@ -0,0 +1,60 @@
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 OfferAskOutRows
Inherits BaseObject
Private _OfferAskOut As OfferAskOut 'Kimenõ árajánlat kérés fejléc
Private _Operations As Operations 'Mûvelet
Private _Description As String 'Megjegyzés
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
<Association("OfferAskOut-OfferAskOutRows", GetType(OfferAskOut))> _
Property OfferAskOut As OfferAskOut
Get
Return _OfferAskOut
End Get
Set(value As OfferAskOut)
SetPropertyValue("OfferAskOut", _OfferAskOut, value)
End Set
End Property
Property Operations As Operations
Get
Return _Operations
End Get
Set(value As Operations)
SetPropertyValue("Operations", _Operations, 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,69 @@
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 OfferBrowserHeader
Inherits BaseObject
Private _CustomersFrom As Customers
Private _ObjectCreated As Date
Private _UserCreated As User
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
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 CustomersFrom As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, 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
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
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False)> _
Public Class OfferBrowserRows
Inherits BaseObject
Private _JobNumberObjects As JobNumberObjects
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
End Class
@@ -0,0 +1,110 @@
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 eOfferEventsType
eOfferAskIn = 0
eOfferAskOut = 1
eOfferAnswerIn = 2
eOfferAnswerOut = 3
End Enum
<DefaultClassOptions(), NavigationItem(False), CreatableItem(False)> _
Public Class OfferEvents
Inherits BaseObject
Private _CustomersFrom As CustomersFrom
Private _Customers As Customers
Private _OfferEventsType As eOfferEventsType
Private _JobNumberObjects As JobNumberObjects
Private _Operations As Operations
Private _ObjectCreated As Date
Private _UserCreated As User
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
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 CustomersFrom As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
End Set
End Property
Property Customers As Customers
Get
Return _Customers
End Get
Set(value As Customers)
SetPropertyValue("Customers", _Customers, value)
End Set
End Property
Property OfferEventsType As eOfferEventsType
Get
Return _OfferEventsType
End Get
Set(value As eOfferEventsType)
SetPropertyValue("OfferEventsType", _OfferEventsType, value)
End Set
End Property
Property JobNumberObjects As JobNumberObjects
Get
Return _JobNumberObjects
End Get
Set(value As JobNumberObjects)
SetPropertyValue("JobNumberObjects", _JobNumberObjects, value)
End Set
End Property
Property Operations As Operations
Get
Return _Operations
End Get
Set(value As Operations)
SetPropertyValue("Operations", _Operations, 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
End Class
@@ -0,0 +1,39 @@
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 OperationGroups
Inherits BaseObject
Private _ShortName As String
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 ShortName As String
Get
Return _ShortName
End Get
Set(value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
End Class
@@ -0,0 +1,73 @@
Partial Class Operation_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.aCustomersQualitificationFromOperation = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aCustomersQualitificationFromCustomers = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
'
'aCustomersQualitificationFromOperation
'
Me.aCustomersQualitificationFromOperation.AcceptButtonCaption = Nothing
Me.aCustomersQualitificationFromOperation.CancelButtonCaption = Nothing
Me.aCustomersQualitificationFromOperation.Caption = "aCustomersQualitificationFromOperation"
Me.aCustomersQualitificationFromOperation.ConfirmationMessage = Nothing
Me.aCustomersQualitificationFromOperation.Id = "aCustomersQualitificationFromOperation"
Me.aCustomersQualitificationFromOperation.ImageName = Nothing
Me.aCustomersQualitificationFromOperation.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aCustomersQualitificationFromOperation.Shortcut = Nothing
Me.aCustomersQualitificationFromOperation.Tag = Nothing
Me.aCustomersQualitificationFromOperation.TargetObjectsCriteria = Nothing
Me.aCustomersQualitificationFromOperation.TargetObjectType = GetType(SISBusiness.[Module].Operations)
Me.aCustomersQualitificationFromOperation.TargetViewId = ""
Me.aCustomersQualitificationFromOperation.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aCustomersQualitificationFromOperation.ToolTip = Nothing
Me.aCustomersQualitificationFromOperation.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
'
'aCustomersQualitificationFromCustomers
'
Me.aCustomersQualitificationFromCustomers.AcceptButtonCaption = Nothing
Me.aCustomersQualitificationFromCustomers.CancelButtonCaption = Nothing
Me.aCustomersQualitificationFromCustomers.Caption = "aCustomersQualitificationFromCustomers"
Me.aCustomersQualitificationFromCustomers.ConfirmationMessage = Nothing
Me.aCustomersQualitificationFromCustomers.Id = "aCustomersQualitificationFromCustomers"
Me.aCustomersQualitificationFromCustomers.ImageName = Nothing
Me.aCustomersQualitificationFromCustomers.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aCustomersQualitificationFromCustomers.Shortcut = Nothing
Me.aCustomersQualitificationFromCustomers.Tag = Nothing
Me.aCustomersQualitificationFromCustomers.TargetObjectsCriteria = Nothing
Me.aCustomersQualitificationFromCustomers.TargetObjectType = GetType(SISBusiness.[Module].Customers)
Me.aCustomersQualitificationFromCustomers.TargetViewId = "Customers_ListView_Qualification"
Me.aCustomersQualitificationFromCustomers.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aCustomersQualitificationFromCustomers.ToolTip = Nothing
Me.aCustomersQualitificationFromCustomers.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
End Sub
Friend WithEvents aCustomersQualitificationFromOperation As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aCustomersQualitificationFromCustomers As DevExpress.ExpressApp.Actions.PopupWindowShowAction
End Class
@@ -0,0 +1,129 @@
<?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="aCustomersQualitificationFromOperation.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aCustomersQualitificationFromCustomers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>292, 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,124 @@
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
Public Class Operation_VC
Inherits DevExpress.ExpressApp.ViewController
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
Private Sub aCustomersQualitificationFromOperation_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aCustomersQualitificationFromOperation.CustomizePopupWindowParams
Try
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _CustomersQualificationPopUp As CustomersQualificationPopUp = _onew.CreateObject(Of CustomersQualificationPopUp)()
_CustomersQualificationPopUp.FromOperations = True
e.View = Application.CreateDetailView(_onew, "CustomersQualificationPopUp_DetailView", False, _CustomersQualificationPopUp)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
End Try
End Sub
Private Sub aCustomersQualitificationFromOperation_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aCustomersQualitificationFromOperation.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _CustomersQualificationPopUp As CustomersQualificationPopUp = TryCast(e.PopupWindow.View.SelectedObjects(0), CustomersQualificationPopUp)
Dim _Customers As Customers = _ocur.GetObjectByKey(Of Customers)(_CustomersQualificationPopUp.Customers.Oid)
If _Customers Is Nothing Then Throw New Exception("*Nincs kiválasztva minõsítendõ ügyfél!")
For Each _Operations As Operations In View.SelectedObjects
Dim _CustomersQualification As CustomersQualification = _ocur.FindObject(Of CustomersQualification)(CriteriaOperator.Parse("Customers=? AND Operations=?", _Customers, _Operations))
If _CustomersQualification Is Nothing Then
_CustomersQualification = _ocur.CreateObject(Of CustomersQualification)()
_CustomersQualification.Customers = _Customers
_CustomersQualification.Operations = _Operations
End If
If _CustomersQualificationPopUp.Change_Price Then
_CustomersQualification.Price = _CustomersQualificationPopUp.Price
End If
If _CustomersQualificationPopUp.Change_Quality Then
_CustomersQualification.Quality = _CustomersQualificationPopUp.Quality
End If
If _CustomersQualificationPopUp.Change_Speed Then
_CustomersQualification.Speed = _CustomersQualificationPopUp.Speed
End If
If _CustomersQualificationPopUp.Change_Other1 Then
_CustomersQualification.Other1 = _CustomersQualificationPopUp.Other1
End If
If _CustomersQualificationPopUp.Change_Other2 Then
_CustomersQualification.Other2 = _CustomersQualificationPopUp.Other2
End If
If _CustomersQualificationPopUp.Change_Other3 Then
_CustomersQualification.Other3 = _CustomersQualificationPopUp.Other3
End If
Next
_ocur.CommitChanges()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
End Try
End Sub
Private Sub aCustomersQualitificationFromCustomersQualitification_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aCustomersQualitificationFromCustomers.CustomizePopupWindowParams
Try
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _CustomersQualificationPopUp As CustomersQualificationPopUp = _onew.CreateObject(Of CustomersQualificationPopUp)()
_CustomersQualificationPopUp.FromCustomers = True
e.View = Application.CreateDetailView(_onew, "CustomersQualificationPopUp_DetailView", False, _CustomersQualificationPopUp)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
End Try
End Sub
Private Sub aCustomersQualitificationFromCustomersQualitification_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aCustomersQualitificationFromCustomers.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = View.ObjectSpace
Dim _CustomersQualificationPopUp As CustomersQualificationPopUp = TryCast(e.PopupWindow.View.SelectedObjects(0), CustomersQualificationPopUp)
Dim _Operations As Operations = _ocur.GetObjectByKey(Of Operations)(_CustomersQualificationPopUp.Operations.Oid)
If _Operations Is Nothing Then Throw New Exception("*Nincs kiválasztott mûvelet!")
For Each _Customers As Customers In View.SelectedObjects
Dim _CustomersQualification As CustomersQualification = _ocur.FindObject(Of CustomersQualification)(CriteriaOperator.Parse("Customers=? AND Operations=?", _Customers, _Operations))
If _CustomersQualification Is Nothing Then
_CustomersQualification = _ocur.CreateObject(Of CustomersQualification)()
_CustomersQualification.Customers = _Customers
_CustomersQualification.Operations = _Operations
End If
If _CustomersQualificationPopUp.Change_Price Then
_CustomersQualification.Price = _CustomersQualificationPopUp.Price
End If
If _CustomersQualificationPopUp.Change_Quality Then
_CustomersQualification.Quality = _CustomersQualificationPopUp.Quality
End If
If _CustomersQualificationPopUp.Change_Speed Then
_CustomersQualification.Speed = _CustomersQualificationPopUp.Speed
End If
If _CustomersQualificationPopUp.Change_Other1 Then
_CustomersQualification.Other1 = _CustomersQualificationPopUp.Other1
End If
If _CustomersQualificationPopUp.Change_Other2 Then
_CustomersQualification.Other2 = _CustomersQualificationPopUp.Other2
End If
If _CustomersQualificationPopUp.Change_Other3 Then
_CustomersQualification.Other3 = _CustomersQualificationPopUp.Other3
End If
Next
_ocur.CommitChanges()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
End Try
End Sub
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 Operations 'Mûveletek
Inherits BaseObject
Private _OperationGroups As OperationGroups
Private _ShortName As String
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
' Place here your initialization code.
End Sub
Property OperationGroups As OperationGroups
Get
Return _OperationGroups
End Get
Set(value As OperationGroups)
SetPropertyValue("OperationGroups", _OperationGroups, value)
End Set
End Property
<Size(255)> _
Property ShortName As String
Get
Return _ShortName
End Get
Set(value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
End Class
@@ -0,0 +1,189 @@
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)> _
<NonPersistent()> _
<Appearance("CustomertQualificationPopUp - Disable FromCustomers and FromOperations", AppearanceItemType.ViewItem, "1=1", TargetItems:="FromOperations;FromOperations", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("CustomertQualificationPopUp - Disable Customers when FromCustomers=True", AppearanceItemType.ViewItem, "FromCustomers=True", TargetItems:="Customers", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("CustomertQualificationPopUp - Disable Operations when FromOperations=True", AppearanceItemType.ViewItem, "FromOperations=True", TargetItems:="Operations", visibility:=Editors.ViewItemVisibility.Hide)> _
Public Class CustomersQualificationPopUp
Inherits BaseObject
Dim _FromCustomers As Boolean
Dim _FromOperations As Boolean
Dim _Customers As Customers
Dim _Operations As Operations
Dim _Change_Price As Boolean
Dim _Price As Long
Dim _Change_Speed As Boolean
Dim _Speed As Long
Dim _Change_Quality As Boolean
Dim _Quality As Long
Dim _Change_Other1 As Boolean
Dim _Other1 As Long
Dim _Change_Other2 As Boolean
Dim _Other2 As Long
Dim _Change_Other3 As Boolean
Dim _Other3 As Long
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
Change_Price = False
Change_Speed = False
Change_Quality = False
Change_Other1 = False
Change_Other2 = False
Change_Other3 = False
FromCustomers = False
FromOperations = False
End Sub
<ImmediatePostData()> _
<VisibleInDetailView(False)> _
<VisibleInListView(False)> _
Property FromCustomers As Boolean
Get
Return _FromCustomers
End Get
Set(value As Boolean)
SetPropertyValue("FromCustomers", _FromCustomers, value)
End Set
End Property
<ImmediatePostData()> _
<VisibleInDetailView(False)> _
<VisibleInListView(False)> _
Property FromOperations As Boolean
Get
Return _FromOperations
End Get
Set(value As Boolean)
SetPropertyValue("FromOperations", _FromOperations, value)
End Set
End Property
Property Customers As Customers
Get
Return _Customers
End Get
Set(value As Customers)
SetPropertyValue("Customers", _Customers, value)
End Set
End Property
Property Operations As Operations
Get
Return _Operations
End Get
Set(value As Operations)
SetPropertyValue("Operations", _Operations, value)
End Set
End Property
Property Change_Price As Boolean
Get
Return _Change_Price
End Get
Set(value As Boolean)
SetPropertyValue("Change_Price", _Change_Price, value)
End Set
End Property
Property Price As Long
Get
Return _Price
End Get
Set(value As Long)
SetPropertyValue("Price", _Price, value)
End Set
End Property
Property Change_Speed As Boolean
Get
Return _Change_Speed
End Get
Set(value As Boolean)
SetPropertyValue("Change_Speed", _Change_Speed, value)
End Set
End Property
Property Speed As Long
Get
Return _Speed
End Get
Set(value As Long)
SetPropertyValue("Speed", _Speed, value)
End Set
End Property
Property Change_Quality As Boolean
Get
Return _Change_Quality
End Get
Set(value As Boolean)
SetPropertyValue("Change_Quality", _Change_Quality, value)
End Set
End Property
Property Quality As Long
Get
Return _Quality
End Get
Set(value As Long)
SetPropertyValue("Quality", _Quality, value)
End Set
End Property
Property Change_Other1 As Boolean
Get
Return _Change_Other1
End Get
Set(value As Boolean)
SetPropertyValue("Change_Other1", _Change_Other1, value)
End Set
End Property
Property Other1 As Long
Get
Return _Other1
End Get
Set(value As Long)
SetPropertyValue("Other1", _Other1, value)
End Set
End Property
Property Change_Other2 As Boolean
Get
Return _Change_Other2
End Get
Set(value As Boolean)
SetPropertyValue("Change_Other2", _Change_Other2, value)
End Set
End Property
Property Other2 As Long
Get
Return _Other2
End Get
Set(value As Long)
SetPropertyValue("Other2", _Other2, value)
End Set
End Property
Property Change_Other3 As Boolean
Get
Return _Change_Other3
End Get
Set(value As Boolean)
SetPropertyValue("Change_Other3", _Change_Other3, value)
End Set
End Property
Property Other3 As Long
Get
Return _Other3
End Get
Set(value As Long)
SetPropertyValue("Other3", _Other3, value)
End Set
End Property
End Class
@@ -0,0 +1,54 @@
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)> _
<NonPersistent()> _
<Appearance("OfferAskInCreateOfferAskOutFromCustomersPopUp - Disable Operations", AppearanceItemType.ViewItem, "1=1", TargetItems:="Operations", visibility:=Editors.ViewItemVisibility.Hide)> _
Public Class OfferAskInCreateOfferAskOutFromCustomersPopUp
Inherits BaseObject
Private _DateValid As Date
Private _Operations As Operations
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
Property DateValid As Date
Get
Return _DateValid
End Get
Set(value As Date)
SetPropertyValue("DateValid", _DateValid, value)
End Set
End Property
Property Operations As Operations
Get
Return _Operations
End Get
Set(value As Operations)
SetPropertyValue("Operations", _Operations, value)
End Set
End Property
'------------ReadOnly------------
ReadOnly Property CustomersQualification As XPCollection(Of CustomersQualification)
Get
Return New XPCollection(Of CustomersQualification)(Session, CriteriaOperator.Parse("Operations=?", Me.Operations))
End Get
End Property
End Class
@@ -0,0 +1,45 @@
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 RecipeExecutionSimplePopupFrom
Inherits BaseObject
Property RecipeFrom As RecipeFrom
Property StorageComputed As StorageComputed
Property QTTNeed As Double
Property QTTDifferent As Double
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
End Class
<DefaultClassOptions()> _
<NonPersistent()> _
<NavigationItem(False), CreatableItem(False)> _
Public Class RecipeExecutionSimplePopupTo
Inherits BaseObject
Property RecipeTo As RecipeTo
Property StorageComputed As StorageComputed
Property QTTNeed As Double
Property QTTDifferent As Double
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,28 @@
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 RecipePopup
Inherits BaseObject
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
Property RowGroup1 As String 'Szöveges csoportosítás (nem kötelezõ)
Property Change_RowGroup1 As Boolean = False
Property RowGroup2 As String 'Szöveges másodlagos csoportosítás (nem kötelezõ)
Property Change_RowGroup2 As Boolean = False
End Class
@@ -0,0 +1,137 @@
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("BusinessStocks")> _
<Appearance("Recipe - Disable DocumentNumber", AppearanceItemType.ViewItem, "1=1", TargetItems:="DocumentNumber", Enabled:=False)> _
<Appearance("Recipe - Disable UserCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)> _
<Appearance("Recipe - Disable ObjectCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
Public Class Recipe 'Gygártási receptek
Inherits BaseObject
Private _RecipeType As RecipeType
Private _CustomersFrom As CustomersFrom 'Saját cég
Private _DocumentNumber As String 'Recept sorszáma
Private _ShortName As String 'Recept megnevezése
Private _Description As String 'Recept leírása
Private _UserCreated As User
Private _ObjectCreated As Date
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
If String.IsNullOrEmpty(DocumentNumber) Then
If RecipeType IsNot Nothing Then
If RecipeType.NumberGenerator IsNot Nothing Then
DocumentNumber = RecipeType.NumberGenerator.GetNewNumber(RecipeType.NumberGenerator)
End If
End If
End If
End Sub
<ImmediatePostData()> _
<RuleRequiredField("Recipe-RecipeType", DefaultContexts.Save)> _
Property RecipeType As RecipeType
Get
Return _RecipeType
End Get
Set(value As RecipeType)
SetPropertyValue("RecipeType", _RecipeType, value)
End Set
End Property
Property CustomersFrom As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, 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
<RuleRequiredField("Recipe-ShortName", DefaultContexts.Save)> _
Property ShortName As String
Get
Return _ShortName
End Get
Set(value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
Property Description As String
Get
Return _Description
End Get
Set(value As String)
SetPropertyValue("Description", _Description, value)
End Set
End Property
<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
<VisibleInListView(False)> _
<Association("Recipe-RecipeFrom", GetType(RecipeFrom))> _
ReadOnly Property RecipeFrom As XPCollection(Of RecipeFrom)
Get
Return GetCollection(Of RecipeFrom)("RecipeFrom")
End Get
End Property
<VisibleInListView(False)> _
<Association("Recipe-RecipeFromOther", GetType(RecipeFromOther))> _
ReadOnly Property RecipeFromOther As XPCollection(Of RecipeFromOther)
Get
Return GetCollection(Of RecipeFromOther)("RecipeFromOther")
End Get
End Property
<VisibleInListView(False)> _
<Association("Recipe-RecipeTo", GetType(RecipeTo))> _
ReadOnly Property RecipeTo As XPCollection(Of RecipeTo)
Get
Return GetCollection(Of RecipeTo)("RecipeTo")
End Get
End Property
<VisibleInListView(False)> _
<Association("Recipe-RecipeToOther", GetType(RecipeToOther))> _
ReadOnly Property RecipeToOther As XPCollection(Of RecipeToOther)
Get
Return GetCollection(Of RecipeToOther)("RecipeToOther")
End Get
End Property
End Class
@@ -0,0 +1,219 @@
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()> _
<CreatableItem(False)> _
<NavigationItem("BusinessTransactions")> _
<Appearance("RecipeExecutionSimple - Disable DocumentNumber", AppearanceItemType.ViewItem, "1=1", TargetItems:="DocumentNumber", Enabled:=False)> _
<Appearance("RecipeExecutionSimple - Disable UserCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)> _
<Appearance("RecipeExecutionSimple - Disable ObjectCreated", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
Public Class RecipeExecutionSimple
Inherits BaseObject
Private _RecipeExecutionSimpleType As RecipeExecutionSimpleType
Private _CustomersFrom As CustomersFrom
Private _DocumentNumber As String
Private _ShortName As String
Private _Recipe As Recipe
Private _QTT As Double
Private _IsEditable As Boolean = True
Private _IsStorno As Boolean = False
Private _UserCreated As User
Private _ObjectCreated As Date
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
If String.IsNullOrEmpty(Me.DocumentNumber) Then
DocumentNumber = RecipeExecutionSimpleType.NumberGenerator.GetNewNumber(RecipeExecutionSimpleType.NumberGenerator)
End If
End Sub
Property RecipeExecutionSimpleType As RecipeExecutionSimpleType
Get
Return _RecipeExecutionSimpleType
End Get
Set(value As RecipeExecutionSimpleType)
SetPropertyValue("RecipeExecutionSimpleType", _RecipeExecutionSimpleType, value)
End Set
End Property
Property CustomersFrom As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, 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 ShortName As String
Get
Return _ShortName
End Get
Set(value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
<ImmediatePostData()> _
Property Recipe As Recipe
Get
Return _Recipe
End Get
Set(value As Recipe)
SetPropertyValue("Recipe", _Recipe, value)
If Not Session.IsObjectsLoading And Not Session.IsObjectsSaving Then
If value IsNot Nothing Then
ListPriceControls(value)
End If
End If
End Set
End Property
Property QTT As Double
Get
Return _QTT
End Get
Set(value As Double)
SetPropertyValue("QTT", _QTT, value)
End Set
End Property
Property IsEditable As Boolean
Get
Return _IsEditable
End Get
Set(value As Boolean)
SetPropertyValue("IsEditable", _IsEditable, value)
End Set
End Property
Property IsStorno As Boolean
Get
Return _IsStorno
End Get
Set(value As Boolean)
SetPropertyValue("IsStorno", _IsStorno, 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
Private Sub ListPriceControls(ByVal _Recipe As Recipe)
Dim _RecipeFrom As RecipeFrom
Dim _RecipeTo As RecipeTo
Dim _RecipeFrom_other As RecipeFromOther
Dim _RecipeTo_other As RecipeToOther
Dim _check_From_HUF As Double = 0
Dim _check_To_HUF As Double = 0
Dim _check_From_DEV As Double = 0
Dim _check_To_DEV As Double = 0
Dim _check_From_HUF_other As Double = 0
Dim _check_To_HUF_other As Double = 0
Dim _check_From_DEV_other As Double = 0
Dim _check_To_DEV_other As Double = 0
Dim _i As Integer = 0
Dim Products_from As Products
Dim Products_to As Products
'-------- Normál gyártás --------------
For Each _RecipeFrom In _Recipe.RecipeFrom
If _RecipeFrom IsNot Nothing Then
Products_from = TryCast(_RecipeFrom.Products, Products)
_i += 1
_check_From_HUF += _RecipeFrom.QTT * _RecipeFrom.ListPriceHUF
_check_From_DEV += _RecipeFrom.QTT * _RecipeFrom.ListPriceDEV
End If
Next
For Each _RecipeTo In _Recipe.RecipeTo
If _RecipeTo IsNot Nothing Then
Products_to = TryCast(_RecipeTo.Products, Products)
_check_To_HUF += _RecipeTo.QTT * _RecipeTo.ListPriceHUF
_check_To_DEV += _RecipeTo.QTT * _RecipeTo.ListPriceDEV
End If
Next
If Not _check_From_HUF < _check_To_HUF And Not _check_From_HUF = _check_To_HUF Then
MsgBox("Az összesített listaár 'HUF' értékek nem egyeznek!", MsgBoxStyle.OkOnly, "Figyelem, ellenõrzés!")
End If
If Not _check_From_DEV < _check_To_DEV And Not _check_From_DEV = _check_To_DEV Then
MsgBox("Az összesített listaár 'DEV' értékek nem egyeznek!", MsgBoxStyle.OkOnly, "Figyelem, ellenõrzés!")
End If
'-------- Egyéb gyártás --------------
For Each _RecipeFrom_other In _Recipe.RecipeFromOther
If _RecipeFrom_other IsNot Nothing Then
_check_From_HUF_other += _RecipeFrom_other.QTT * _RecipeFrom_other.ListPriceHUF
_check_From_DEV_other += _RecipeFrom_other.QTT * _RecipeFrom_other.ListPriceDEV
End If
Next
For Each _RecipeTo_other In _Recipe.RecipeToOther
If _RecipeTo_other IsNot Nothing Then
_check_To_HUF_other += _RecipeTo_other.QTT * _RecipeTo_other.ListPriceHUF
_check_To_DEV_other += _RecipeTo_other.QTT * _RecipeTo_other.ListPriceDEV
End If
Next
If Not _check_From_HUF_other < _check_To_HUF_other And Not _check_From_HUF_other = _check_To_HUF_other Then
MsgBox("Az 'Egyéb temékek' összesített listaár 'HUF' értékek nem egyeznek!", MsgBoxStyle.OkOnly, "Figyelem, ellenõrzés!")
End If
If Not _check_From_DEV_other < _check_To_DEV_other And Not _check_From_DEV_other = _check_To_DEV_other Then
MsgBox("Az 'Egyéb temékek' összesített listaár 'DEV' értékek nem egyeznek!", MsgBoxStyle.OkOnly, "Figyelem, ellenõrzés!")
End If
_check_From_HUF = 0
_check_To_HUF = 0
_check_From_DEV = 0
_check_To_DEV = 0
'------------------
_check_From_HUF_other = 0
_check_To_HUF_other = 0
_check_From_DEV_other = 0
_check_To_DEV_other = 0
End Sub
End Class
@@ -0,0 +1,73 @@
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("BusinessStocks")> _
Public Class RecipeExecutionSimpleType
Inherits BaseObject
Private _CustomersFrom As CustomersFrom
Private _ShortName As String
Private _Description As String
Private _NumberGenerator As NumberGenerator
Private _StorageMoveType As StorageMoveType
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<RuleRequiredField("RecipeExecutionSimpleType - CustomersFrom", DefaultContexts.Save)> _
Property CustomersFrom As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
End Set
End Property
Property ShortName As String
Get
Return _ShortName
End Get
Set(value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
Property Description As String
Get
Return _Description
End Get
Set(value As String)
SetPropertyValue("Description", _Description, value)
End Set
End Property
<RuleRequiredField("RecipeExecutionSimpleType - NumberGenerator", DefaultContexts.Save)> _
Property NumberGenerator As NumberGenerator
Get
Return _NumberGenerator
End Get
Set(value As NumberGenerator)
SetPropertyValue("NumberGenerator", _NumberGenerator, value)
End Set
End Property
<DataSourceCriteria("MoveType=5")> _
Property StorageMoveType As StorageMoveType
Get
Return _StorageMoveType
End Get
Set(value As StorageMoveType)
SetPropertyValue("StorageMoveType", _StorageMoveType, value)
End Set
End Property
End Class
@@ -0,0 +1,57 @@
Partial Class RecipeExecutionSimpleVC
<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.aRecipeExecutionFrom = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aRecipeExecutionTo = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
'
'aRecipeExecutionFrom
'
Me.aRecipeExecutionFrom.AcceptButtonCaption = Nothing
Me.aRecipeExecutionFrom.CancelButtonCaption = Nothing
Me.aRecipeExecutionFrom.Caption = "Recipe Execution From"
Me.aRecipeExecutionFrom.Category = "ObjectsCreation"
Me.aRecipeExecutionFrom.Id = "aRecipeExecutionFrom"
Me.aRecipeExecutionFrom.TargetViewId = "RecipeExecutionSimple_DetailView"
Me.aRecipeExecutionFrom.ToolTip = Nothing
'
'aRecipeExecutionTo
'
Me.aRecipeExecutionTo.AcceptButtonCaption = Nothing
Me.aRecipeExecutionTo.CancelButtonCaption = Nothing
Me.aRecipeExecutionTo.Caption = "aRecipeExecutionTo"
Me.aRecipeExecutionTo.Category = "ObjectsCreation"
Me.aRecipeExecutionTo.Id = "aRecipeExecutionTo"
Me.aRecipeExecutionTo.TargetViewId = "RecipeExecutionSimple_DetailView"
Me.aRecipeExecutionTo.ToolTip = Nothing
End Sub
Friend WithEvents aRecipeExecutionFrom As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aRecipeExecutionTo As DevExpress.ExpressApp.Actions.PopupWindowShowAction
End Class
@@ -0,0 +1,129 @@
<?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="aRecipeExecutionFrom.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aRecipeExecutionTo.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>221, 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,703 @@
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.Xpo
Imports DevExpress.ExpressApp.Utils
Imports DevExpress.Persistent.BaseImpl
Public Class RecipeExecutionSimpleVC
Inherits DevExpress.ExpressApp.ViewController
Dim _RecipeExecutionFrom_Collection As New ArrayList
Dim _RecipeExecutionTo_Collection As New ArrayList
Dim _VaildData As Boolean = True
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
If View.Id = "RecipeTo_ListView" Then
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
End If
If View.Id = "RecipeFrom_ListView" Then
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", False)
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id = "RecipeTo_ListView" Then
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
End If
If View.Id = "RecipeFrom_ListView" Then
Frame.GetController(Of DevExpress.ExpressApp.SystemModule.LinkUnlinkController)().Active.SetItemValue("", True)
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
End If
End Sub
Private Sub aRecipeExecutionFrom_CustomizePopupWindowParams(sender As System.Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aRecipeExecutionFrom.CustomizePopupWindowParams
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _RecipeExecutionSimple As RecipeExecutionSimple = TryCast(View.SelectedObjects(0), RecipeExecutionSimple)
Dim _CS As CollectionSource = New CollectionSource(_onew, GetType(RecipeExecutionSimplePopupFrom))
_RecipeExecutionFrom_Collection.Clear()
Dim _RecipeExecutionSimplePopupFrom As RecipeExecutionSimplePopupFrom
For Each _RecipeFrom In _RecipeExecutionSimple.Recipe.RecipeFrom
_RecipeExecutionSimplePopupFrom = _onew.CreateObject(Of RecipeExecutionSimplePopupFrom)()
_RecipeExecutionSimplePopupFrom.RecipeFrom = _onew.GetObject(_RecipeFrom)
_RecipeExecutionSimplePopupFrom.StorageComputed = _onew.FindObject(Of StorageComputed) _
(CriteriaOperator.Parse("Products=? And Storage=?", _onew.GetObject(_RecipeFrom.Products), _onew.GetObject(_RecipeFrom.Storage)))
If _RecipeExecutionSimplePopupFrom.StorageComputed Is Nothing Then
_VaildData = False
Else
_RecipeExecutionSimplePopupFrom.QTTNeed = _RecipeExecutionSimple.QTT * _RecipeFrom.QTT
_RecipeExecutionSimplePopupFrom.QTTDifferent = _RecipeExecutionSimplePopupFrom.StorageComputed.QTTFree - _RecipeExecutionSimplePopupFrom.QTTNeed
If _RecipeExecutionSimplePopupFrom.QTTDifferent < 0 Then
_VaildData = False
End If
_RecipeExecutionFrom_Collection.Add(_RecipeExecutionSimplePopupFrom)
_CS.Add(_RecipeExecutionSimplePopupFrom)
End If
Next
e.View = Application.CreateListView("RecipeExecutionSimplePopupFrom_ListView", _CS, False)
End Sub
Private Sub aRecipeExecutionFrom_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aRecipeExecutionFrom.Execute
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _uow_lock As New UnitOfWork(_onew.Session.DataLayer)
Dim _User As User = _onew.GetObject(TryCast(SecuritySystem.CurrentUser, User))
Try
If _VaildData = False Then Throw New UserFriendlyException("Nem kivitelezhetõ a gyártás, mert egy vagy több alapanyag nem áll rendelkezésre!")
'--==Zárolás==--
'____________________________________________________________________________________________________________________
If Not LockingModule.LockObject(_uow_lock, GetType(StorageComputed), "-", _User) Then
Dim _LockingObject As LockingObject = _onew.FindObject(Of LockingObject)(CriteriaOperator.Parse("TableName=?", GetType(StorageComputed).Name + "-" + "-"))
Dim _Prompt As String = DevExpress.ExpressApp.Utils.CaptionHelper.GetLocalizedText("Exceptions\SISBusinessExceptions\StorageComputed", "CanNotStorageInByLocking")
Dim _Title As String = DevExpress.ExpressApp.Utils.CaptionHelper.GetLocalizedText("Exceptions\SISBusinessExceptions", "MsgBoxError")
MsgBox(String.Format(_Prompt, _LockingObject.User.FullName, _LockingObject.ObjectCreated), MsgBoxStyle.Information + MsgBoxStyle.OkOnly, _Title)
Exit Sub
Else
Dim _RecipeExecutionSimple As RecipeExecutionSimple = TryCast(View.SelectedObjects(0), RecipeExecutionSimple)
'----------------------------------------------------------
'Raktárak feltérképezése, kitárolási fejléc(ek) összerakása
'----------------------------------------------------------
Dim _StorageOutHeader_Collection As New ArrayList '<== Kitároláso fejlécEK kollekciója, annyi kitárolási fejléc, AHÁNY KÜLÖNBÖZÕ raktár van!!!
For Each _RecipeFrom As RecipeFrom In _RecipeExecutionSimple.Recipe.RecipeFrom
If _StorageOutHeader_Collection.Count = 0 Then
Dim _StorageOutHeader As New StorageOutHeader(_ocur.Session)
With _StorageOutHeader
.Storage = _ocur.GetObjectByKey(Of Storage)(_RecipeFrom.Storage.Oid)
.CustomersFrom = _ocur.GetObjectByKey(Of CustomersFrom)(_RecipeExecutionSimple.CustomersFrom.Oid)
.RecipeExecutionSimple = _RecipeExecutionSimple
.Customers = _ocur.GetObjectByKey(Of Customers)(TryCast(.Storage.CustomersFrom, Customers).Oid)
.StorageMoveType = _ocur.GetObject(_RecipeExecutionSimple.RecipeExecutionSimpleType.StorageMoveType)
End With
_StorageOutHeader_Collection.Add(_StorageOutHeader)
Else
For Each _StorageOutHeaderExist As StorageOutHeader In _StorageOutHeader_Collection
Dim _NewStorage As Boolean = False
If _StorageOutHeaderExist.Storage.Oid <> _RecipeFrom.Storage.Oid Then
_NewStorage = True
End If
If _NewStorage Then
Dim _StorageOutHeader As New StorageOutHeader(_ocur.Session)
With _StorageOutHeader
.Storage = _ocur.GetObjectByKey(Of Storage)(_RecipeFrom.Storage.Oid)
.Customers = _ocur.GetObjectByKey(Of CustomersFrom)(_RecipeExecutionSimple.CustomersFrom.Oid)
.RecipeExecutionSimple = _RecipeExecutionSimple
.Customers = _ocur.GetObjectByKey(Of Customers)(TryCast(.Storage.CustomersFrom, Customers))
.StorageMoveType = _ocur.GetObject(_RecipeExecutionSimple.RecipeExecutionSimpleType.StorageMoveType)
End With
_StorageOutHeader_Collection.Add(_StorageOutHeader)
End If
Exit For
Next
End If
Next
'----------------------------------------------------------
'Kitárolási sorok kitárolási fejlécekzeh rendelése, StorageComputed toszingálás
'----------------------------------------------------------
For Each _StorageOutHeader As StorageOutHeader In _StorageOutHeader_Collection
For Each _RecipeFrom As RecipeFrom In _RecipeExecutionSimple.Recipe.RecipeFrom
If _RecipeFrom.Storage.Oid = _StorageOutHeader.Storage.Oid Then
Dim _StorageOutRows As New StorageOutRows(_ocur.Session)
With _StorageOutRows
.StorageOutHeader = _StorageOutHeader
.RowIndex = _StorageOutHeader.StorageOutRows.Count
.Products = _ocur.GetObjectByKey(Of Products)(_RecipeFrom.Products.Oid)
End With
Dim _StorageInRows_Collection As New XPCollection(Of StorageInRows)(PersistentCriteriaEvaluationBehavior.InTransaction, _ocur.Session, _
CriteriaOperator.Parse("StorageInHeader.Storage=? and StorageInHeader.IsEditable=False and StorageInHeader.IsStorno=False and Products=?", _
_StorageOutHeader.Storage, _ocur.GetObjectByKey(Of Products)(_RecipeFrom.Products.Oid)))
_StorageInRows_Collection.Sorting.Add(New SortProperty("StorageInHeader.CreateDate", DB.SortingDirection.Ascending))
Dim _QTT_Mod As Double = _RecipeFrom.QTT * _RecipeExecutionSimple.QTT
For Each _StorageInRows As StorageInRows In _StorageInRows_Collection
Dim _QTT_Free As Double = _StorageInRows.QTT - _StorageInRows.QTT_Out - _StorageInRows.QTT_Out_Will
If _QTT_Free > 0 Then
If _QTT_Free < _QTT_Mod Then
_StorageInRows.QTT_Out_Will += _QTT_Free
_StorageOutRows.QTT_Will += _QTT_Free
_QTT_Mod -= _QTT_Free
'------- FIFO sor beszúrása
Dim _StorageOutRowsInRows As StorageOutRowsInRows = _ocur.FindObject(Of StorageOutRowsInRows)(CriteriaOperator.Parse("StorageInRows=? and StorageOutRows=?", _
_StorageInRows, _StorageOutRows), True)
If _StorageOutRowsInRows IsNot Nothing Then
_StorageOutRowsInRows.QTT += _QTT_Free
Else
_StorageOutRowsInRows = New StorageOutRowsInRows(_ocur.Session)
_StorageOutRowsInRows.StorageInRows = _StorageInRows
_StorageOutRowsInRows.StorageOutRows = _StorageOutRows
_StorageOutRowsInRows.QTT = _QTT_Free
End If
Else
_StorageInRows.QTT_Out_Will += _QTT_Mod
_StorageOutRows.QTT_Will += _QTT_Mod
'------- FIFO sor beszúrása
Dim _StorageOutRowsInRows As StorageOutRowsInRows = _ocur.FindObject(Of StorageOutRowsInRows)(CriteriaOperator.Parse("StorageInRows=? and StorageOutRows=?", _
_StorageInRows, _StorageOutRows), True)
If _StorageOutRowsInRows IsNot Nothing Then
_StorageOutRowsInRows.QTT += _QTT_Mod
Else
_StorageOutRowsInRows = New StorageOutRowsInRows(_ocur.Session)
_StorageOutRowsInRows.StorageInRows = _StorageInRows
_StorageOutRowsInRows.StorageOutRows = _StorageOutRows
_StorageOutRowsInRows.QTT = _QTT_Mod
End If
Exit For
End If
End If
Next
Dim _StorageComputed As StorageComputed = _ocur.FindObject(Of StorageComputed)(CriteriaOperator.Parse("Storage=? and Products=?", _
_StorageOutHeader.Storage, _ocur.GetObjectByKey(Of Products)(_RecipeFrom.Products.Oid)), True)
Dim _QTT_ReservedOut As Double = _StorageComputed.QTTReservedOut
Dim _QTT_Will_Out As Double = 0
Dim _StorageOutRows_Collection_R As New XPCollection(Of StorageOutRows)(PersistentCriteriaEvaluationBehavior.InTransaction, _ocur.Session, _
CriteriaOperator.Parse("QTT_Will>0 and StorageOutHeader.Storage=? and Products=?", _StorageOutHeader.Storage, _ocur.GetObjectByKey(Of Products)(_RecipeFrom.Products.Oid)))
For Each _StorageOutRows_R In _StorageOutRows_Collection_R
_QTT_Will_Out += _StorageOutRows_R.QTT_Will
Next
_StorageComputed.QTTFree = _StorageComputed.QTTFree - (_QTT_Will_Out - _QTT_ReservedOut)
_StorageComputed.QTTReservedOut = _QTT_Will_Out
End If
Next
Next
'----------------------------------------------------------
'Kitárolás(ok) véglegesítése, mozgástábla, StorageComputed baszogatás
'----------------------------------------------------------
For Each _StorageOutHeader As StorageOutHeader In _StorageOutHeader_Collection
_StorageOutHeader.IsEditable = False
_StorageOutHeader.IsFinalized = True
For Each _StorageOutRows As StorageOutRows In _StorageOutHeader.StorageOutRows
Dim _StorageOutRowsInRows_Collection As New XPCollection(Of StorageOutRowsInRows)(PersistentCriteriaEvaluationBehavior.InTransaction, _ocur.Session, _
CriteriaOperator.Parse("StorageOutRows=?", _StorageOutRows))
For Each _StorageOutRowsInRows In _StorageOutRowsInRows_Collection
If _StorageOutRowsInRows.QTT > 0 Then
Dim _StorageMoveEvents_Collection As New XPCollection(Of StorageMoveEvents)(PersistentCriteriaEvaluationBehavior.InTransaction, _ocur.Session, _
CriteriaOperator.Parse("StorageInRows=?", _StorageOutRowsInRows.StorageInRows))
_StorageMoveEvents_Collection.Sorting.Add(New SortProperty("ObjectCreated", DB.SortingDirection.Descending))
_StorageOutRowsInRows.StorageInRows.QTT_Out += _StorageOutRowsInRows.QTT
_StorageOutRowsInRows.StorageInRows.QTT_Out_Will -= _StorageOutRowsInRows.QTT
Dim _StorageMoveEvents As New StorageMoveEvents(_ocur.Session)
_StorageMoveEvents.StorageInRows = _StorageOutRowsInRows.StorageInRows
_StorageMoveEvents.StorageOutRows = _StorageOutRowsInRows.StorageOutRows
If _StorageMoveEvents_Collection.Count > 0 Then
_StorageMoveEvents.QTT_Free_Before = _StorageMoveEvents_Collection(0).QTT_Free_After
Else
_StorageMoveEvents.QTT_Free_Before = 0
End If
_StorageMoveEvents.QTT = (-1) * _StorageOutRowsInRows.QTT
_StorageMoveEvents.QTT_Free_After = _StorageMoveEvents.QTT_Free_Before + _StorageMoveEvents.QTT
_StorageMoveEvents.MoveEventsType = eMoveEventsType.StorageOutFinal
_StorageMoveEvents.ExecutionDate = _StorageOutRowsInRows.StorageOutRows.StorageOutHeader.CreateDate
End If
Next
_StorageOutRows.QTT += _StorageOutRows.QTT_Will
Dim _StorageComputed As StorageComputed = _ocur.FindObject(Of StorageComputed)(CriteriaOperator.Parse("Products=? and Storage=?", _
_StorageOutRows.Products, _StorageOutRows.StorageOutHeader.Storage), True)
_StorageComputed.QTTReservedOut -= _StorageOutRows.QTT_Will
_StorageOutRows.QTT_Will = 0
Next
Next
'----------------------------------------------------------
'Betárolás raktár(ak)ba
'----------------------------------------------------------
Dim _StorageInHeader_Collection As New ArrayList
For Each _RecipeTo As RecipeTo In _RecipeExecutionSimple.Recipe.RecipeTo
If _StorageInHeader_Collection.Count = 0 Then
Dim _StorageInHeader As New StorageInHeader(_ocur.Session)
With _StorageInHeader
.Storage = _ocur.GetObjectByKey(Of Storage)(_RecipeTo.Storage.Oid)
.RecipeExecutionSimple = _RecipeExecutionSimple
.IsEditable = False
.StorageMoveType = _ocur.GetObject(_RecipeExecutionSimple.RecipeExecutionSimpleType.StorageMoveType)
End With
_StorageInHeader_Collection.Add(_StorageInHeader)
Else
For Each _StorageInHeaderExist As StorageInHeader In _StorageInHeader_Collection
Dim _NewStorage As Boolean = False
If _StorageInHeaderExist.Storage.Oid <> _RecipeTo.Storage.Oid Then
_NewStorage = True
End If
If _NewStorage Then
Dim _StorageInHeader As New StorageInHeader(_ocur.Session)
With _StorageInHeader
.Storage = _onew.GetObjectByKey(Of Storage)(_RecipeTo.Storage.Oid)
.RecipeExecutionSimple = _RecipeExecutionSimple
.IsEditable = False
.StorageMoveType = _ocur.GetObject(_RecipeExecutionSimple.RecipeExecutionSimpleType.StorageMoveType)
End With
_StorageInHeader_Collection.Add(_StorageInHeader)
Exit For
End If
Next
End If
Next
For Each _RecipeTo As RecipeTo In _RecipeExecutionSimple.Recipe.RecipeTo
For Each _StorageInHeader As StorageInHeader In _StorageInHeader_Collection
If _RecipeTo.Storage.Oid = _StorageInHeader.Storage.Oid Then
Dim _StorageInRows As New StorageInRows(_ocur.Session)
With _StorageInRows
.StorageInHeader = _StorageInHeader
.Products = _RecipeTo.Products
.QTT_Will = _RecipeTo.QTT * _RecipeExecutionSimple.QTT
.RowIndex = _StorageInHeader.StorageInRows.Count
.AveragePriceInHUF = _RecipeTo.ListPriceHUF
End With
Dim _StorageComputed As StorageComputed = _ocur.FindObject(Of StorageComputed)(CriteriaOperator.Parse("Products=? and Storage=?", _
_RecipeTo.Products, _StorageInHeader.Storage))
If _StorageComputed Is Nothing Then
_StorageComputed = New StorageComputed(_ocur.Session)
With _StorageComputed
.Storage = _StorageInHeader.Storage
.Products = _RecipeTo.Products
.QTTReservedIn = _RecipeTo.QTT * _RecipeExecutionSimple.QTT
End With
Else
_StorageComputed.QTTReservedIn += _RecipeTo.QTT * _RecipeExecutionSimple.QTT
End If
End If
Next
Next
'----------------------------------------------------------
'Betárolás(ok) véglegeítése
'----------------------------------------------------------
For Each _StorageInHeader As StorageInHeader In _StorageInHeader_Collection
_StorageInHeader.IsEditable = False
_StorageInHeader.IsFinalized = True
For Each _StorageInRows As StorageInRows In _StorageInHeader.StorageInRows
Dim _StorageComputed As StorageComputed = _ocur.FindObject(Of StorageComputed)(CriteriaOperator.Parse("Products=? and Storage=?", _
_ocur.GetObject(_StorageInRows.Products), _ocur.GetObject(_StorageInHeader.Storage)))
Dim _StorageMoveEvents As New StorageMoveEvents(_ocur.Session)
If _StorageInRows.QTT_Will > 0 Then
_StorageInRows.QTT = _StorageInRows.QTT_Will
_StorageComputed.QTTFree += _StorageInRows.QTT_Will
_StorageComputed.QTTReservedIn -= _StorageInRows.QTT_Will
_StorageMoveEvents.StorageInRows = _ocur.GetObject(_StorageInRows)
_StorageMoveEvents.QTT = _StorageInRows.QTT_Will
_StorageMoveEvents.QTT_Free_After = _StorageComputed.QTTFree
_StorageMoveEvents.QTT_Free_Before = _StorageMoveEvents.QTT_Free_After - _StorageMoveEvents.QTT
_StorageMoveEvents.MoveEventsType = eMoveEventsType.StorageInFinal
_StorageMoveEvents.ExecutionDate = _StorageInRows.StorageInHeader.CreateDate
_StorageInRows.QTT_Will = 0
End If
Next
Next
_ocur.CommitChanges()
'----------------------------------------------------------
'Nyomtatványok
'----------------------------------------------------------
For Each _StorageOutHeader As StorageOutHeader In _StorageOutHeader_Collection
Dim _ReportData As ReportData = _onew.FindObject(Of ReportData)(CriteriaOperator.Parse("Oid=?", _StorageOutHeader.Storage.ReportOut.Oid), True)
If _ReportData IsNot Nothing Then
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("StorageOutRows.StorageOutHeader.DocumentNumber=?", _StorageOutHeader.DocumentNumber), True)
End If
Next
For Each _StorageInHeader As StorageInHeader In _StorageInHeader_Collection
Dim _ReportData As ReportData = _onew.FindObject(Of ReportData)(CriteriaOperator.Parse("Oid=?", _StorageInHeader.Storage.ReportIn.Oid), True)
If _ReportData IsNot Nothing Then
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("StorageInHeader.DocumentNumber =?", _StorageInHeader.DocumentNumber), True)
End If
Next
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\SISBusinessExceptions", "MsgBoxCheckItAgain")))
Finally
LockingModule.UnLockObject(_uow_lock, GetType(StorageComputed), "-", _User)
End Try
End Sub
Private Sub aRecipeExecutionTo_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aRecipeExecutionTo.CustomizePopupWindowParams
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _RecipeExecutionSimple As RecipeExecutionSimple = TryCast(View.SelectedObjects(0), RecipeExecutionSimple)
Dim _CS As CollectionSource = New CollectionSource(_onew, GetType(RecipeExecutionSimplePopupTo))
_RecipeExecutionTo_Collection.Clear()
Dim _RecipeExecutionSimplePopupTo As RecipeExecutionSimplePopupTo
For Each _RecipeTo In _RecipeExecutionSimple.Recipe.RecipeTo
_RecipeExecutionSimplePopupTo = _onew.CreateObject(Of RecipeExecutionSimplePopupTo)()
_RecipeExecutionSimplePopupTo.RecipeTo = _onew.GetObject(_RecipeTo)
_RecipeExecutionSimplePopupTo.StorageComputed = _onew.FindObject(Of StorageComputed) _
(CriteriaOperator.Parse("Products=? And Storage=?", _onew.GetObject(_RecipeTo.Products), _onew.GetObject(_RecipeTo.Storage)))
_RecipeExecutionSimplePopupTo.QTTNeed = _RecipeExecutionSimple.QTT * _RecipeTo.QTT
_RecipeExecutionSimplePopupTo.QTTDifferent = _RecipeExecutionSimplePopupTo.StorageComputed.QTTFree - _RecipeExecutionSimplePopupTo.QTTNeed
If _RecipeExecutionSimplePopupTo.QTTDifferent < 0 Then
_VaildData = False
End If
_RecipeExecutionTo_Collection.Add(_RecipeExecutionSimplePopupTo)
_CS.Add(_RecipeExecutionSimplePopupTo)
Next
e.View = Application.CreateListView("RecipeExecutionSimplePopupTo_ListView", _CS, False)
End Sub
Private Sub aRecipeExecutionTo_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aRecipeExecutionTo.Execute
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _uow_lock As New UnitOfWork(_onew.Session.DataLayer)
Dim _User As User = _onew.GetObject(TryCast(SecuritySystem.CurrentUser, User))
Try
If _VaildData = False Then Throw New UserFriendlyException("Nem kivitelezhetõ a gyártás, mert egy vagy több alapanyag nem áll rendelkezésre!")
'--==Zárolás==--
'____________________________________________________________________________________________________________________
If Not LockingModule.LockObject(_uow_lock, GetType(StorageComputed), "-", _User) Then
Dim _LockingObject As LockingObject = _onew.FindObject(Of LockingObject)(CriteriaOperator.Parse("TableName=?", GetType(StorageComputed).Name + "-" + "-"))
Dim _Prompt As String = DevExpress.ExpressApp.Utils.CaptionHelper.GetLocalizedText("Exceptions\SISBusinessExceptions\StorageComputed", "CanNotStorageInByLocking")
Dim _Title As String = DevExpress.ExpressApp.Utils.CaptionHelper.GetLocalizedText("Exceptions\SISBusinessExceptions", "MsgBoxError")
MsgBox(String.Format(_Prompt, _LockingObject.User.FullName, _LockingObject.ObjectCreated), MsgBoxStyle.Information + MsgBoxStyle.OkOnly, _Title)
Exit Sub
Else
Dim _RecipeExecutionSimple As RecipeExecutionSimple = TryCast(View.SelectedObjects(0), RecipeExecutionSimple)
'----------------------------------------------------------
'Raktárak feltérképezése, kitárolási fejléc(ek) összerakása
'----------------------------------------------------------
Dim _StorageOutHeader_Collection As New ArrayList '<== Kitároláso fejlécEK kollekciója, annyi kitárolási fejléc, AHÁNY KÜLÖNBÖZÕ raktár van!!!
For Each _RecipeTo As RecipeTo In _RecipeExecutionSimple.Recipe.RecipeTo
If _StorageOutHeader_Collection.Count = 0 Then
Dim _StorageOutHeader As New StorageOutHeader(_ocur.Session)
With _StorageOutHeader
.Storage = _ocur.GetObjectByKey(Of Storage)(_RecipeTo.Storage.Oid)
.CustomersFrom = _ocur.GetObjectByKey(Of CustomersFrom)(_RecipeExecutionSimple.CustomersFrom.Oid)
.RecipeExecutionSimple = _RecipeExecutionSimple
.Customers = _ocur.GetObjectByKey(Of Customers)(TryCast(.Storage.CustomersFrom, Customers).Oid)
.StorageMoveType = _ocur.GetObject(_RecipeExecutionSimple.RecipeExecutionSimpleType.StorageMoveType)
End With
_StorageOutHeader_Collection.Add(_StorageOutHeader)
Else
For Each _StorageOutHeaderExist As StorageOutHeader In _StorageOutHeader_Collection
Dim _NewStorage As Boolean = False
If _StorageOutHeaderExist.Storage.Oid <> _RecipeTo.Storage.Oid Then
_NewStorage = True
End If
If _NewStorage Then
Dim _StorageOutHeader As New StorageOutHeader(_ocur.Session)
With _StorageOutHeader
.Storage = _ocur.GetObjectByKey(Of Storage)(_RecipeTo.Storage.Oid)
.Customers = _ocur.GetObjectByKey(Of CustomersFrom)(_RecipeExecutionSimple.CustomersFrom.Oid)
.RecipeExecutionSimple = _RecipeExecutionSimple
.Customers = _ocur.GetObjectByKey(Of Customers)(TryCast(.Storage.CustomersFrom, Customers))
.StorageMoveType = _ocur.GetObject(_RecipeExecutionSimple.RecipeExecutionSimpleType.StorageMoveType)
End With
_StorageOutHeader_Collection.Add(_StorageOutHeader)
End If
Exit For
Next
End If
Next
'----------------------------------------------------------
'Kitárolási sorok kitárolási fejlécekzeh rendelése, StorageComputed toszingálás
'----------------------------------------------------------
For Each _StorageOutHeader As StorageOutHeader In _StorageOutHeader_Collection
For Each _RecipeTo As RecipeTo In _RecipeExecutionSimple.Recipe.RecipeTo
If _RecipeTo.Storage.Oid = _StorageOutHeader.Storage.Oid Then
Dim _StorageOutRows As New StorageOutRows(_ocur.Session)
With _StorageOutRows
.StorageOutHeader = _StorageOutHeader
.RowIndex = _StorageOutHeader.StorageOutRows.Count
.Products = _ocur.GetObjectByKey(Of Products)(_RecipeTo.Products.Oid)
End With
Dim _StorageInRows_Collection As New XPCollection(Of StorageInRows)(PersistentCriteriaEvaluationBehavior.InTransaction, _ocur.Session, _
CriteriaOperator.Parse("StorageInHeader.Storage=? and StorageInHeader.IsEditable=False and StorageInHeader.IsStorno=False and Products=?", _
_StorageOutHeader.Storage, _ocur.GetObjectByKey(Of Products)(_RecipeTo.Products.Oid)))
_StorageInRows_Collection.Sorting.Add(New SortProperty("StorageInHeader.CreateDate", DB.SortingDirection.Ascending))
Dim _QTT_Mod As Double = _RecipeTo.QTT * _RecipeExecutionSimple.QTT
For Each _StorageInRows As StorageInRows In _StorageInRows_Collection
Dim _QTT_Free As Double = _StorageInRows.QTT - _StorageInRows.QTT_Out - _StorageInRows.QTT_Out_Will
If _QTT_Free > 0 Then
If _QTT_Free < _QTT_Mod Then
_StorageInRows.QTT_Out_Will += _QTT_Free
_StorageOutRows.QTT_Will += _QTT_Free
_QTT_Mod -= _QTT_Free
'------- FIFO sor beszúrása
Dim _StorageOutRowsInRows As StorageOutRowsInRows = _ocur.FindObject(Of StorageOutRowsInRows)(CriteriaOperator.Parse("StorageInRows=? and StorageOutRows=?", _
_StorageInRows, _StorageOutRows), True)
If _StorageOutRowsInRows IsNot Nothing Then
_StorageOutRowsInRows.QTT += _QTT_Free
Else
_StorageOutRowsInRows = New StorageOutRowsInRows(_ocur.Session)
_StorageOutRowsInRows.StorageInRows = _StorageInRows
_StorageOutRowsInRows.StorageOutRows = _StorageOutRows
_StorageOutRowsInRows.QTT = _QTT_Free
End If
Else
_StorageInRows.QTT_Out_Will += _QTT_Mod
_StorageOutRows.QTT_Will += _QTT_Mod
'------- FIFO sor beszúrása
Dim _StorageOutRowsInRows As StorageOutRowsInRows = _ocur.FindObject(Of StorageOutRowsInRows)(CriteriaOperator.Parse("StorageInRows=? and StorageOutRows=?", _
_StorageInRows, _StorageOutRows), True)
If _StorageOutRowsInRows IsNot Nothing Then
_StorageOutRowsInRows.QTT += _QTT_Mod
Else
_StorageOutRowsInRows = New StorageOutRowsInRows(_ocur.Session)
_StorageOutRowsInRows.StorageInRows = _StorageInRows
_StorageOutRowsInRows.StorageOutRows = _StorageOutRows
_StorageOutRowsInRows.QTT = _QTT_Mod
End If
Exit For
End If
End If
Next
Dim _StorageComputed As StorageComputed = _ocur.FindObject(Of StorageComputed)(CriteriaOperator.Parse("Storage=? and Products=?", _
_StorageOutHeader.Storage, _ocur.GetObjectByKey(Of Products)(_RecipeTo.Products.Oid)), True)
Dim _QTT_ReservedOut As Double = _StorageComputed.QTTReservedOut
Dim _QTT_Will_Out As Double = 0
Dim _StorageOutRows_Collection_R As New XPCollection(Of StorageOutRows)(PersistentCriteriaEvaluationBehavior.InTransaction, _ocur.Session, _
CriteriaOperator.Parse("QTT_Will>0 and StorageOutHeader.Storage=? and Products=?", _StorageOutHeader.Storage, _ocur.GetObjectByKey(Of Products)(_RecipeTo.Products.Oid)))
For Each _StorageOutRows_R In _StorageOutRows_Collection_R
_QTT_Will_Out += _StorageOutRows_R.QTT_Will
Next
_StorageComputed.QTTFree = _StorageComputed.QTTFree - (_QTT_Will_Out - _QTT_ReservedOut)
_StorageComputed.QTTReservedOut = _QTT_Will_Out
End If
Next
Next
'----------------------------------------------------------
'Kitárolás(ok) véglegesítése, mozgástábla, StorageComputed baszogatás
'----------------------------------------------------------
For Each _StorageOutHeader As StorageOutHeader In _StorageOutHeader_Collection
_StorageOutHeader.IsEditable = False
_StorageOutHeader.IsFinalized = True
For Each _StorageOutRows As StorageOutRows In _StorageOutHeader.StorageOutRows
Dim _StorageOutRowsInRows_Collection As New XPCollection(Of StorageOutRowsInRows)(PersistentCriteriaEvaluationBehavior.InTransaction, _ocur.Session, _
CriteriaOperator.Parse("StorageOutRows=?", _StorageOutRows))
For Each _StorageOutRowsInRows In _StorageOutRowsInRows_Collection
If _StorageOutRowsInRows.QTT > 0 Then
Dim _StorageMoveEvents_Collection As New XPCollection(Of StorageMoveEvents)(PersistentCriteriaEvaluationBehavior.InTransaction, _ocur.Session, _
CriteriaOperator.Parse("StorageInRows=?", _StorageOutRowsInRows.StorageInRows))
_StorageMoveEvents_Collection.Sorting.Add(New SortProperty("ObjectCreated", DB.SortingDirection.Descending))
_StorageOutRowsInRows.StorageInRows.QTT_Out += _StorageOutRowsInRows.QTT
_StorageOutRowsInRows.StorageInRows.QTT_Out_Will -= _StorageOutRowsInRows.QTT
Dim _StorageMoveEvents As New StorageMoveEvents(_ocur.Session)
_StorageMoveEvents.StorageInRows = _StorageOutRowsInRows.StorageInRows
_StorageMoveEvents.StorageOutRows = _StorageOutRowsInRows.StorageOutRows
If _StorageMoveEvents_Collection.Count > 0 Then
_StorageMoveEvents.QTT_Free_Before = _StorageMoveEvents_Collection(0).QTT_Free_After
Else
_StorageMoveEvents.QTT_Free_Before = 0
End If
_StorageMoveEvents.QTT = (-1) * _StorageOutRowsInRows.QTT
_StorageMoveEvents.QTT_Free_After = _StorageMoveEvents.QTT_Free_Before + _StorageMoveEvents.QTT
_StorageMoveEvents.MoveEventsType = eMoveEventsType.StorageOutFinal
_StorageMoveEvents.ExecutionDate = _StorageOutRowsInRows.StorageOutRows.StorageOutHeader.CreateDate
End If
Next
_StorageOutRows.QTT += _StorageOutRows.QTT_Will
Dim _StorageComputed As StorageComputed = _ocur.FindObject(Of StorageComputed)(CriteriaOperator.Parse("Products=? and Storage=?", _
_StorageOutRows.Products, _StorageOutRows.StorageOutHeader.Storage), True)
_StorageComputed.QTTReservedOut -= _StorageOutRows.QTT_Will
_StorageOutRows.QTT_Will = 0
Next
Next
'----------------------------------------------------------
'Betárolás raktár(ak)ba
'----------------------------------------------------------
Dim _StorageInHeader_Collection As New ArrayList
For Each _RecipeFrom As RecipeFrom In _RecipeExecutionSimple.Recipe.RecipeFrom
If _StorageInHeader_Collection.Count = 0 Then
Dim _StorageInHeader As New StorageInHeader(_ocur.Session)
With _StorageInHeader
.Storage = _ocur.GetObjectByKey(Of Storage)(_RecipeFrom.Storage.Oid)
.RecipeExecutionSimple = _RecipeExecutionSimple
.IsEditable = False
.StorageMoveType = _ocur.GetObject(_RecipeExecutionSimple.RecipeExecutionSimpleType.StorageMoveType)
End With
_StorageInHeader_Collection.Add(_StorageInHeader)
Else
For Each _StorageInHeaderExist As StorageInHeader In _StorageInHeader_Collection
Dim _NewStorage As Boolean = False
If _StorageInHeaderExist.Storage.Oid <> _RecipeFrom.Storage.Oid Then
_NewStorage = True
End If
If _NewStorage Then
Dim _StorageInHeader As New StorageInHeader(_ocur.Session)
With _StorageInHeader
.Storage = _onew.GetObjectByKey(Of Storage)(_RecipeFrom.Storage.Oid)
.RecipeExecutionSimple = _RecipeExecutionSimple
.IsEditable = False
.StorageMoveType = _ocur.GetObject(_RecipeExecutionSimple.RecipeExecutionSimpleType.StorageMoveType)
End With
_StorageInHeader_Collection.Add(_StorageInHeader)
Exit For
End If
Next
End If
Next
For Each _RecipeFrom As RecipeFrom In _RecipeExecutionSimple.Recipe.RecipeFrom
For Each _StorageInHeader As StorageInHeader In _StorageInHeader_Collection
If _RecipeFrom.Storage.Oid = _StorageInHeader.Storage.Oid Then
Dim _StorageInRows As New StorageInRows(_ocur.Session)
With _StorageInRows
.StorageInHeader = _StorageInHeader
.Products = _RecipeFrom.Products
.QTT_Will = _RecipeFrom.QTT * _RecipeExecutionSimple.QTT
.RowIndex = _StorageInHeader.StorageInRows.Count
.AveragePriceInHUF = _RecipeFrom.ListPriceHUF
End With
Dim _StorageComputed As StorageComputed = _ocur.FindObject(Of StorageComputed)(CriteriaOperator.Parse("Products=? and Storage=?", _
_RecipeFrom.Products, _StorageInHeader.Storage))
If _StorageComputed Is Nothing Then
_StorageComputed = New StorageComputed(_ocur.Session)
With _StorageComputed
.Storage = _StorageInHeader.Storage
.Products = _RecipeFrom.Products
.QTTReservedIn = _RecipeFrom.QTT * _RecipeExecutionSimple.QTT
End With
Else
_StorageComputed.QTTReservedIn += _RecipeFrom.QTT * _RecipeExecutionSimple.QTT
End If
End If
Next
Next
'----------------------------------------------------------
'Betárolás(ok) véglegeítése
'----------------------------------------------------------
For Each _StorageInHeader As StorageInHeader In _StorageInHeader_Collection
_StorageInHeader.IsEditable = False
_StorageInHeader.IsFinalized = True
For Each _StorageInRows As StorageInRows In _StorageInHeader.StorageInRows
Dim _StorageComputed As StorageComputed = _ocur.FindObject(Of StorageComputed)(CriteriaOperator.Parse("Products=? and Storage=?", _
_ocur.GetObject(_StorageInRows.Products), _ocur.GetObject(_StorageInHeader.Storage)))
Dim _StorageMoveEvents As New StorageMoveEvents(_ocur.Session)
If _StorageInRows.QTT_Will > 0 Then
_StorageInRows.QTT = _StorageInRows.QTT_Will
_StorageComputed.QTTFree += _StorageInRows.QTT_Will
_StorageComputed.QTTReservedIn -= _StorageInRows.QTT_Will
_StorageMoveEvents.StorageInRows = _ocur.GetObject(_StorageInRows)
_StorageMoveEvents.QTT = _StorageInRows.QTT_Will
_StorageMoveEvents.QTT_Free_After = _StorageComputed.QTTFree
_StorageMoveEvents.QTT_Free_Before = _StorageMoveEvents.QTT_Free_After - _StorageMoveEvents.QTT
_StorageMoveEvents.MoveEventsType = eMoveEventsType.StorageInFinal
_StorageMoveEvents.ExecutionDate = _StorageInRows.StorageInHeader.CreateDate
_StorageInRows.QTT_Will = 0
End If
Next
Next
_ocur.CommitChanges()
'----------------------------------------------------------
'Nyomtatványok
'----------------------------------------------------------
For Each _StorageOutHeader As StorageOutHeader In _StorageOutHeader_Collection
Dim _ReportData As ReportData = _onew.FindObject(Of ReportData)(CriteriaOperator.Parse("Oid=?", _StorageOutHeader.Storage.ReportOut.Oid), True)
If _ReportData IsNot Nothing Then
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("StorageOutRows.StorageOutHeader.DocumentNumber=?", _StorageOutHeader.DocumentNumber), True)
End If
Next
For Each _StorageInHeader As StorageInHeader In _StorageInHeader_Collection
Dim _ReportData As ReportData = _onew.FindObject(Of ReportData)(CriteriaOperator.Parse("Oid=?", _StorageInHeader.Storage.ReportIn.Oid), True)
If _ReportData IsNot Nothing Then
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("StorageInHeader.DocumentNumber =?", _StorageInHeader.DocumentNumber), True)
End If
Next
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly + MsgBoxStyle.Critical, String.Format(CaptionHelper.GetLocalizedText("Exceptions\SISBusinessExceptions", "MsgBoxCheckItAgain")))
Finally
LockingModule.UnLockObject(_uow_lock, GetType(StorageComputed), "-", _User)
End Try
End Sub
End Class
@@ -0,0 +1,110 @@
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 RecipeFrom
Inherits BaseObject
Private _Recipe As Recipe 'Recept
Private _RowGroup1 As String 'Szöveges csoportosítás (nem kötelezõ)
Private _RowGroup2 As String 'Szöveges másodlagos csoportosítás (nem kötelezõ)
Private _Products As Products 'Termék
Private _Storage As Storage 'Raktár
Private _QTT As Double 'Mennyiség
Private _ListPriceHUF As Double
Private _ListPriceDEV As Double
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Association("Recipe-RecipeFrom", GetType(Recipe))> _
Property Recipe As Recipe
Get
Return _Recipe
End Get
Set(value As Recipe)
SetPropertyValue("Recipe", _Recipe, value)
End Set
End Property
Property RowGroup1 As String
Get
Return _RowGroup1
End Get
Set(value As String)
SetPropertyValue("RowGroup1", _RowGroup1, value)
End Set
End Property
Property RowGroup2 As String
Get
Return _RowGroup2
End Get
Set(value As String)
SetPropertyValue("RowGroup2", _RowGroup2, value)
End Set
End Property
<ImmediatePostData(True)> _
Property Products As Products
Get
Return _Products
End Get
Set(value As Products)
SetPropertyValue("Products", _Products, value)
If Not Session.IsObjectsLoading And Not Session.IsObjectsSaving Then
If value IsNot Nothing Then
If Me.ListPriceHUF = 0 Then
Me.ListPriceHUF = value.ListPriceOutHUF
End If
If Me.ListPriceDEV = 0 Then
Me.ListPriceDEV = value.ListPriceOutDEV
End If
End If
End If
End Set
End Property
Property Storage As Storage
Get
Return _Storage
End Get
Set(value As Storage)
SetPropertyValue("Storage", _Storage, value)
End Set
End Property
Property QTT As Double
Get
Return _QTT
End Get
Set(value As Double)
SetPropertyValue("QTT", _QTT, value)
End Set
End Property
<RuleRange(DefaultContexts.Save, 5, Double.MaxValue, TargetCriteria:="ListPriceDEV=0")> _
Property ListPriceHUF As Double
Get
Return _ListPriceHUF
End Get
Set(value As Double)
SetPropertyValue("ListPriceHUF", _ListPriceHUF, value)
End Set
End Property
<RuleRange(DefaultContexts.Save, 0.0001, Double.MaxValue, TargetCriteria:="ListPriceHUF=0")> _
Property ListPriceDEV As Double
Get
Return _ListPriceDEV
End Get
Set(value As Double)
SetPropertyValue("ListPriceDEV", _ListPriceDEV, value)
End Set
End Property
End Class
@@ -0,0 +1,104 @@
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 RecipeFromOther
Inherits BaseObject
Private _Recipe As Recipe 'Recept
Private _RowGroup1 As String 'Szöveges csoportosítás (nem kötelezõ)
Private _RowGroup2 As String 'Szöveges másodlagos csoportosítás (nem kötelezõ)
Private _ShortName As String
Private _Description As String
Private _QTT As Double 'Mennyiség
Private _Units As Units
Private _ListPriceHUF As Double
Private _ListPriceDEV As Double
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Association("Recipe-RecipeFromOther", GetType(Recipe))> _
Property Recipe As Recipe
Get
Return _Recipe
End Get
Set(value As Recipe)
SetPropertyValue("Recipe", _Recipe, value)
End Set
End Property
Property RowGroup1 As String
Get
Return _RowGroup1
End Get
Set(value As String)
SetPropertyValue("RowGroup1", _RowGroup1, value)
End Set
End Property
Property RowGroup2 As String
Get
Return _RowGroup2
End Get
Set(value As String)
SetPropertyValue("RowGroup2", _RowGroup2, value)
End Set
End Property
Property ShortName As String
Get
Return _ShortName
End Get
Set(value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
Property Description As String
Get
Return _Description
End Get
Set(value As String)
SetPropertyValue("Description", _Description, value)
End Set
End Property
Property QTT As Double
Get
Return _QTT
End Get
Set(value As Double)
SetPropertyValue("QTT", _QTT, value)
End Set
End Property
Property Units As Units
Get
Return _Units
End Get
Set(value As Units)
SetPropertyValue("Units", _Units, value)
End Set
End Property
Property ListPriceHUF As Double
Get
Return _ListPriceHUF
End Get
Set(value As Double)
SetPropertyValue("ListPriceHUF", _ListPriceHUF, value)
End Set
End Property
Property ListPriceDEV As Double
Get
Return _ListPriceDEV
End Get
Set(value As Double)
SetPropertyValue("ListPriceDEV", _ListPriceDEV, value)
End Set
End Property
End Class
@@ -0,0 +1,108 @@
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 RecipeTo
Inherits BaseObject
Private _Recipe As Recipe 'Recept
Private _RowGroup1 As String 'Szöveges csoportosítás (nem kötelezõ)
Private _RowGroup2 As String 'Szöveges másodlagos csoportosítás (nem kötelezõ)
Private _Products As Products 'Termék
Private _Storage As Storage 'Raktár
Private _QTT As Double 'Mennyiség
Private _ListPriceHUF As Double
Private _ListPriceDEV As Double
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Association("Recipe-RecipeTo", GetType(Recipe))> _
Property Recipe As Recipe
Get
Return _Recipe
End Get
Set(value As Recipe)
SetPropertyValue("Recipe", _Recipe, value)
End Set
End Property
Property RowGroup1 As String
Get
Return _RowGroup1
End Get
Set(value As String)
SetPropertyValue("RowGroup1", _RowGroup1, value)
End Set
End Property
Property RowGroup2 As String
Get
Return _RowGroup2
End Get
Set(value As String)
SetPropertyValue("RowGroup2", _RowGroup2, value)
End Set
End Property
Property Products As Products
Get
Return _Products
End Get
Set(value As Products)
SetPropertyValue("Products", _Products, value)
If Not Session.IsObjectsLoading And Not Session.IsObjectsSaving Then
If value IsNot Nothing Then
If Me.ListPriceHUF = 0 Then
Me.ListPriceHUF = value.ListPriceOutHUF
End If
If Me.ListPriceDEV = 0 Then
Me.ListPriceDEV = value.ListPriceOutDEV
End If
End If
End If
End Set
End Property
Property Storage As Storage
Get
Return _Storage
End Get
Set(value As Storage)
SetPropertyValue("Storage", _Storage, value)
End Set
End Property
Property QTT As Double
Get
Return _QTT
End Get
Set(value As Double)
SetPropertyValue("QTT", _QTT, value)
End Set
End Property
<RuleRange(DefaultContexts.Save, 5, Double.MaxValue, TargetCriteria:="ListPriceDEV=0")> _
Property ListPriceHUF As Double
Get
Return _ListPriceHUF
End Get
Set(value As Double)
SetPropertyValue("ListPriceHUF", _ListPriceHUF, value)
End Set
End Property
<RuleRange(DefaultContexts.Save, 0.0001, Double.MaxValue, TargetCriteria:="ListPriceHUF=0")> _
Property ListPriceDEV As Double
Get
Return _ListPriceDEV
End Get
Set(value As Double)
SetPropertyValue("ListPriceDEV", _ListPriceDEV, value)
End Set
End Property
End Class
@@ -0,0 +1,104 @@
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 RecipeToOther
Inherits BaseObject
Private _Recipe As Recipe 'Recept
Private _RowGroup1 As String 'Szöveges csoportosítás (nem kötelezõ)
Private _RowGroup2 As String 'Szöveges másodlagos csoportosítás (nem kötelezõ)
Private _ShortName As String
Private _Description As String
Private _QTT As Double 'Mennyiség
Private _Units As Units
Private _ListPriceHUF As Double
Private _ListPriceDEV As Double
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Association("Recipe-RecipeToOther", GetType(Recipe))> _
Property Recipe As Recipe
Get
Return _Recipe
End Get
Set(value As Recipe)
SetPropertyValue("Recipe", _Recipe, value)
End Set
End Property
Property RowGroup1 As String
Get
Return _RowGroup1
End Get
Set(value As String)
SetPropertyValue("RowGroup1", _RowGroup1, value)
End Set
End Property
Property RowGroup2 As String
Get
Return _RowGroup2
End Get
Set(value As String)
SetPropertyValue("RowGroup2", _RowGroup2, value)
End Set
End Property
Property ShortName As String
Get
Return _ShortName
End Get
Set(value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
Property Description As String
Get
Return _Description
End Get
Set(value As String)
SetPropertyValue("Description", _Description, value)
End Set
End Property
Property QTT As Double
Get
Return _QTT
End Get
Set(value As Double)
SetPropertyValue("QTT", _QTT, value)
End Set
End Property
Property Units As Units
Get
Return _Units
End Get
Set(value As Units)
SetPropertyValue("Units", _Units, value)
End Set
End Property
Property ListPriceHUF As Double
Get
Return _ListPriceHUF
End Get
Set(value As Double)
SetPropertyValue("ListPriceHUF", _ListPriceHUF, value)
End Set
End Property
Property ListPriceDEV As Double
Get
Return _ListPriceDEV
End Get
Set(value As Double)
SetPropertyValue("ListPriceDEV", _ListPriceDEV, value)
End Set
End Property
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
<DefaultClassOptions()> _
<NavigationItem("BusinessStocks")> _
Public Class RecipeType
Inherits BaseObject
Private _Group1 As String
Private _Group2 As String
Private _ShortName As String 'Recept megnevezése
Private _Description As String 'Recept leírása
Private _NumberGenerator As NumberGenerator
Private _UserCreated As User
Private _ObjectCreated As Date
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 Group1 As String
Get
Return _Group1
End Get
Set(value As String)
SetPropertyValue("Group1", _Group1, value)
End Set
End Property
Property Group2 As String
Get
Return _Group2
End Get
Set(value As String)
SetPropertyValue("Group2", _Group2, value)
End Set
End Property
Property ShortName As String
Get
Return _ShortName
End Get
Set(value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
Property Description As String
Get
Return _Description
End Get
Set(value As String)
SetPropertyValue("Description", _Description, value)
End Set
End Property
<RuleRequiredField("RecipeType-NumberGenerator", DefaultContexts.Save)> _
Property NumberGenerator As NumberGenerator
Get
Return _NumberGenerator
End Get
Set(value As NumberGenerator)
SetPropertyValue("NumberGenerator", _NumberGenerator, value)
End Set
End Property
Property UserCreated As User
Get
Return _UserCreated
End Get
Set(value As User)
SetPropertyValue("UserCreated", _UserCreated, value)
End Set
End Property
Property ObjectCreated As Date
Get
Return _ObjectCreated
End Get
Set(value As Date)
SetPropertyValue("ObjectCreated", _ObjectCreated, value)
End Set
End Property
End Class
@@ -0,0 +1,67 @@
Partial Class RecipeVC
<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.aRecipe_ChangeRowGroups = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aInsertServicesToRecipe = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
'
'aRecipe_ChangeRowGroups
'
Me.aRecipe_ChangeRowGroups.AcceptButtonCaption = Nothing
Me.aRecipe_ChangeRowGroups.CancelButtonCaption = Nothing
Me.aRecipe_ChangeRowGroups.Caption = "Recipe Change RowGroups"
Me.aRecipe_ChangeRowGroups.ConfirmationMessage = Nothing
Me.aRecipe_ChangeRowGroups.Id = "aRecipe_ChangeRowGroups"
Me.aRecipe_ChangeRowGroups.ImageName = Nothing
Me.aRecipe_ChangeRowGroups.Shortcut = Nothing
Me.aRecipe_ChangeRowGroups.Tag = Nothing
Me.aRecipe_ChangeRowGroups.TargetObjectsCriteria = Nothing
Me.aRecipe_ChangeRowGroups.TargetViewId = Nothing
Me.aRecipe_ChangeRowGroups.ToolTip = Nothing
Me.aRecipe_ChangeRowGroups.TypeOfView = Nothing
'
'aInsertServicesToRecipe
'
Me.aInsertServicesToRecipe.AcceptButtonCaption = Nothing
Me.aInsertServicesToRecipe.CancelButtonCaption = Nothing
Me.aInsertServicesToRecipe.Caption = "Insert Services To Recipe"
Me.aInsertServicesToRecipe.ConfirmationMessage = Nothing
Me.aInsertServicesToRecipe.Id = "aInsertServicesToRecipe"
Me.aInsertServicesToRecipe.ImageName = Nothing
Me.aInsertServicesToRecipe.Shortcut = Nothing
Me.aInsertServicesToRecipe.Tag = Nothing
Me.aInsertServicesToRecipe.TargetObjectsCriteria = Nothing
Me.aInsertServicesToRecipe.TargetViewId = Nothing
Me.aInsertServicesToRecipe.ToolTip = Nothing
Me.aInsertServicesToRecipe.TypeOfView = Nothing
End Sub
Friend WithEvents aRecipe_ChangeRowGroups As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aInsertServicesToRecipe As DevExpress.ExpressApp.Actions.PopupWindowShowAction
End Class
@@ -0,0 +1,129 @@
<?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="aRecipe_ChangeRowGroups.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="aInsertServicesToRecipe.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>221, 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,172 @@
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 RecipeVC
Inherits DevExpress.ExpressApp.ViewController
Protected _selection As New ArrayList
Protected _noselect As Boolean = False
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
Frame.GetController(Of RecipeVC).aRecipe_ChangeRowGroups.Active.SetItemValue("", False)
Frame.GetController(Of RecipeVC).aInsertServicesToRecipe.Active.SetItemValue("", False)
If View.Id = "Recipe_RecipeTo_ListView" Then
Frame.GetController(Of RecipeVC).aRecipe_ChangeRowGroups.Active.SetItemValue("", True)
AddHandler View.SelectionChanged, AddressOf RecipeLines_SelectionChange
End If
If View.Id = "Recipe_RecipeToOther_ListView" Then
Frame.GetController(Of RecipeVC).aInsertServicesToRecipe.Active.SetItemValue("", True)
Frame.GetController(Of RecipeVC).aRecipe_ChangeRowGroups.Active.SetItemValue("", True)
AddHandler View.SelectionChanged, AddressOf RecipeLines_SelectionChange
End If
If View.Id = "Recipe_RecipeFrom_ListView" Then
Frame.GetController(Of RecipeVC).aRecipe_ChangeRowGroups.Active.SetItemValue("", True)
AddHandler View.SelectionChanged, AddressOf RecipeLines_SelectionChange
End If
If View.Id = "Recipe_RecipeFromOther_ListView" Then
Frame.GetController(Of RecipeVC).aRecipe_ChangeRowGroups.Active.SetItemValue("", True)
AddHandler View.SelectionChanged, AddressOf RecipeLines_SelectionChange
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id = "Recipe_RecipeTo_ListView" Then
Frame.GetController(Of RecipeVC).aRecipe_ChangeRowGroups.Active.SetItemValue("", False)
RemoveHandler View.SelectionChanged, AddressOf RecipeLines_SelectionChange
End If
If View.Id = "Recipe_RecipeToOther_ListView" Then
Frame.GetController(Of RecipeVC).aRecipe_ChangeRowGroups.Active.SetItemValue("", False)
RemoveHandler View.SelectionChanged, AddressOf RecipeLines_SelectionChange
End If
If View.Id = "Recipe_RecipeFrom_ListView" Then
Frame.GetController(Of RecipeVC).aRecipe_ChangeRowGroups.Active.SetItemValue("", False)
RemoveHandler View.SelectionChanged, AddressOf RecipeLines_SelectionChange
End If
If View.Id = "Recipe_RecipeFromOther_ListView" Then
Frame.GetController(Of RecipeVC).aRecipe_ChangeRowGroups.Active.SetItemValue("", False)
RemoveHandler View.SelectionChanged, AddressOf RecipeLines_SelectionChange
End If
End Sub
Private Sub RecipeLines_SelectionChange(ByVal sender As Object, ByVal e As System.EventArgs)
If View Is Nothing Then Exit Sub
If View.SelectedObjects.Count > 0 Then
If _noselect = False Then
_selection.Clear()
For Each _SelectedLines In View.SelectedObjects
_selection.Add(_SelectedLines)
Next
End If
End If
End Sub
Private Sub aRecipe_ChangeRowGroups_Cancel(sender As Object, e As System.EventArgs) Handles aRecipe_ChangeRowGroups.Cancel
_noselect = False
End Sub
Private Sub aRecipe_ChangeRowGroups_CustomizePopupWindowParams(sender As System.Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aRecipe_ChangeRowGroups.CustomizePopupWindowParams
_noselect = True
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _RecipePopup As RecipePopup = _onew.CreateObject(Of RecipePopup)()
If View.SelectedObjects.Count > 0 Then
e.View = Application.CreateDetailView(_onew, "RecipePopup_DetailView", False, _RecipePopup)
Else
Throw New UserFriendlyException("Nincs kijelölt elem!")
End If
End Sub
Private Sub aRecipe_ChangeRowGroups_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aRecipe_ChangeRowGroups.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _RecipePopup As RecipePopup = TryCast(e.PopupWindow.View.SelectedObjects(0), RecipePopup)
If View.Id = "Recipe_RecipeFrom_ListView" Then
Dim _RecipeFrom As RecipeFrom
For Each _RecipeFrom In _selection
If _RecipePopup.Change_RowGroup1 Then
_RecipeFrom.RowGroup1 = _RecipePopup.RowGroup1
End If
If _RecipePopup.Change_RowGroup2 Then
_RecipeFrom.RowGroup2 = _RecipePopup.RowGroup2
End If
_RecipeFrom.Save()
Next
End If
If View.Id = "Recipe_RecipeFromOther_ListView" Then
Dim _RecipeFromOther As RecipeFromOther
For Each _RecipeFromOther In _selection
If _RecipePopup.Change_RowGroup1 Then
_RecipeFromOther.RowGroup1 = _RecipePopup.RowGroup1
End If
If _RecipePopup.Change_RowGroup2 Then
_RecipeFromOther.RowGroup2 = _RecipePopup.RowGroup2
End If
_RecipeFromOther.Save()
Next
End If
If View.Id = "Recipe_RecipeTo_ListView" Then
Dim _RecipeTo As RecipeTo
For Each _RecipeTo In _selection
If _RecipePopup.Change_RowGroup1 Then
_RecipeTo.RowGroup1 = _RecipePopup.RowGroup1
End If
If _RecipePopup.Change_RowGroup2 Then
_RecipeTo.RowGroup2 = _RecipePopup.RowGroup2
End If
_RecipeTo.Save()
Next
End If
If View.Id = "Recipe_RecipeToOther_ListView" Then
Dim _RecipeToOther As RecipeToOther
For Each _RecipeToOther In _selection
If _RecipePopup.Change_RowGroup1 Then
_RecipeToOther.RowGroup1 = _RecipePopup.RowGroup1
End If
If _RecipePopup.Change_RowGroup2 Then
_RecipeToOther.RowGroup2 = _RecipePopup.RowGroup2
End If
_RecipeToOther.Save()
Next
End If
_ocur.CommitChanges()
_noselect = False
End Sub
Private Sub aInsertServicesToRecipe_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aInsertServicesToRecipe.CustomizePopupWindowParams
' Az akció a szolgáltatások listview-ját hozza fel.
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _CollectionSource As CollectionSource = New CollectionSource(_onew, GetType(Services))
e.View = Application.CreateListView("Services_ListView_Browse", _CollectionSource, False)
End Sub
Private Sub aInsertServicesToRecipe_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aInsertServicesToRecipe.Execute
'A popup-on kiválasztott szolgáltatásokból létrehoz a receptre szolgáltatás sorokat
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _Recipe As Recipe = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, Recipe)
Dim _Services As Services
Dim _RecipeToOther_New As RecipeToOther
For Each _Services In e.PopupWindow.View.SelectedObjects
_RecipeToOther_New = _ocur.CreateObject(Of RecipeToOther)()
_RecipeToOther_New.Recipe = _ocur.GetObject(_Recipe)
_RecipeToOther_New.ShortName = _Services.ShortName
_RecipeToOther_New.Description = _Services.Description
_RecipeToOther_New.Units = _ocur.GetObject(_Services.Units)
_RecipeToOther_New.QTT = 1
_RecipeToOther_New.RowGroup1 = _Services.RowGroup1
_RecipeToOther_New.RowGroup2 = _Services.RowGroup2
_RecipeToOther_New.Save()
Next
_ocur.CommitChanges()
End Sub
End Class