First create solution

This commit is contained in:
2017-03-08 11:21:27 +01:00
commit a2fb86bacf
5508 changed files with 1082238 additions and 0 deletions
@@ -0,0 +1,49 @@
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 OfferInheaderFileAttachment
Inherits FileAttachmentBase
Private _FileType As String
Private _OfferInHeader As OfferInHeader
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("OfferInheader-OfferInheaderFileAttachment", GetType(OfferInHeader))> _
<Browsable(False)> _
Property OfferInHeader As OfferInHeader
Get
Return _OfferInHeader
End Get
Set(value As OfferInHeader)
SetPropertyValue("OfferInHeader", _OfferInHeader, value)
End Set
End Property
Property FileType As String
Get
Return _FileType
End Get
Set(value As String)
SetPropertyValue("FileType", _FileType, value)
End Set
End Property
End Class
@@ -0,0 +1,526 @@
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
'<EditorStateRule("Disable properties when IsEditable=False (IN)", "*", ViewType.DetailView, "IsEditable = False", EditorState.Disabled)> _
<DefaultClassOptions()> _
<NavigationItem("BusinessTransactions")> _
<Appearance("Disable properties when IsEditable=False (IN)", TargetItems:="*", Criteria:="IsEditable = False", Enabled:=False, Context:="DetailView")> _
<RuleCriteria("RuleCriteria IF OfferLOSTReason <> NotSet OR OfferInState <> ClosedLost THEN Save (IN)", DefaultContexts.Save, "OfferLOSTReason != 0 OR OfferInState !=2", "", SkipNullOrEmptyValues:=False)> _
<Appearance("Hide OfferLOSTReasons when eOfferInState <> 2 (IN)", AppearanceItemType.ViewItem, "OfferInState <> 2", TargetItems:="OfferLOSTReason", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Disable OfferLOSTReasonDescription when OfferLOSTReason <> 7 (IN)", AppearanceItemType.ViewItem, "OfferLOSTReason <> 7", TargetItems:="OfferLOSTReasonDescription", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Disable OfferInHeader-Contact", AppearanceItemType.ViewItem, "IsNull(Contact)=False", TargetItems:="Contact", Enabled:=False)> _
<Appearance("Disable OfferInHeader-Customers", AppearanceItemType.ViewItem, "IsNull(Customers)=False", TargetItems:="Customers", Enabled:=False)> _
<Appearance("Disable OfferInHeader-OfferOutParameters", AppearanceItemType.ViewItem, "IsNull(OfferInParameters)=False", TargetItems:="OfferInParameters", Enabled:=False)> _
<Appearance("Disable aOffersInFinal", AppearanceItemType.Action, "IsEditable = False", TargetItems:="aOffersInFinal", Enabled:=False)> _
<Appearance("Hide OfferInHeader _row_XX' properties when RowType = Other", AppearanceItemType.ViewItem, "row_RowType = 1", TargetItems:="row_Installation;row_Products", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide OfferInHeader Installation properties when row_RowType = Product", AppearanceItemType.ViewItem, "row_RowType = 0", TargetItems:="row_VAT;row_Description;row_Installation;row_ShortName;row_Units", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide OfferInHeader Product propertis when row_RowType = Installation", AppearanceItemType.ViewItem, "row_RowType = 2", TargetItems:="row_VAT;row_Products;row_Units;row_Description;row_ShortName", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide CloneObject-OfferIn, addrow and removerow", AppearanceItemType.Action, "IsEditable = False", TargetItems:="CloneObject;aTotable_OfferIn;aTotableD_OfferIn", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide _row_FinalPriceDEV-OfferIn if CurrencyName is HUF", AppearanceItemType.ViewItem, "CurrencyName.ShortName='HUF'", TargetItems:="row_FinalPriceDEV", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide _row_FinalPriceHUF-OfferIn if CurrencyName is not HUF", AppearanceItemType.ViewItem, "CurrencyName.ShortName<>'HUF'", TargetItems:="row_FinalPriceHUF", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide row_ info when IsEditable=False OffersIn", AppearanceItemType.ViewItem, "IsEditable=False", TargetItems:="row_RowType; row_Products; row_Installation; row_ShortName;" _
& "row_Description; row_QTT; row_Units; row_VAT; row_FinalPriceHUF; row_FinalPriceDEV; row_RowGroup1; row_RowGroup2", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Disable ObjectCreated OfferInHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
<Appearance("Disable UserCreated OfferInHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)> _
Public Class OfferInHeader
Inherits BaseObject
Private _OfferInParameters As OfferInParameters 'Árajánlat paramétere, ami a sorszámot és egyéb tul. meghat.
Private _OfferInState As eOfferInState 'Ajánlat státusz, hol tart jelenleg
Private _OfferLOSTReason As eOfferInLOSTReason 'Ha nem fogadjuk el, miért ?
Private _OfferLOSTReasonDescription As String ' Ha nem fogadjuk el és eOther akkor szövegesen beírni !
Private _DocumentNumber As String 'Árajánlat száma (generálódik)
Private _CustomersFrom As CustomersFrom 'Saját cég
Private _Customers As Customers 'Partner, akitől az árajánlatot kapjuk szól (ez nem kötelező, de a contactból ismerje fel !)
Private _Contact As Contacts 'Kapcsolat, akitől az árajánlatot kapjuk (ez a fő !!! kötelező)
Private _DateCreated As Date 'Kiállítás dátuma
Private _DateExecution As Date 'Teljesítés dátuma
Private _DatePayment As Date 'Fiz. hat
Private _DateDue As Date 'Érvényesség dátuma
Private _DateAcknowledgement As Date 'Rendelés visszaigazolás dátuma
Private _Description As String 'Leírás (fejlécen)
Private _PaymentOption As PaymentOption 'Fizetési opció
Private _ShipmentOption As ShipmentOption 'Szállítási opció
Private _QualityOption As QualityOption 'Minőségi opció
Private _CurrencyName As CurrencyName 'Deviza
Private _ObjectCreated As Date 'Maga az objektum mikor készült el
Private _UserCreated As User 'Ki készítette
Private _IsEditable As Boolean = True 'Szerkeszthető vagy végleges ajánlat
Private _IsStorno As Boolean = True 'Stornírozott ajánlat
'Excel, Word dokumentum
Private _DocumentBody As String 'RichText dokumentum test
Private _ExcelProperty As String 'Excel !!!
Private _ExcelFile As FileData
'--- Sorok rögzítéséhez nonpersistent propertyk
Private _row_RowType As eRowType 'Sor tipus
Private _row_Products As Products
Private _row_Installation As Installation
Private _row_ShortName As String 'Megnevezés
Private _row_Description As String 'Leírás
Private _row_QTT As Double 'Mennyiség
Private _row_Units As Units 'Mennyiségi egység
Private _row_VAT As VAT 'ÁFA kód
Private _row_FinalPriceHUF As Double 'Termék listaára HUF
Private _row_FinalPriceDEV As Double 'Termék listaára DEV
Private _row_RowGroup1 As String 'Csoportosító sor1
Private _row_RowGroup2 As String 'Csoportosító sor2
Private _CRM_Opportunities As CRM_Opportunities
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Protected Overrides Sub OnSaving()
If Session.IsNewObject(Me) Then
ObjectCreated = GetSQLTime(Session)
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
If OfferInParameters Is Nothing Then
Else
ObjectCreated = Now
If DocumentNumber = "" Then
DocumentNumber = OfferInParameters.NumberGenerator.GetNewNumber(OfferInParameters.NumberGenerator)
End If
End If
End If
MyBase.Save()
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
Me.IsEditable = True
Me.IsStorno = False
CurrencyName = Session.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName=?", "HUF"))
Me.row_VAT = Session.FindObject(Of VAT)(CriteriaOperator.Parse("DefaultForBusinnes='True'"))
Me.row_Units = Session.FindObject(Of Units)(CriteriaOperator.Parse("DefaultForBusinnes='True'"))
End Sub
<ImmediatePostData(True), DataSourceCriteria("CustomersFrom = '@This.CustomersFrom'")>
<RuleRequiredField("OfferInHeader.OfferInParameters", DefaultContexts.Save)>
Property OfferInParameters As OfferInParameters
Get
Return _OfferInParameters
End Get
Set(ByVal value As OfferInParameters)
SetPropertyValue("OfferInParameters", _OfferInParameters, value)
End Set
End Property
<ImmediatePostData()>
<NonCloneable()>
Property OfferInState As eOfferInState
Get
Return _OfferInState
End Get
Set(ByVal value As eOfferInState)
SetPropertyValue("OfferInState", _OfferInState, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
Select Case OfferInState
Case eOfferInState.eClosedWON
OfferLOSTReason = eOfferInLOSTReason.eNotSet
Case eOfferInState.eInProgress
OfferLOSTReason = eOfferInLOSTReason.eNotSet
Case eOfferInState.eInThinkingOf
OfferLOSTReason = eOfferInLOSTReason.eNotSet
End Select
End If
End Set
End Property
<ImmediatePostData()>
<NonCloneable()>
Property OfferLOSTReason As eOfferInLOSTReason
Get
Return _OfferLOSTReason
End Get
Set(ByVal value As eOfferInLOSTReason)
SetPropertyValue("OfferLOSTReason", _OfferLOSTReason, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
Select Case OfferLOSTReason
Case eOfferInLOSTReason.eNotSet
OfferLOSTReasonDescription = ""
Case eOfferInLOSTReason.eTooExpensive
OfferLOSTReasonDescription = ""
Case eOfferInLOSTReason.eTooLate
OfferLOSTReasonDescription = ""
Case eOfferInLOSTReason.eChooseConcurrency
OfferLOSTReasonDescription = ""
Case eOfferInLOSTReason.eQualityProblem
OfferLOSTReasonDescription = ""
Case eOfferInLOSTReason.eNoAnswer
OfferLOSTReasonDescription = ""
Case eOfferInLOSTReason.eWINOther
OfferLOSTReasonDescription = ""
End Select
End If
End Set
End Property
<RuleRequiredField("OfferInHeader-OfferLOSTReasonDescription", DefaultContexts.Save, TargetCriteria:="OfferLOSTReason = 7")>
<ImmediatePostData()>
<Size(-1)>
Property OfferLOSTReasonDescription As String
Get
Return _OfferLOSTReasonDescription
End Get
Set(ByVal value As String)
SetPropertyValue("OfferLOSTReasonDescription", _OfferLOSTReasonDescription, value)
End Set
End Property
<NonCloneable()>
Property DocumentNumber As String
Get
Return _DocumentNumber
End Get
Set(ByVal value As String)
SetPropertyValue("DocumentNumber", _DocumentNumber, value)
End Set
End Property
<RuleRequiredField("OfferInHeader-CustomersFrom", DefaultContexts.Save)>
Property CustomersFrom As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(ByVal value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
End Set
End Property
<ImmediatePostData()>
<RuleRequiredField("OfferInHeader-Customers", DefaultContexts.Save)>
Property Customers As Customers
Get
Return _Customers
End Get
Set(ByVal value As Customers)
SetPropertyValue("Customers", _Customers, value)
End Set
End Property
<ImmediatePostData(True), DataSourceProperty("Customers.Contacts", DataSourcePropertyIsNullMode.SelectAll)>
Property Contact As Contacts
Get
Return _Contact
End Get
Set(ByVal value As Contacts)
SetPropertyValue("Contact", _Contact, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False And value IsNot Nothing Then
Me.Customers = value.Customers
End If
End Set
End Property
<RuleRequiredField("OfferInHeader-DateCreated", DefaultContexts.Save)>
Property DateCreated As Date
Get
Return _DateCreated
End Get
Set(ByVal value As Date)
SetPropertyValue("DateCreated", _DateCreated, value)
End Set
End Property
Property DateExecution As Date
Get
Return _DateExecution
End Get
Set(ByVal value As Date)
SetPropertyValue("DateExecution", _DateExecution, value)
End Set
End Property
Property DatePayment As Date
Get
Return _DatePayment
End Get
Set(ByVal value As Date)
SetPropertyValue("DatePayment", _DatePayment, value)
End Set
End Property
<RuleRequiredField("OfferInHeader-DateDue", DefaultContexts.Save)> _
Property DateDue As Date
Get
Return _DateDue
End Get
Set(ByVal value As Date)
SetPropertyValue("DateDue", _DateDue, value)
End Set
End Property
Property DateAcknowledgement As Date
Get
Return _DateAcknowledgement
End Get
Set(value As Date)
SetPropertyValue("DateAcknowledgement", _DateAcknowledgement, value)
End Set
End Property
<Size(-1)>
Property Description As String
Get
Return _Description
End Get
Set(ByVal value As String)
SetPropertyValue("Description", _Description, value)
End Set
End Property
<RuleRequiredField("OfferInHeader-PaymentOption", DefaultContexts.Save)> _
Property PaymentOption As PaymentOption
Get
Return _PaymentOption
End Get
Set(ByVal value As PaymentOption)
SetPropertyValue("PaymentOption", _PaymentOption, value)
End Set
End Property
<RuleRequiredField("OfferInHeader-ShipmentOption", DefaultContexts.Save)> _
Property ShipmentOption As ShipmentOption
Get
Return _ShipmentOption
End Get
Set(ByVal value As ShipmentOption)
SetPropertyValue("ShipmentOption", _ShipmentOption, value)
End Set
End Property
<RuleRequiredField("OfferInHeader-QualityOption", DefaultContexts.Save)> _
Property QualityOption As QualityOption
Get
Return _QualityOption
End Get
Set(ByVal value As QualityOption)
SetPropertyValue("QualityOption", _QualityOption, value)
End Set
End Property
<RuleRequiredField("OfferInHeader-CurrencyName", DefaultContexts.Save)> _
Property CurrencyName As CurrencyName
Get
Return _CurrencyName
End Get
Set(ByVal value As CurrencyName)
SetPropertyValue("CurrencyName", _CurrencyName, value)
End Set
End Property
<NonCloneable()> _
Property IsEditable As Boolean
Get
Return _IsEditable
End Get
Set(ByVal value As Boolean)
SetPropertyValue("IsEditable", _IsEditable, value)
End Set
End Property
<NonCloneable()> _
Property IsStorno As Boolean
Get
Return _IsStorno
End Get
Set(ByVal value As Boolean)
SetPropertyValue("IsStorno", _IsStorno, value)
End Set
End Property
<NonCloneable()> _
Property ObjectCreated As Date
Get
Return _ObjectCreated
End Get
Set(ByVal value As Date)
SetPropertyValue("ObjectCreated", _ObjectCreated, value)
End Set
End Property
<NonCloneable()> _
Property UserCreated As User
Get
Return _UserCreated
End Get
Set(value As User)
SetPropertyValue("UserCreated", _UserCreated, value)
End Set
End Property
<VisibleInListView(False), VisibleInLookupListView(False)> _
<Association("OfferInHeader", GetType(OfferInRows))> _
Public ReadOnly Property OfferInRows() As XPCollection(Of OfferInRows)
Get
Return GetCollection(Of OfferInRows)("OfferInRows")
End Get
End Property
<VisibleInListView(False)> _
<Association("OfferInheader-OfferInheaderFileAttachment", GetType(OfferInheaderFileAttachment))> _
Public ReadOnly Property OfferInheaderFileAttachment As XPCollection(Of OfferInheaderFileAttachment)
Get
Return GetCollection(Of OfferInheaderFileAttachment)("OfferInheaderFileAttachment")
End Get
End Property
' --- Excel, Word dokumentum
<Size(-1), VisibleInListView(False), VisibleInLookupListView(False)> _
Property DocumentBody() As String
Get
Return _DocumentBody
End Get
Set(ByVal value As String)
SetPropertyValue("DocumentBody", _DocumentBody, value)
End Set
End Property
<VisibleInListView(False), VisibleInLookupListView(False)> _
Property ExcelProperty As String
Get
Return _ExcelProperty
End Get
Set(value As String)
SetPropertyValue("ExcelProperty", _ExcelProperty, value)
End Set
End Property
<VisibleInListView(False), VisibleInLookupListView(False)> _
Public Property ExcelFile As FileData
Get
Return _ExcelFile
End Get
Set(ByVal value As FileData)
SetPropertyValue("ExcelFile", _ExcelFile, value)
End Set
End Property
'--- Sorok rögzítéséhez nonpersistent propertyk
<NonPersistent()> _
<ImmediatePostData()> _
<VisibleInListView(False)> _
Property row_RowType As eRowType
Get
Return _row_RowType
End Get
Set(value As eRowType)
SetPropertyValue("row_RowType", _row_RowType, value)
End Set
End Property
<NonPersistent()> _
<VisibleInListView(False)> _
Property row_Products As Products
Get
Return _row_Products
End Get
Set(value As Products)
SetPropertyValue("row_Products", _row_Products, value)
End Set
End Property
<NonPersistent()> _
<VisibleInListView(False)> _
Property row_Installation As Installation
Get
Return _row_Installation
End Get
Set(value As Installation)
SetPropertyValue("row_Installation", _row_Installation, value)
End Set
End Property
<NonPersistent()> _
<VisibleInListView(False)> _
Property row_ShortName As String
Get
Return _row_ShortName
End Get
Set(value As String)
SetPropertyValue("row_ShortName", _row_ShortName, value)
End Set
End Property
<NonPersistent()> _
<VisibleInListView(False)> _
Property row_Description As String
Get
Return _row_Description
End Get
Set(value As String)
SetPropertyValue("row_Description", _row_Description, value)
End Set
End Property
<NonPersistent()> _
<VisibleInListView(False)> _
Property row_QTT As Double
Get
Return _row_QTT
End Get
Set(value As Double)
SetPropertyValue("row_QTT", _row_QTT, value)
End Set
End Property
<NonPersistent()> _
<VisibleInListView(False)> _
Property row_Units As Units
Get
Return _row_Units
End Get
Set(value As Units)
SetPropertyValue("row_Units", _row_Units, value)
End Set
End Property
<NonPersistent()> _
<VisibleInListView(False)> _
Property row_VAT As VAT
Get
Return _row_VAT
End Get
Set(value As VAT)
SetPropertyValue("row_VAT", _row_VAT, value)
End Set
End Property
<NonPersistent()> _
<VisibleInListView(False)> _
Property row_FinalPriceHUF As Double
Get
Return _row_FinalPriceHUF
End Get
Set(value As Double)
SetPropertyValue("row_FinalPriceHUF", _row_FinalPriceHUF, value)
End Set
End Property
<NonPersistent()> _
<VisibleInListView(False)> _
Property row_FinalPriceDEV As Double
Get
Return _row_FinalPriceDEV
End Get
Set(value As Double)
SetPropertyValue("row_FinalPriceDEV", _row_FinalPriceDEV, value)
End Set
End Property
<NonPersistent()> _
<VisibleInListView(False)> _
Property row_RowGroup1 As String
Get
Return _row_RowGroup1
End Get
Set(value As String)
SetPropertyValue("row_RowGroup1", _row_RowGroup1, value)
End Set
End Property
<NonPersistent()> _
<VisibleInListView(False)> _
Property row_RowGroup2 As String
Get
Return _row_RowGroup2
End Get
Set(value As String)
SetPropertyValue("row_RowGroup2", _row_RowGroup2, value)
End Set
End Property
'--- CRM ügy
<Association("OfferInHeader-CRM_Opportunities", GetType(CRM_Opportunities))> _
Property CRM_Opportunities As CRM_Opportunities
Get
Return _CRM_Opportunities
End Get
Set(value As CRM_Opportunities)
SetPropertyValue("CRM_Opportunities", _CRM_Opportunities, value)
If Session.IsObjectsSaving = False And Session.IsObjectsLoading = False And Me.CRM_Opportunities IsNot Nothing And Session.IsNewObject(Me) = True Then
Me.CustomersFrom = Me.CRM_Opportunities.CustomersFrom
End If
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
Imports DevExpress.ExpressApp.ConditionalAppearance
Public Enum eOfferInState
eInProgress = 0 'Még dolgoznak rajta
eClosedWON = 1 'Elfogadjuk
eClosedLOST = 2 'Elutasítjuk
eInThinkingOf = 3 'Még gondolkodunk, hogy mi legyen vele !
eOrderOut = 4 'Megrendeltük
eOrderOutAcknowledgement = 5 'Megrendeltük, és visszaigazolták
End Enum
Public Enum eOfferInLOSTReason
eNotSet = 0 'Nincs beállitva
eTooExpensive = 1 'Túl drága
eTooLate = 2 'Határidő nem megfelelő
eChooseConcurrency = 3 'Konkurenciát választottuk
eQualityProblem = 4 'Nem megfelelő minőségű
eNoAnswer = 5 ' Nem mondjuk meg miért
eWINOther = 6 ' Másik árajánlatukat fogadjuk el
eOther = 7 'Egyéb
End Enum
<DefaultClassOptions()> _
<NavigationItem("BusinessStocks")> _
Public Class OfferInParameters
Inherits BaseObject
Private _CustomersFrom As CustomersFrom
Private _OfferInMainType As eOfferOutMainType 'Fő tipus 1
Private _OfferInMainType2 As eOfferOutMainType2 'Fő tipus 2
Private _ShortName As String 'Rövid megnevezés
Private _Description As String 'Leírás
Private _NumberGenerator As NumberGenerator 'Sorszám generátor
Private _ReportData As ReportData
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Property CustomersFrom As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(ByVal value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
End Set
End Property
Property OfferInMainType As eOfferOutMainType
Get
Return _OfferInMainType
End Get
Set(ByVal value As eOfferOutMainType)
SetPropertyValue("OfferOutMainType", _OfferInMainType, value)
End Set
End Property
Property OfferInMainType2 As eOfferOutMainType2
Get
Return _OfferInMainType2
End Get
Set(ByVal value As eOfferOutMainType2)
SetPropertyValue("OfferOutMainType2", _OfferInMainType2, value)
End Set
End Property
<RuleRequiredField("", DefaultContexts.Save)> _
Property ShortName As String
Get
Return _ShortName
End Get
Set(ByVal value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
<Size(-1)>
Property Description As String
Get
Return _Description
End Get
Set(ByVal value As String)
SetPropertyValue("Description", _Description, value)
End Set
End Property
<RuleRequiredField("", DefaultContexts.Save)> _
Property NumberGenerator As NumberGenerator
Get
Return _NumberGenerator
End Get
Set(ByVal value As NumberGenerator)
SetPropertyValue("NumberGenerator", _NumberGenerator, value)
End Set
End Property
Property ReportData As ReportData
Get
Return _ReportData
End Get
Set(ByVal value As ReportData)
SetPropertyValue("ReportData", _ReportData, value)
End Set
End Property
End Class
@@ -0,0 +1,281 @@
Imports System
Imports System.ComponentModel
Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering
Imports DevExpress.ExpressApp
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation
Imports DevExpress.ExpressApp.ConditionalAppearance
<DefaultClassOptions()> _
<NavigationItem(False), CreatableItem(False)> _
<Appearance("Disable InsertServicesToOfferOut", AppearanceItemType.Action, "OfferInHeader.IsEditable = False", TargetItems:="InsertServicesToOfferIN", Enabled:=False)> _
Public Class OfferInRows
Inherits BaseObject
Private _OfferInHeader As OfferInHeader 'Árajánlat fejléce
Private _RowType As eRowType 'Sor miről szól ?
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 _Product As Products 'Termék
Private _Installation As Installation 'Gyártmány
Private _RowIndex As Long 'Sor index (mozgathatónak kell lennie !)
Private _ShortName As String 'Megnevezés -> Ez megy majd rá később a számlára is !
Private _Description As String 'Leírás -> ez is rá fog menni a számlára !
Private _DescriptionPrivate As String 'Na ez csak látszódjon, de nem menjen föl semmilyen doksira !!!
Private _QTT As Double = 0 'Mennyiség. A Mennyiségi egység vagy a Products-ból, vag Installationnál DB
Private _QualityOption As QualityOption 'Minőségi opció
Private _Units As Units
Private _VAT As VAT
Private _DateAcknowledgement As Date 'Visszaigazolás dátuma
'Árak !!!!
Private _SumPriceHUF As Double
Private _SumPriceDEV As Double
Private _FinalPriceDEV As Double
Private _FinalPriceHUF As Double
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Association("OfferInHeader", GetType(OfferInHeader))> _
Property OfferInHeader() As OfferInHeader
Get
Return _OfferInHeader
End Get
Set(ByVal value As OfferInHeader)
SetPropertyValue("OfferInHeader", _OfferInHeader, value)
End Set
End Property
Property RowType() As eRowType
Get
Return _RowType
End Get
Set(ByVal value As eRowType)
SetPropertyValue("RowType", _RowType, 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
<RuleRequiredField("", "aToTable_OfferIn_Contexts", TargetCriteria:="RowType=0")> _
Property Product() As Products
Get
Return _Product
End Get
Set(ByVal value As Products)
SetPropertyValue("Product", _Product, value)
End Set
End Property
Property Installation As Installation
Get
Return _Installation
End Get
Set(ByVal value As Installation)
SetPropertyValue("Installation", _Installation, value)
End Set
End Property
Property RowIndex() As Long
Get
Return _RowIndex
End Get
Set(ByVal value As Long)
SetPropertyValue("RowIndex", _RowIndex, value)
End Set
End Property
<Size(255)> _
Property ShortName() As String
Get
Return _ShortName
End Get
Set(ByVal value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
<Size(-1)> _
Property Description() As String
Get
Return _Description
End Get
Set(ByVal value As String)
SetPropertyValue("Description", _Description, value)
End Set
End Property
<Size(-1)> _
Property DescriptionPrivate As String
Get
Return _DescriptionPrivate
End Get
Set(ByVal value As String)
SetPropertyValue("DescriptionPrivate", _DescriptionPrivate, value)
End Set
End Property
<RuleRequiredField("", DefaultContexts.Save)> _
<RuleRange("", DefaultContexts.Save, 0.001, 999999999)> _
Property QTT() As Double
Get
Return _QTT
End Get
Set(ByVal value As Double)
SetPropertyValue("QTT", _QTT, value)
If Not Session.IsObjectsLoading And Not Session.IsObjectsSaving Then
SumPriceDEV = QTT * FinalPriceDEV
SumPriceHUF = QTT * FinalPriceHUF
End If
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 VAT As VAT
Get
Return _VAT
End Get
Set(value As VAT)
SetPropertyValue("VAT", _VAT, value)
End Set
End Property
Property QualityOption() As QualityOption
Get
Return _QualityOption
End Get
Set(ByVal value As QualityOption)
SetPropertyValue("QualityOption", _QualityOption, value)
End Set
End Property
Property DateAcknowledgement As Date
Get
Return _DateAcknowledgement
End Get
Set(value As Date)
SetPropertyValue("DateAcknowledgement", _DateAcknowledgement, value)
End Set
End Property
Property SumPriceHUF As Double
Get
Return _SumPriceHUF
End Get
Set(value As Double)
SetPropertyValue("SumPriceHUF", _SumPriceHUF, value)
End Set
End Property
Property SumPriceDEV As Double
Get
Return _SumPriceDEV
End Get
Set(value As Double)
SetPropertyValue("SumPriceDEV", _SumPriceDEV, value)
End Set
End Property
Property FinalPriceDEV As Double
Get
Return _FinalPriceDEV
End Get
Set(value As Double)
SetPropertyValue("FinalPriceDEV", _FinalPriceDEV, value)
If Not Session.IsObjectsLoading And Not Session.IsObjectsSaving Then
SumPriceDEV = QTT * FinalPriceDEV
End If
End Set
End Property
Property FinalPriceHUF As Double
Get
Return _FinalPriceHUF
End Get
Set(value As Double)
SetPropertyValue("FinalPriceHUF", _FinalPriceHUF, value)
If Not Session.IsObjectsLoading And Not Session.IsObjectsSaving Then
SumPriceHUF = QTT * FinalPriceHUF
End If
End Set
End Property
Public Sub AddRows(ByVal _p_OfferInHeader As OfferInHeader)
' Sor hozzáadása
Me.OfferInHeader = _p_OfferInHeader
If _p_OfferInHeader.row_RowType = eRowType.IsInstallation Then ' Sor hozzáadása ha gyártmány típusú a sor
Me.Installation = _p_OfferInHeader.row_Installation
Me.RowType = _p_OfferInHeader.row_RowType
Me.QTT = _p_OfferInHeader.row_QTT
Me.Units = Session.FindObject(Of Units)(CriteriaOperator.Parse("ShortName='DB'"))
Me.RowGroup1 = _p_OfferInHeader.row_RowGroup1
Me.RowGroup2 = _p_OfferInHeader.row_RowGroup2
Me.VAT = _p_OfferInHeader.row_VAT
FinalPriceDEV = _p_OfferInHeader.row_FinalPriceDEV
FinalPriceHUF = _p_OfferInHeader.row_FinalPriceHUF
SumPriceDEV = FinalPriceDEV * QTT
SumPriceHUF = FinalPriceHUF * QTT
End If
If _p_OfferInHeader.row_RowType = eRowType.IsOther Then ' Sor hozzáadása ha egyéb típusú a sor
Me.ShortName = _p_OfferInHeader.row_ShortName
Me.RowType = _p_OfferInHeader.row_RowType
Me.QTT = _p_OfferInHeader.row_QTT
Me.Units = _p_OfferInHeader.row_Units
Me.Description = _p_OfferInHeader.row_Description
Me.VAT = _p_OfferInHeader.row_VAT
Me.RowGroup1 = _p_OfferInHeader.row_RowGroup1
Me.RowGroup2 = _p_OfferInHeader.row_RowGroup2
FinalPriceDEV = _p_OfferInHeader.row_FinalPriceDEV
FinalPriceHUF = _p_OfferInHeader.row_FinalPriceHUF
SumPriceDEV = FinalPriceDEV * QTT
SumPriceHUF = FinalPriceHUF * QTT
End If
If _p_OfferInHeader.row_RowType = eRowType.IsProduct Then ' Sor hozzáadása ha termék típusú a sor
Me.Product = _p_OfferInHeader.row_Products
Me.RowType = _p_OfferInHeader.row_RowType
Me.QTT = _p_OfferInHeader.row_QTT
Me.Units = _p_OfferInHeader.row_Units
Me.VAT = _p_OfferInHeader.row_Products.VAT
Me.RowGroup1 = _p_OfferInHeader.row_RowGroup1
Me.RowGroup2 = _p_OfferInHeader.row_RowGroup2
FinalPriceDEV = _p_OfferInHeader.row_FinalPriceDEV
FinalPriceHUF = _p_OfferInHeader.row_FinalPriceHUF
SumPriceDEV = FinalPriceDEV * QTT
SumPriceHUF = FinalPriceHUF * QTT
End If
' Indexelés
If _p_OfferInHeader.OfferInRows.Count = 0 Then
Me.RowIndex = 0
Else
Me.RowIndex = _p_OfferInHeader.OfferInRows.Count - 1
End If
End Sub
Public Sub RemoveRows()
Me.Delete()
End Sub
End Class
@@ -0,0 +1,282 @@
Partial Class OffersInVC
<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.aTotableD_OfferIn = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aTotable_OfferIn = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aUp_OfferIn = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aDown_OfferIn = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aOffersInFinal = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aOffersIn_ChangeRows = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aInsertServicesToOfferIN = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aBackToRowEdit_OfferIn = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aOfferIn_ChangeState = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aCloneOfferIn = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aPrintOfferIn = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aOfferIn_CreateDeliveryNoteIn = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aOfferIn_RegenerateDEV = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aOfferInHeader_AddOfferOutHeader = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
'
'aTotableD_OfferIn
'
Me.aTotableD_OfferIn.Caption = "Delete row"
Me.aTotableD_OfferIn.Category = "aTotableD_OfferIn"
Me.aTotableD_OfferIn.ConfirmationMessage = Nothing
Me.aTotableD_OfferIn.Id = "aTotableD_OfferIn"
Me.aTotableD_OfferIn.ImageName = "table_delete"
Me.aTotableD_OfferIn.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aTotableD_OfferIn.Shortcut = Nothing
Me.aTotableD_OfferIn.Tag = Nothing
Me.aTotableD_OfferIn.TargetObjectsCriteria = Nothing
Me.aTotableD_OfferIn.TargetViewId = ""
Me.aTotableD_OfferIn.ToolTip = Nothing
Me.aTotableD_OfferIn.TypeOfView = Nothing
'
'aTotable_OfferIn
'
Me.aTotable_OfferIn.Caption = "Add row"
Me.aTotable_OfferIn.Category = "aTotable_OfferIn"
Me.aTotable_OfferIn.ConfirmationMessage = Nothing
Me.aTotable_OfferIn.Id = "aTotable_OfferIn"
Me.aTotable_OfferIn.ImageName = "table_add"
Me.aTotable_OfferIn.Shortcut = Nothing
Me.aTotable_OfferIn.Tag = Nothing
Me.aTotable_OfferIn.TargetObjectsCriteria = Nothing
Me.aTotable_OfferIn.TargetViewId = ""
Me.aTotable_OfferIn.ToolTip = Nothing
Me.aTotable_OfferIn.TypeOfView = Nothing
'
'aUp_OfferIn
'
Me.aUp_OfferIn.Caption = "Up"
Me.aUp_OfferIn.Category = "RecordsNavigation"
Me.aUp_OfferIn.ConfirmationMessage = Nothing
Me.aUp_OfferIn.Id = "aUp_OfferIn"
Me.aUp_OfferIn.ImageName = "arrow_up_green"
Me.aUp_OfferIn.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aUp_OfferIn.Shortcut = Nothing
Me.aUp_OfferIn.Tag = Nothing
Me.aUp_OfferIn.TargetObjectsCriteria = Nothing
Me.aUp_OfferIn.TargetViewId = Nothing
Me.aUp_OfferIn.ToolTip = Nothing
Me.aUp_OfferIn.TypeOfView = Nothing
'
'aDown_OfferIn
'
Me.aDown_OfferIn.Caption = "Down"
Me.aDown_OfferIn.Category = "RecordsNavigation"
Me.aDown_OfferIn.ConfirmationMessage = Nothing
Me.aDown_OfferIn.Id = "aDown_OfferIn"
Me.aDown_OfferIn.ImageName = "arrow_down_green"
Me.aDown_OfferIn.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aDown_OfferIn.Shortcut = Nothing
Me.aDown_OfferIn.Tag = Nothing
Me.aDown_OfferIn.TargetObjectsCriteria = Nothing
Me.aDown_OfferIn.TargetViewId = Nothing
Me.aDown_OfferIn.ToolTip = Nothing
Me.aDown_OfferIn.TypeOfView = Nothing
'
'aOffersInFinal
'
Me.aOffersInFinal.Caption = "aOffersInFinal"
Me.aOffersInFinal.Category = "RecordEdit"
Me.aOffersInFinal.ConfirmationMessage = Nothing
Me.aOffersInFinal.Id = "aOffersInFinal"
Me.aOffersInFinal.ImageName = "MenuBar_SaveAndClose"
Me.aOffersInFinal.Shortcut = Nothing
Me.aOffersInFinal.Tag = Nothing
Me.aOffersInFinal.TargetObjectsCriteria = Nothing
Me.aOffersInFinal.TargetViewId = Nothing
Me.aOffersInFinal.ToolTip = Nothing
Me.aOffersInFinal.TypeOfView = Nothing
'
'aOffersIn_ChangeRows
'
Me.aOffersIn_ChangeRows.AcceptButtonCaption = Nothing
Me.aOffersIn_ChangeRows.CancelButtonCaption = Nothing
Me.aOffersIn_ChangeRows.Caption = "Change data in selected rows"
Me.aOffersIn_ChangeRows.ConfirmationMessage = Nothing
Me.aOffersIn_ChangeRows.Id = "aOffersIn_ChangeRows"
Me.aOffersIn_ChangeRows.ImageName = "Action_EditModel"
Me.aOffersIn_ChangeRows.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aOffersIn_ChangeRows.Shortcut = Nothing
Me.aOffersIn_ChangeRows.Tag = Nothing
Me.aOffersIn_ChangeRows.TargetObjectsCriteria = Nothing
Me.aOffersIn_ChangeRows.TargetViewId = Nothing
Me.aOffersIn_ChangeRows.ToolTip = Nothing
Me.aOffersIn_ChangeRows.TypeOfView = Nothing
'
'aInsertServicesToOfferIN
'
Me.aInsertServicesToOfferIN.AcceptButtonCaption = Nothing
Me.aInsertServicesToOfferIN.CancelButtonCaption = Nothing
Me.aInsertServicesToOfferIN.Caption = "aInsert Services To Offer IN"
Me.aInsertServicesToOfferIN.ConfirmationMessage = Nothing
Me.aInsertServicesToOfferIN.Id = "aInsertServicesToOfferIN"
Me.aInsertServicesToOfferIN.ImageName = Nothing
Me.aInsertServicesToOfferIN.Shortcut = Nothing
Me.aInsertServicesToOfferIN.Tag = Nothing
Me.aInsertServicesToOfferIN.TargetObjectsCriteria = Nothing
Me.aInsertServicesToOfferIN.TargetViewId = ""
Me.aInsertServicesToOfferIN.ToolTip = Nothing
Me.aInsertServicesToOfferIN.TypeOfView = Nothing
'
'aBackToRowEdit_OfferIn
'
Me.aBackToRowEdit_OfferIn.Caption = "Edit row"
Me.aBackToRowEdit_OfferIn.Category = "aBackToRowEdit_OfferIn"
Me.aBackToRowEdit_OfferIn.ConfirmationMessage = Nothing
Me.aBackToRowEdit_OfferIn.Id = "aBackToRowEdit_OfferIn"
Me.aBackToRowEdit_OfferIn.ImageName = Nothing
Me.aBackToRowEdit_OfferIn.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aBackToRowEdit_OfferIn.Shortcut = Nothing
Me.aBackToRowEdit_OfferIn.Tag = Nothing
Me.aBackToRowEdit_OfferIn.TargetObjectsCriteria = Nothing
Me.aBackToRowEdit_OfferIn.TargetViewId = ""
Me.aBackToRowEdit_OfferIn.ToolTip = Nothing
Me.aBackToRowEdit_OfferIn.TypeOfView = GetType(DevExpress.ExpressApp.View)
'
'aOfferIn_ChangeState
'
Me.aOfferIn_ChangeState.AcceptButtonCaption = Nothing
Me.aOfferIn_ChangeState.CancelButtonCaption = Nothing
Me.aOfferIn_ChangeState.Caption = "OfferIn Change State"
Me.aOfferIn_ChangeState.ConfirmationMessage = Nothing
Me.aOfferIn_ChangeState.Id = "aOfferIn_ChangeState"
Me.aOfferIn_ChangeState.ImageName = Nothing
Me.aOfferIn_ChangeState.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aOfferIn_ChangeState.Shortcut = Nothing
Me.aOfferIn_ChangeState.Tag = Nothing
Me.aOfferIn_ChangeState.TargetObjectsCriteria = Nothing
Me.aOfferIn_ChangeState.TargetViewId = ""
Me.aOfferIn_ChangeState.ToolTip = Nothing
Me.aOfferIn_ChangeState.TypeOfView = Nothing
'
'aCloneOfferIn
'
Me.aCloneOfferIn.Caption = "aClone Offer In"
Me.aCloneOfferIn.Category = "ObjectsCreation"
Me.aCloneOfferIn.ConfirmationMessage = Nothing
Me.aCloneOfferIn.Id = "aCloneOfferIn"
Me.aCloneOfferIn.ImageName = Nothing
Me.aCloneOfferIn.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aCloneOfferIn.Shortcut = Nothing
Me.aCloneOfferIn.Tag = Nothing
Me.aCloneOfferIn.TargetObjectsCriteria = Nothing
Me.aCloneOfferIn.TargetObjectType = GetType(Nuvolar.[Module].OfferInHeader)
Me.aCloneOfferIn.TargetViewId = Nothing
Me.aCloneOfferIn.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aCloneOfferIn.ToolTip = Nothing
Me.aCloneOfferIn.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
'
'aPrintOfferIn
'
Me.aPrintOfferIn.Caption = "aPrint Offer In"
Me.aPrintOfferIn.Category = "View"
Me.aPrintOfferIn.ConfirmationMessage = Nothing
Me.aPrintOfferIn.Id = "aPrintOfferIn"
Me.aPrintOfferIn.ImageName = Nothing
Me.aPrintOfferIn.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aPrintOfferIn.Shortcut = Nothing
Me.aPrintOfferIn.Tag = Nothing
Me.aPrintOfferIn.TargetObjectsCriteria = Nothing
Me.aPrintOfferIn.TargetObjectType = GetType(Nuvolar.[Module].OfferInHeader)
Me.aPrintOfferIn.TargetViewId = Nothing
Me.aPrintOfferIn.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
Me.aPrintOfferIn.ToolTip = Nothing
Me.aPrintOfferIn.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
'
'aOfferIn_CreateDeliveryNoteIn
'
Me.aOfferIn_CreateDeliveryNoteIn.AcceptButtonCaption = Nothing
Me.aOfferIn_CreateDeliveryNoteIn.CancelButtonCaption = Nothing
Me.aOfferIn_CreateDeliveryNoteIn.Caption = "aOfferIn_CreateDeliveryNoteIn"
Me.aOfferIn_CreateDeliveryNoteIn.Category = "ObjectsCreation"
Me.aOfferIn_CreateDeliveryNoteIn.ConfirmationMessage = Nothing
Me.aOfferIn_CreateDeliveryNoteIn.Id = "aOfferIn_CreateDeliveryNoteIn"
Me.aOfferIn_CreateDeliveryNoteIn.ImageName = Nothing
Me.aOfferIn_CreateDeliveryNoteIn.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aOfferIn_CreateDeliveryNoteIn.Shortcut = Nothing
Me.aOfferIn_CreateDeliveryNoteIn.Tag = Nothing
Me.aOfferIn_CreateDeliveryNoteIn.TargetObjectsCriteria = Nothing
Me.aOfferIn_CreateDeliveryNoteIn.TargetObjectType = GetType(Nuvolar.[Module].OfferInHeader)
Me.aOfferIn_CreateDeliveryNoteIn.TargetViewId = Nothing
Me.aOfferIn_CreateDeliveryNoteIn.ToolTip = Nothing
Me.aOfferIn_CreateDeliveryNoteIn.TypeOfView = Nothing
'
'aOfferIn_RegenerateDEV
'
Me.aOfferIn_RegenerateDEV.AcceptButtonCaption = Nothing
Me.aOfferIn_RegenerateDEV.CancelButtonCaption = Nothing
Me.aOfferIn_RegenerateDEV.Caption = "aOfferIn_RegenerateDEV"
Me.aOfferIn_RegenerateDEV.ConfirmationMessage = Nothing
Me.aOfferIn_RegenerateDEV.Id = "aOfferIn_RegenerateDEV"
Me.aOfferIn_RegenerateDEV.ImageName = Nothing
Me.aOfferIn_RegenerateDEV.Shortcut = Nothing
Me.aOfferIn_RegenerateDEV.Tag = Nothing
Me.aOfferIn_RegenerateDEV.TargetObjectsCriteria = Nothing
Me.aOfferIn_RegenerateDEV.TargetObjectType = GetType(Nuvolar.[Module].OfferInHeader)
Me.aOfferIn_RegenerateDEV.TargetViewId = Nothing
Me.aOfferIn_RegenerateDEV.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aOfferIn_RegenerateDEV.ToolTip = Nothing
Me.aOfferIn_RegenerateDEV.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aOfferInHeader_AddOfferOutHeader
'
Me.aOfferInHeader_AddOfferOutHeader.AcceptButtonCaption = Nothing
Me.aOfferInHeader_AddOfferOutHeader.CancelButtonCaption = Nothing
Me.aOfferInHeader_AddOfferOutHeader.Caption = "aOfferInHeader_AddOfferOutHeader"
Me.aOfferInHeader_AddOfferOutHeader.ConfirmationMessage = Nothing
Me.aOfferInHeader_AddOfferOutHeader.Id = "aOfferInHeader_AddOfferOutHeader"
Me.aOfferInHeader_AddOfferOutHeader.ImageName = Nothing
Me.aOfferInHeader_AddOfferOutHeader.Shortcut = Nothing
Me.aOfferInHeader_AddOfferOutHeader.Tag = Nothing
Me.aOfferInHeader_AddOfferOutHeader.TargetObjectsCriteria = Nothing
Me.aOfferInHeader_AddOfferOutHeader.TargetObjectType = GetType(Nuvolar.[Module].OfferInHeader)
Me.aOfferInHeader_AddOfferOutHeader.TargetViewId = Nothing
Me.aOfferInHeader_AddOfferOutHeader.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aOfferInHeader_AddOfferOutHeader.ToolTip = Nothing
Me.aOfferInHeader_AddOfferOutHeader.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
End Sub
Friend WithEvents aTotableD_OfferIn As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aTotable_OfferIn As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aUp_OfferIn As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aDown_OfferIn As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aOffersInFinal As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aOffersIn_ChangeRows As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aInsertServicesToOfferIN As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aBackToRowEdit_OfferIn As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aOfferIn_ChangeState As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aCloneOfferIn As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aPrintOfferIn As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aOfferIn_CreateDeliveryNoteIn As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aOfferIn_RegenerateDEV As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aOfferInHeader_AddOfferOutHeader As DevExpress.ExpressApp.Actions.PopupWindowShowAction
End Class
@@ -0,0 +1,165 @@
<?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="aTotableD_OfferIn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aTotable_OfferIn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 212</value>
</metadata>
<metadata name="aUp_OfferIn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 290</value>
</metadata>
<metadata name="aDown_OfferIn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 524</value>
</metadata>
<metadata name="aOffersInFinal.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 485</value>
</metadata>
<metadata name="aOffersIn_ChangeRows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 446</value>
</metadata>
<metadata name="aInsertServicesToOfferIN.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 407</value>
</metadata>
<metadata name="aBackToRowEdit_OfferIn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 368</value>
</metadata>
<metadata name="aOfferIn_ChangeState.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 329</value>
</metadata>
<metadata name="aCloneOfferIn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 134</value>
</metadata>
<metadata name="aPrintOfferIn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 251</value>
</metadata>
<metadata name="aOfferIn_CreateDeliveryNoteIn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 173</value>
</metadata>
<metadata name="aOfferIn_RegenerateDEV.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="aOfferInHeader_AddOfferOutHeader.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>392, 284</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,751 @@
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
Imports DevExpress.Persistent.Validation
Imports DevExpress.Xpo
Imports DevExpress.ExpressApp.SystemModule
Imports DevExpress.ExpressApp.Reports
Imports System.Linq
Imports DevExpress.Persistent.BaseImpl
Public Class OffersInVC
Inherits DevExpress.ExpressApp.ViewController
Protected _selection As New ArrayList
Protected _noselect As Boolean = False
Public Sub New()
MyBase.New()
'This call is required by the Component Designer.
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
Frame.GetController(Of OffersInVC).aTotable_OfferIn.Active.SetItemValue("", False)
Frame.GetController(Of OffersInVC).aTotableD_OfferIn.Active.SetItemValue("", False)
Frame.GetController(Of OffersInVC).aUp_OfferIn.Active.SetItemValue("", False)
Frame.GetController(Of OffersInVC).aDown_OfferIn.Active.SetItemValue("", False)
Frame.GetController(Of OffersInVC).aOffersInFinal.Active.SetItemValue("", False)
Frame.GetController(Of OffersInVC).aOffersIn_ChangeRows.Active.SetItemValue("", False)
Frame.GetController(Of OffersInVC).aInsertServicesToOfferIN.Active.SetItemValue("", False)
Frame.GetController(Of OffersInVC).aOfferIn_ChangeState.Active.SetItemValue("", False)
If View.Id = "OfferInHeader_ListView_Editable" Then
Frame.GetController(Of OffersInVC).aOffersInFinal.Active.SetItemValue("", True)
End If
If View.Id = "OfferInHeader_ListView_NotEditable" Or _
View.Id = "CRM_Opportunities_OfferInHeader_ListView" Then
Frame.GetController(Of OffersInVC).aOfferIn_ChangeState.Active.SetItemValue("", True)
AddHandler View.SelectionChanged, AddressOf OfferInHeader_OfferInRows_ListView_SelectionChanged
End If
If View.Id = "OfferInHeader_OfferInRows_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)
Frame.GetController(Of OffersInVC).aUp_OfferIn.Active.SetItemValue("", True)
Frame.GetController(Of OffersInVC).aDown_OfferIn.Active.SetItemValue("", True)
Frame.GetController(Of OffersInVC).aOffersIn_ChangeRows.Active.SetItemValue("", True)
Frame.GetController(Of OffersInVC).aInsertServicesToOfferIN.Active.SetItemValue("", True)
AddHandler View.SelectionChanged, AddressOf OfferInHeader_OfferInRows_ListView_SelectionChanged
End If
If View.Id = "OfferInHeader_DetailView" Then
Dim _OfferInHeader As OfferInHeader = TryCast(View.SelectedObjects(0), OfferInHeader)
If _OfferInHeader IsNot Nothing Then
If _OfferInHeader.IsEditable = False Then
Frame.GetController(Of OffersInVC).aOffersInFinal.Active.SetItemValue("", False)
Frame.GetController(Of OffersInVC).aTotable_OfferIn.Active.SetItemValue("", False)
Frame.GetController(Of OffersInVC).aTotableD_OfferIn.Active.SetItemValue("", False)
Frame.GetController(Of OffersInVC).aBackToRowEdit_OfferIn.Active.SetItemValue("", False)
Else
Frame.GetController(Of OffersInVC).aOffersInFinal.Active.SetItemValue("", True)
Frame.GetController(Of OffersInVC).aTotable_OfferIn.Active.SetItemValue("", True)
Frame.GetController(Of OffersInVC).aTotableD_OfferIn.Active.SetItemValue("", True)
Frame.GetController(Of OffersInVC).aBackToRowEdit_OfferIn.Active.SetItemValue("", True)
End If
End If
End If
If View.Id = "OfferInHeader_ListView_Subcontractor" Then
Frame.GetController(Of OffersInVC)().aPrintOfferIn.Active.SetItemValue("", False)
Frame.GetController(Of OffersInVC)().aCloneOfferIn.Active.SetItemValue("", False)
Frame.GetController(Of OffersInVC)().aOfferIn_CreateDeliveryNoteIn.Active.SetItemValue("", False)
End If
If View.Id = "DeliveryNoteInFromOffersInRowsHeader_DeliveryNoteInFromOffersInRowsRows_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
If View.Id = "OfferOutHeader_ListView_OfferOutHeaderInHeader" Then
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id = "OfferInHeader_ListView_Editable" Then
Frame.GetController(Of OffersInVC).aOffersInFinal.Active.SetItemValue("", False)
End If
If View.Id = "OfferInHeader_ListView" Then
Frame.GetController(Of OffersInVC).aOfferIn_ChangeState.Active.SetItemValue("", False)
RemoveHandler View.SelectionChanged, AddressOf OfferInHeader_OfferInRows_ListView_SelectionChanged
End If
If View.Id = "OfferInHeader_OfferInRows_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)
Frame.GetController(Of OffersInVC).aOfferIn_ChangeState.Active.SetItemValue("", True)
Frame.GetController(Of OffersInVC).aUp_OfferIn.Active.SetItemValue("", False)
Frame.GetController(Of OffersInVC).aDown_OfferIn.Active.SetItemValue("", False)
Frame.GetController(Of OffersInVC).aOffersIn_ChangeRows.Active.SetItemValue("", False)
RemoveHandler View.SelectionChanged, AddressOf OfferInHeader_OfferInRows_ListView_SelectionChanged
End If
If View.Id = "OfferInHeader_DetailView" Then
Dim _OfferInHeader As OfferInHeader = TryCast(View.SelectedObjects(0), OfferInHeader)
If _OfferInHeader IsNot Nothing Then
If _OfferInHeader.IsEditable = True Then
Frame.GetController(Of OffersInVC).aOffersInFinal.Active.SetItemValue("", False)
Frame.GetController(Of OffersInVC).aTotable_OfferIn.Active.SetItemValue("", False)
Frame.GetController(Of OffersInVC).aTotableD_OfferIn.Active.SetItemValue("", False)
Frame.GetController(Of OffersInVC).aBackToRowEdit_OfferIn.Active.SetItemValue("", False)
End If
End If
End If
If View.Id = "OfferInHeader_ListView_Subcontractor" Then
Frame.GetController(Of OffersInVC)().aPrintOfferIn.Active.SetItemValue("", True)
Frame.GetController(Of OffersInVC)().aCloneOfferIn.Active.SetItemValue("", True)
Frame.GetController(Of OffersInVC)().aOfferIn_CreateDeliveryNoteIn.Active.SetItemValue("", True)
End If
If View.Id = "DeliveryNoteInFromOffersInRowsHeader_DeliveryNoteInFromOffersInRowsRows_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
If View.Id = "OfferOutHeader_ListView_OfferOutHeaderInHeader" Then
Frame.GetController(Of DevExpress.ExpressApp.CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
End If
End Sub
Private Sub OfferInHeader_OfferInRows_ListView_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs)
If View Is Nothing Then Exit Sub
If _noselect = False Then
If View.SelectedObjects.Count > 0 Then
_selection.Clear()
For Each _OfferOutRows In View.SelectedObjects
_selection.Add(_OfferOutRows)
Next
End If
End If
End Sub
Private Sub aTotable_OfferIn_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aTotable_OfferIn.Execute
'hozzáadás fejléchez
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _OfferInHeader As OfferInHeader = CType(View.SelectedObjects(0), OfferInHeader)
Dim _OfferInRows As OfferInRows
_OfferInRows = _ocur.CreateObject(Of OfferInRows)()
_OfferInRows.OfferInHeader = _OfferInHeader
Dim ItemToFocus As ViewItem = TryCast(View, DetailView).FindItem("row_Products")
If ItemToFocus IsNot Nothing Then
Dim ItemControl As Object
ItemControl = ItemToFocus.Control
ItemControl.Focus()
End If
_OfferInRows.AddRows(_OfferInHeader)
_ocur.CommitChanges()
_OfferInHeader.row_Installation = Nothing
_OfferInHeader.row_Products = Nothing
_OfferInHeader.row_Units = Nothing
_OfferInHeader.row_VAT = Nothing
_OfferInHeader.row_ShortName = ""
_OfferInHeader.row_QTT = 0
_OfferInHeader.row_Description = ""
_OfferInHeader.row_FinalPriceDEV = 0
_OfferInHeader.row_FinalPriceHUF = 0
_OfferInHeader.row_RowGroup1 = ""
_OfferInHeader.row_RowGroup2 = ""
If Frame.GetController(Of RefreshController).RefreshAction.Enabled Then
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
End If
End Sub
Private Sub aTotableD_OfferIn_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aTotableD_OfferIn.Execute
'sor törlése
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _OfferInHeader As OfferInHeader = TryCast(e.SelectedObjects(0), OfferInHeader)
Dim _OfferInRows_Collection As ArrayList = New ArrayList
Dim _OfferInRows_ListPropertyEditor As ListPropertyEditor = TryCast(View, DetailView).FindItem("OfferInRows")
For Each _OfferInRows In _OfferInRows_ListPropertyEditor.ListView.SelectedObjects
Dim _OfferInRows_Act As OfferInRows = _OfferInRows
For Each _OfferInRows_ActHeader As OfferInRows In _OfferInHeader.OfferInRows
If _OfferInRows_ActHeader.RowIndex > _OfferInRows_Act.RowIndex Then
_OfferInRows_ActHeader.RowIndex -= 1
End If
Next
Next
For Each _OfferInRows As OfferInRows In _OfferInRows_ListPropertyEditor.ListView.SelectedObjects
_OfferInRows_Collection.Add(_OfferInRows)
Next
_ocur.Delete(_OfferInRows_Collection)
_ocur.CommitChanges()
If Frame.GetController(Of RefreshController).RefreshAction.Enabled Then
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
End If
End Sub
Private Sub aUp_OfferIn_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aUp_OfferIn.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _OfferInHeader As OfferInHeader
Dim _OfferInRowsSelected As OfferInRows
Dim _OfferInRowsMinus As OfferInRows
Dim _OfferInRows As OfferInRows
Try
_OfferInRowsSelected = TryCast(View.SelectedObjects(0), OfferInRows) ' Kiveszi a kijelölt sorok közül az elsõt
_OfferInHeader = _OfferInRowsSelected.OfferInHeader
Catch
Throw New Exception("*Nincs sor kiválasztva, vagy nem a sor kijelölése az aktív!")
End Try
If _OfferInRowsSelected.RowIndex > 0 Then
For Each _OfferInRows In _OfferInHeader.OfferInRows
If _OfferInRows.RowIndex = _OfferInRowsSelected.RowIndex - 1 Then
_OfferInRowsMinus = _OfferInRows
Exit For
End If
Next
If _OfferInRowsMinus IsNot Nothing Then
_OfferInRowsSelected.RowIndex -= 1
_OfferInRowsMinus.RowIndex += 1
End If
_OfferInRowsMinus.Save()
_OfferInRowsSelected.Save()
_ocur.CommitChanges()
'If Frame.GetController(Of RefreshController).RefreshAction.Enabled Then
' Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
'End If
End If
End Sub
Private Sub aDown_OfferIn_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aDown_OfferIn.Execute
'kiválasztott sort lejebb rendzei
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _OfferInHeader As OfferInHeader
Dim _OfferInRowsSelected As OfferInRows
Dim _OfferInRowsMinus As OfferInRows
Dim _OfferInRows As OfferInRows
Try
_OfferInRowsSelected = TryCast(View.SelectedObjects(0), OfferInRows) ' Kiveszi a kijelölt sorok közül az elsõt
_OfferInHeader = _OfferInRowsSelected.OfferInHeader
Catch
Throw New Exception("*Nincs sor kiválasztva, vagy nem a sor kijelölése az aktív!")
End Try
If _OfferInRowsSelected.RowIndex < _OfferInHeader.OfferInRows.Count - 1 Then
For Each _OfferInRows In _OfferInHeader.OfferInRows
If _OfferInRows.RowIndex = _OfferInRowsSelected.RowIndex + 1 Then
_OfferInRowsMinus = _OfferInRows
Exit For
End If
Next
If _OfferInRowsMinus IsNot Nothing Then
_OfferInRowsSelected.RowIndex += 1
_OfferInRowsMinus.RowIndex -= 1
End If
_OfferInRowsMinus.Save()
_OfferInRowsSelected.Save()
_ocur.CommitChanges()
'If Frame.GetController(Of RefreshController).RefreshAction.Enabled Then
' Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
'End If
End If
End Sub
'Private Sub aCloneOfferIn_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCloneOfferIn.Execute
' 'kivélasztott bejövõ megrendelés klónozása sorokkal...
' Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
' Dim _OfferInHeader As OfferInHeader = _onew.GetObject(TryCast(e.SelectedObjects(0), OfferInHeader))
' Dim _OfferInHeader_NEW As OfferInHeader = _onew.CreateObject(Of OfferInHeader)()
' Dim _OfferInRows As OfferInRows
' 'Fejlés
' _OfferInHeader_NEW.Contact = _OfferInHeader.Contact
' _OfferInHeader_NEW.CRM_Opportunities = _OfferInHeader.CRM_Opportunities
' _OfferInHeader_NEW.CurrencyName = _OfferInHeader.CurrencyName
' _OfferInHeader_NEW.Customers = _OfferInHeader.Customers
' _OfferInHeader_NEW.CustomersFrom = _OfferInHeader.CustomersFrom
' _OfferInHeader_NEW.DateCreated = _OfferInHeader.DateCreated
' _OfferInHeader_NEW.DateExecution = _OfferInHeader.DateExecution
' _OfferInHeader_NEW.DatePayment = _OfferInHeader.DatePayment
' _OfferInHeader_NEW.Description = _OfferInHeader.Description
' _OfferInHeader_NEW.DocumentBody = _OfferInHeader.DocumentBody
' _OfferInHeader_NEW.OfferLOSTReasonDescription = _OfferInHeader.OfferLOSTReasonDescription
' _OfferInHeader_NEW.PaymentOption = _OfferInHeader.PaymentOption
' _OfferInHeader_NEW.QualityOption = _OfferInHeader.QualityOption
' _OfferInHeader_NEW.DocumentNumber = ""
' _OfferInHeader_NEW.IsEditable = True
' _OfferInHeader_NEW.IsStorno = False
' _OfferInHeader_NEW.Save()
' 'sorok átpakolása
' For Each _OfferInRows In _OfferInHeader.OfferInRows
' Dim _OfferInRows_NEW As OfferInRows = _onew.CreateObject(Of OfferInRows)()
' _OfferInRows_NEW.OfferInHeader = _OfferInHeader_NEW
' _OfferInRows_NEW.Description = _OfferInRows.Description
' _OfferInRows_NEW.DescriptionPrivate = _OfferInRows.DescriptionPrivate
' _OfferInRows_NEW.FinalPriceDEV = _OfferInRows.FinalPriceDEV
' _OfferInRows_NEW.FinalPriceHUF = _OfferInRows.FinalPriceHUF
' _OfferInRows_NEW.Installation = _OfferInRows.Installation
' _OfferInRows_NEW.Product = _OfferInRows.Product
' _OfferInRows_NEW.QTT = _OfferInRows.QTT
' _OfferInRows_NEW.QualityOption = _OfferInRows.QualityOption
' _OfferInRows_NEW.RowIndex = _OfferInRows.RowIndex
' _OfferInRows_NEW.RowType = _OfferInRows.RowType
' _OfferInRows_NEW.ShortName = _OfferInRows.ShortName
' _OfferInRows_NEW.SumPriceDEV = _OfferInRows.SumPriceDEV
' _OfferInRows_NEW.SumPriceHUF = _OfferInRows.SumPriceHUF
' _OfferInRows_NEW.Save()
' Next
' e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, _OfferInHeader_NEW)
'End Sub 'Egykori CLONE action - R.IP
Private Sub aOffersInFinal_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aOffersInFinal.Execute
'Véglegesítés
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _OfferInHeader As OfferInHeader = TryCast(View.SelectedObjects(0), OfferInHeader)
If _OfferInHeader IsNot Nothing Then
If _OfferInHeader.DocumentNumber = "" Then
_OfferInHeader.DocumentNumber = _OfferInHeader.OfferInParameters.NumberGenerator.GetNewNumber(_OfferInHeader.OfferInParameters.NumberGenerator)
End If
_OfferInHeader.IsEditable = False
_OfferInHeader.Save()
_ocur.CommitChanges()
Else
Throw New UserFriendlyException("Nincs kiválasztott sor!")
End If
If Frame.GetController(Of RefreshController).RefreshAction.Enabled Then
Frame.GetController(Of RefreshController).RefreshAction.DoExecute()
End If
End Sub
Private Sub aOffersIn_ChangeRows_Cancel(sender As Object, e As System.EventArgs) Handles aOffersIn_ChangeRows.Cancel
_noselect = False
End Sub
Private Sub aOffersIn_ChangeRows_CustomizePopupWindowParams(sender As System.Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aOffersIn_ChangeRows.CustomizePopupWindowParams
_noselect = True
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _OfferInRows_ChangeGroup As OfferInRows_ChangeGroup = _onew.CreateObject(Of OfferInRows_ChangeGroup)()
If View.SelectedObjects.Count > 0 Then
Dim _OfferInRows As OfferInRows = TryCast(View.SelectedObjects(0), OfferInRows)
_OfferInRows_ChangeGroup.ShortName = _onew.GetObject(_OfferInRows.ShortName)
_OfferInRows_ChangeGroup.Description = _onew.GetObject(_OfferInRows.Description)
_OfferInRows_ChangeGroup.DescriptionPrivate = _onew.GetObject(_OfferInRows.DescriptionPrivate)
_OfferInRows_ChangeGroup.QualityOption = _onew.GetObject(_OfferInRows.QualityOption)
_OfferInRows_ChangeGroup.Units = _onew.GetObject(_OfferInRows.Units)
_OfferInRows_ChangeGroup.VAT = _onew.GetObject(_OfferInRows.VAT)
e.View = Application.CreateDetailView(_onew, "OfferInRows_ChangeGroup_DetailView", False, _OfferInRows_ChangeGroup)
Else
Throw New UserFriendlyException("Nincs kijelölt elem!")
End If
End Sub
Private Sub aOffersIn_ChangeRows_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aOffersIn_ChangeRows.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _OfferInRows_ChangeGroup As OfferInRows_ChangeGroup = TryCast(e.PopupWindow.View.SelectedObjects(0), OfferInRows_ChangeGroup)
For Each _OfferInRows As OfferInRows In _selection
If _OfferInRows_ChangeGroup.Change_Description Then
_OfferInRows.Description = _OfferInRows_ChangeGroup.Description
End If
If _OfferInRows_ChangeGroup.Change_DescriptionPrivate Then
_OfferInRows.DescriptionPrivate = _OfferInRows_ChangeGroup.DescriptionPrivate
End If
If _OfferInRows_ChangeGroup.Change_QualityOption Then
_OfferInRows.QualityOption = _ocur.GetObjectByKey(Of QualityOption)(_OfferInRows_ChangeGroup.QualityOption.Oid)
End If
If _OfferInRows_ChangeGroup.Change_ShortName Then
_OfferInRows.ShortName = _OfferInRows_ChangeGroup.ShortName
End If
If _OfferInRows_ChangeGroup.Change_Units Then
_OfferInRows.Units = _ocur.GetObjectByKey(Of Units)(_OfferInRows_ChangeGroup.Units.Oid)
End If
If _OfferInRows_ChangeGroup.Change_VAT Then
_OfferInRows.VAT = _ocur.GetObjectByKey(Of VAT)(_OfferInRows_ChangeGroup.VAT.Oid)
End If
If _OfferInRows_ChangeGroup.Change_RowGroup1 Then
_OfferInRows.RowGroup1 = _OfferInRows_ChangeGroup.RowGroup1
End If
If _OfferInRows_ChangeGroup.Change_RowGroup2 Then
_OfferInRows.RowGroup2 = _OfferInRows_ChangeGroup.RowGroup2
End If
Next
_ocur.CommitChanges()
_noselect = False
End Sub
Private Sub aInsertServicesToOfferIN_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aInsertServicesToOfferIN.CustomizePopupWindowParams
Dim _OfferInHeader As OfferInHeader = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, OfferInHeader)
If _OfferInHeader.IsEditable Then
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)
Else
'----------TESZT MIATT-----------------------------------------
Throw New Exception("*A bejövő árajánlat végleges vagy stornó!")
End If
End Sub
Private Sub aInsertServicesToOfferIN_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aInsertServicesToOfferIN.Execute
'A popup-on kiválasztott szolgáltatásokból létrehoz bejövő árajánlati sorokat
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _OfferInHeader As OfferInHeader = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, OfferInHeader)
Dim _Services As Services
Dim _OfferInRows_New As OfferInRows
For Each _Services In e.PopupWindow.View.SelectedObjects
_OfferInRows_New = _ocur.CreateObject(Of OfferInRows)()
_OfferInRows_New.RowType = eRowType.IsOther
_OfferInRows_New.OfferInHeader = _OfferInHeader
_OfferInRows_New.ShortName = _Services.ShortName
_OfferInRows_New.Description = _Services.Description
_OfferInRows_New.Units = _ocur.GetObject(_Services.Units)
_OfferInRows_New.FinalPriceDEV = _Services.ListPriceDEV
_OfferInRows_New.FinalPriceHUF = _Services.ListPriceHUF
_OfferInRows_New.SumPriceDEV = _Services.ListPriceDEV
_OfferInRows_New.SumPriceHUF = _Services.ListPriceHUF
_OfferInRows_New.VAT = _ocur.GetObject(_Services.VAT)
_OfferInRows_New.QTT = 1
'Indexelés
If _OfferInHeader.OfferInRows.Count = 0 Then
_OfferInRows_New.RowIndex = 0
Else
_OfferInRows_New.RowIndex = _OfferInHeader.OfferInRows.Count - 1
End If
' _OfferInRows_New.Save()
Next
_ocur.CommitChanges()
End Sub
Private Sub aBackToRowEdit_OfferIn_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aBackToRowEdit_OfferIn.Execute
Dim _OfferInHeader As OfferInHeader = TryCast(View.SelectedObjects(0), OfferInHeader)
Dim _ListView As ListPropertyEditor = TryCast(View, DetailView).FindItem("OfferInRows") 'Sorok összeszedése
If _ListView IsNot Nothing Then
If _ListView.ListView.SelectedObjects.Count > 0 Then
Dim _OfferInRows As OfferInRows = _ListView.ListView.SelectedObjects(0)
_OfferInHeader.row_Description = _OfferInRows.Description
_OfferInHeader.row_FinalPriceDEV = _OfferInRows.FinalPriceDEV
_OfferInHeader.row_FinalPriceHUF = _OfferInRows.FinalPriceHUF
_OfferInHeader.row_Installation = _OfferInRows.Installation
_OfferInHeader.row_Products = _OfferInRows.Product
_OfferInHeader.row_QTT = _OfferInRows.QTT
_OfferInHeader.row_RowGroup1 = _OfferInRows.RowGroup1
_OfferInHeader.row_RowGroup2 = _OfferInRows.RowGroup2
_OfferInHeader.row_RowType = _OfferInRows.RowType
_OfferInHeader.row_ShortName = _OfferInRows.ShortName
_OfferInHeader.row_Units = _OfferInRows.Units
_OfferInHeader.row_VAT = _OfferInRows.VAT
View.Refresh()
Else
Throw New Exception("*Nincs kiválasztott sor!")
End If
End If
End Sub
Private Sub aOfferIn_ChangeState_Cancel(sender As Object, e As System.EventArgs) Handles aOfferIn_ChangeState.Cancel
_noselect = False
End Sub
Private Sub aOfferIn_ChangeState_CustomizePopupWindowParams(sender As System.Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aOfferIn_ChangeState.CustomizePopupWindowParams
_noselect = True
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _OfferIn_ChangeState_PopUp As OfferIn_ChangeState_PopUp = _onew.CreateObject(Of OfferIn_ChangeState_PopUp)()
e.View = Application.CreateDetailView(_onew, "OfferIn_ChangeState_PopUp_DetailView", False, _OfferIn_ChangeState_PopUp)
End Sub
Private Sub aOfferIn_ChangeState_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aOfferIn_ChangeState.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _OfferIn_ChangeState_PopUp As OfferIn_ChangeState_PopUp = TryCast(e.PopupWindow.View.SelectedObjects(0), OfferIn_ChangeState_PopUp)
For Each _OfferInHeader As OfferInHeader In _selection
_OfferInHeader.OfferInState = _ocur.GetObject(_OfferIn_ChangeState_PopUp.OfferInState)
If _OfferIn_ChangeState_PopUp.OfferInState = eOfferInState.eClosedLOST Then
_OfferInHeader.OfferLOSTReasonDescription = _OfferIn_ChangeState_PopUp.OfferLOSTReasonDescription
_OfferInHeader.OfferLOSTReason = _ocur.GetObject(_OfferIn_ChangeState_PopUp.OfferLOSTReason)
End If
Next
_ocur.CommitChanges()
_noselect = False
End Sub
Private Sub aCloneOfferIn_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aCloneOfferIn.Execute
'//Bejövő ajánlat klónozása a soraival együtt + DetailView benyitása mentés nélkül _onew-en
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _OfferInHeader_Base As OfferInHeader = TryCast(View.SelectedObjects(0), OfferInHeader)
Dim _OfferInHeader As OfferInHeader
Dim _OfferInRows As OfferInRows
Dim _OfferInRows_Base As OfferInRows
If _OfferInHeader_Base IsNot Nothing Then
'//Fejléc klónozása
_OfferInHeader = _onew.CreateObject(Of OfferInHeader)()
_OfferInHeader.Contact = _onew.GetObject(_OfferInHeader_Base.Contact)
_OfferInHeader.CRM_Opportunities = _onew.GetObject(_OfferInHeader_Base.CRM_Opportunities)
_OfferInHeader.CurrencyName = _onew.GetObject(_OfferInHeader_Base.CurrencyName)
_OfferInHeader.Customers = _onew.GetObject(_OfferInHeader_Base.Customers)
_OfferInHeader.CustomersFrom = _onew.GetObject(_OfferInHeader_Base.CustomersFrom)
_OfferInHeader.DateDue = _OfferInHeader_Base.DateDue
_OfferInHeader.DateExecution = _OfferInHeader_Base.DateExecution
_OfferInHeader.DatePayment = _OfferInHeader_Base.DatePayment
_OfferInHeader.Description = _OfferInHeader_Base.Description
_OfferInHeader.IsEditable = True
_OfferInHeader.IsStorno = False
_OfferInHeader.OfferInParameters = _onew.GetObject(_OfferInHeader_Base.OfferInParameters)
_OfferInHeader.OfferInState = eOfferInState.eInProgress
_OfferInHeader.PaymentOption = _onew.GetObject(_OfferInHeader_Base.PaymentOption)
For Each _OfferInRows_Base In _OfferInHeader_Base.OfferInRows
_OfferInRows = _onew.CreateObject(Of OfferInRows)()
_OfferInRows.Description = _OfferInRows_Base.Description
_OfferInRows.DescriptionPrivate = _OfferInRows_Base.DescriptionPrivate
_OfferInRows.FinalPriceDEV = _OfferInRows_Base.FinalPriceDEV
_OfferInRows.FinalPriceHUF = _OfferInRows_Base.FinalPriceHUF
_OfferInRows.Installation = _onew.GetObject(_OfferInRows_Base.Installation)
_OfferInRows.OfferInHeader = _OfferInHeader
_OfferInRows.Product = _onew.GetObject(_OfferInRows_Base.Product)
_OfferInRows.QTT = _OfferInRows_Base.QTT
_OfferInRows.QualityOption = _onew.GetObject(_OfferInRows_Base.QualityOption)
_OfferInRows.RowGroup1 = _OfferInRows_Base.RowGroup1
_OfferInRows.RowGroup2 = _OfferInRows_Base.RowGroup2
_OfferInRows.RowIndex = _OfferInRows_Base.RowIndex
_OfferInRows.RowType = _OfferInRows_Base.RowType
_OfferInRows.ShortName = _OfferInRows_Base.ShortName
_OfferInRows.Units = _onew.GetObject(_OfferInRows_Base.Units)
_OfferInRows.VAT = _onew.GetObject(_OfferInRows_Base.VAT)
Next
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "OfferInHeader_DetailView", True, _OfferInHeader)
End If
End Sub
Private Sub aPrintOfferIn_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aPrintOfferIn.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _OfferInHeader As OfferInHeader
Dim _ReportData As ReportData
If e.SelectedObjects.Count > 0 Then
_OfferInHeader = TryCast(e.SelectedObjects(0), OfferInHeader)
If _OfferInHeader IsNot Nothing Then
_ReportData = _OfferInHeader.OfferInParameters.ReportData
If _ReportData IsNot Nothing Then
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("OfferInHeader=?", _OfferInHeader), True)
Else
Throw New Exception("*Nincs nyomtatvány beállítva !")
End If
End If
End If
End Sub
Private Sub aOfferIn_CreateDeliveryNoteIn_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aOfferIn_CreateDeliveryNoteIn.CustomizePopupWindowParams
Try
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace()
Dim _OfferInRows As OfferInRows
Dim _OfferInHeader As OfferInHeader = _onew.GetObject(TryCast(View.SelectedObjects(0), OfferInHeader))
Dim _DeliveryNoteInFromOffersInRowsHeader As New DeliveryNoteInFromOffersInRowsHeader(_onew.Session)
Dim _QTT_Sum As Double = 0
_DeliveryNoteInFromOffersInRowsHeader.OfferInHeader = _OfferInHeader
_DeliveryNoteInFromOffersInRowsHeader.OfferInHeader.DateCreated = GetSQLTime(_onew.Session)
Dim _OfferInRows_XPQuery As New XPQuery(Of DeliveryNoteInRows)(_onew.Session)
Dim query = From _DNIR In _OfferInRows_XPQuery
Where _DNIR.OfferInRows.OfferInHeader Is _OfferInHeader
Group _DNIR By _DNIR.OfferInRows Into g = Group _
Select New With {Key .OfferInRows = OfferInRows,
Key .QTT_Sum = g.Sum(Function(inv) inv.QTT)}
For Each _OfferInRows In _OfferInHeader.OfferInRows
_QTT_Sum = 0
For Each item In query
If item.OfferInRows.Oid = _OfferInRows.Oid Then
_QTT_Sum = item.QTT_Sum
End If
Next
If _OfferInRows.QTT > _QTT_Sum Then
Dim _DeliveryNoteInFromOffersInRowsRows As New DeliveryNoteInFromOffersInRowsRows(_onew.Session)
_DeliveryNoteInFromOffersInRowsRows.OfferInRows = _OfferInRows
_DeliveryNoteInFromOffersInRowsRows.DeliveryNoteInFromOrderOutRowsHeader = _DeliveryNoteInFromOffersInRowsHeader
_DeliveryNoteInFromOffersInRowsRows.QTT_Process = _OfferInRows.QTT - _QTT_Sum
_DeliveryNoteInFromOffersInRowsRows.Save()
End If
Next
_DeliveryNoteInFromOffersInRowsHeader.Save()
_onew.CommitChanges()
e.View = Application.CreateDetailView(_onew, _DeliveryNoteInFromOffersInRowsHeader, False)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
End Try
End Sub
Private Sub aOfferIn_CreateDeliveryNoteIn_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aOfferIn_CreateDeliveryNoteIn.Execute
Try
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _DeliveryNoteInHeader As New DeliveryNoteInHeader(_ocur.Session)
Dim _DeliveryNoteInFromOffersInRowsHeader As DeliveryNoteInFromOffersInRowsHeader = _ocur.GetObject(TryCast(e.PopupWindow.View.SelectedObjects(0), DeliveryNoteInFromOffersInRowsHeader))
Dim _DeliveryNoteInFromOffersInRowsRows_ListEditor As ListPropertyEditor = TryCast(e.PopupWindow.View, DetailView).FindItem("DeliveryNoteInFromOffersInRowsRows")
Dim _DeliveryNoteInType As DeliveryNoteInType = _ocur.GetObjectByKey(Of DeliveryNoteInType)(TryCast(e.PopupWindow.View.SelectedObjects(0), DeliveryNoteInFromOffersInRowsHeader).DeliveryNoteInType.Oid)
_DeliveryNoteInHeader.CurrencyName = _DeliveryNoteInFromOffersInRowsHeader.OfferInHeader.CurrencyName
_DeliveryNoteInHeader.CustomersFrom = _DeliveryNoteInFromOffersInRowsHeader.OfferInHeader.CustomersFrom
_DeliveryNoteInHeader.PaymentOption = _DeliveryNoteInFromOffersInRowsHeader.OfferInHeader.PaymentOption
_DeliveryNoteInHeader.QualityOption = _DeliveryNoteInFromOffersInRowsHeader.OfferInHeader.QualityOption
_DeliveryNoteInHeader.Customers = _DeliveryNoteInFromOffersInRowsHeader.OfferInHeader.Customers
_DeliveryNoteInHeader.DeliveryNoteInType = _DeliveryNoteInType
For _ik = 0 To _DeliveryNoteInFromOffersInRowsRows_ListEditor.ListView.SelectedObjects.Count - 1
Dim _DeliveryNoteInRows As DeliveryNoteInRows = _ocur.CreateObject(Of DeliveryNoteInRows)()
Dim _QTT_Process As Double = 0
Dim _DeliveryNoteInFromOffersInRowsRows As DeliveryNoteInFromOffersInRowsRows = _ocur.GetObject(TryCast(_DeliveryNoteInFromOffersInRowsRows_ListEditor.ListView.SelectedObjects(_ik), DeliveryNoteInFromOffersInRowsRows))
_QTT_Process = TryCast(_DeliveryNoteInFromOffersInRowsRows_ListEditor.ListView.SelectedObjects(_ik), DeliveryNoteInFromOffersInRowsRows).QTT_Process 'szándék
_DeliveryNoteInRows.DeliveryNoteInHeader = _DeliveryNoteInHeader
_DeliveryNoteInRows.OfferInRows = _DeliveryNoteInFromOffersInRowsRows.OfferInRows
_DeliveryNoteInRows.Products = _DeliveryNoteInFromOffersInRowsRows.OfferInRows.Product
_DeliveryNoteInRows.QTT = _QTT_Process
_DeliveryNoteInRows.VAT = _DeliveryNoteInFromOffersInRowsRows.OfferInRows.Product.VAT
_DeliveryNoteInRows.Units = _DeliveryNoteInFromOffersInRowsRows.OfferInRows.Product.Units
_DeliveryNoteInRows.ListPriceHUF = _DeliveryNoteInFromOffersInRowsRows.OfferInRows.FinalPriceHUF
_DeliveryNoteInRows.ListPriceDEV = _DeliveryNoteInFromOffersInRowsRows.OfferInRows.FinalPriceDEV
_DeliveryNoteInRows.DiscountPriceHUF = 0
_DeliveryNoteInRows.DiscountPriceDEV = 0
_DeliveryNoteInRows.RowIndex = _ik + 1
'_DeliveryNoteInRows.Save()
Next
'_DeliveryNoteInHeader.Save()
_ocur.CommitChanges()
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _ShowViewParameters As New ShowViewParameters
Dim _ShowViewSource As New ShowViewSource(Frame, Nothing)
_ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "DeliveryNoteInHeader_DetailView", False, _onew.GetObject(_DeliveryNoteInHeader))
_ShowViewParameters.NewWindowTarget = NewWindowTarget.MdiChild
_ShowViewParameters.TargetWindow = TargetWindow.NewWindow
Application.ShowViewStrategy.ShowView(_ShowViewParameters, _ShowViewSource)
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly)
End Try
End Sub
Private Sub aOfferIn_RegenerateDEV_CustomizePopupWindowParams(sender As Object, e As DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventArgs) Handles aOfferIn_RegenerateDEV.CustomizePopupWindowParams
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _OfferIn_RegenerateDEV_Popup As OfferIn_RegenerateDEV_Popup = _onew.CreateObject(Of OfferIn_RegenerateDEV_Popup)()
Dim _OfferInHeader As OfferInHeader = _onew.GetObject(TryCast(View.SelectedObjects(0), OfferInHeader))
Dim _CurrencyRate_Collection As New XPCollection(Of CurrencyRate)(_onew.Session, CriteriaOperator.Parse("CurrencyName=? and IsMNB=True", _OfferInHeader.CurrencyName))
Dim _CurrencyRate As CurrencyRate
_CurrencyRate_Collection.Sorting.Add(New SortProperty("DateValid", DB.SortingDirection.Descending))
_OfferIn_RegenerateDEV_Popup.CurrencyName = _OfferInHeader.CurrencyName
_OfferIn_RegenerateDEV_Popup.PriceMode = ePriceMode.eDEVToHUF
For Each _CurrencyRate In _CurrencyRate_Collection
_OfferIn_RegenerateDEV_Popup.CurrencyRate = _CurrencyRate.RateAverage
_OfferIn_RegenerateDEV_Popup.DateExecution = _CurrencyRate.DateValid
Exit For
Next
e.View = Application.CreateDetailView(_onew, "OfferIn_RegenerateDEV_Popup_DetailView", False, _OfferIn_RegenerateDEV_Popup)
End Sub
Private Sub aOfferIn_RegenerateDEV_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.PopupWindowShowActionExecuteEventArgs) Handles aOfferIn_RegenerateDEV.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _OfferInHeader As OfferInHeader = _ocur.GetObject(TryCast(View.SelectedObjects(0), OfferInHeader))
Dim _OfferIn_RegenerateDEV_Popup As OfferIn_RegenerateDEV_Popup = TryCast(e.PopupWindow.View.SelectedObjects(0), OfferIn_RegenerateDEV_Popup)
Dim _OfferInRows As OfferInRows
For Each _OfferInRows In _OfferInHeader.OfferInRows
If _OfferIn_RegenerateDEV_Popup.PriceMode = ePriceMode.eDEVToHUF Then
_OfferInRows.FinalPriceHUF = Math.Round(_OfferInRows.FinalPriceDEV * _OfferIn_RegenerateDEV_Popup.CurrencyRate, 2, MidpointRounding.AwayFromZero)
Else
If _OfferIn_RegenerateDEV_Popup.CurrencyRate <> 0 Then
_OfferInRows.FinalPriceDEV = Math.Round(_OfferInRows.FinalPriceHUF / _OfferIn_RegenerateDEV_Popup.CurrencyRate, 2, MidpointRounding.AwayFromZero)
End If
End If
Next
_ocur.CommitChanges()
End Sub
Private Sub aOfferInHeader_AddOfferOutHeader_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aOfferInHeader_AddOfferOutHeader.CustomizePopupWindowParams
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _OfferInHeader As OfferInHeader = TryCast(View.SelectedObjects(0), OfferInHeader)
Dim _OfferOutHeader_CollectionSource As New CollectionSource(_onew, GetType(OfferOutHeader))
_OfferOutHeader_CollectionSource.BeginUpdateCriteria()
_OfferOutHeader_CollectionSource.Criteria.Add("CRM", CriteriaOperator.Parse("CRM_Opportunities=?", _onew.GetObject(_OfferInHeader.CRM_Opportunities)))
_OfferOutHeader_CollectionSource.EndUpdateCriteria()
e.View = Application.CreateListView("OfferOutHeader_ListView_OfferOutHeaderInHeader", _OfferOutHeader_CollectionSource, False)
End Sub
Private Sub aOfferInHeader_AddOfferOutHeader_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aOfferInHeader_AddOfferOutHeader.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _OfferInHeader As OfferInHeader = TryCast(View.SelectedObjects(0), OfferInHeader)
For Each _OfferOutHeader As OfferOutHeader In e.PopupWindow.View.SelectedObjects
Dim _OfferOutHeaderInHeader As New OfferOutHeaderInHeader(_ocur.Session)
With _OfferOutHeaderInHeader
.OfferInHeader = _OfferInHeader
.OfferOutHeader = _ocur.GetObject(_OfferOutHeader)
End With
Next
_ocur.CommitChanges()
End Sub
End Class
@@ -0,0 +1,216 @@
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)> _
<DeferredDeletion(False)> _
Public Class OfferOutCostRows 'Az ajánlat egyes sorai mennyibe kerülnek ?
Inherits BaseObject
Private _OfferOutHeader As OfferOutHeader
Private _OfferOutRows As OfferOutRows
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 _RowIndex As Long 'Sor index (mozgathatónak kell lennie !)
Private _ShortName As String
Private _Description As String
Private _QTT As Double
Private _Units As Units
Private _FinalPriceHUF_Out As Double
Private _FinalPriceDEV_Out As Double
Private _SumPriceHUF_Out As Double
Private _SumPriceDEV_Out As Double
Private _FinalPriceHUF_In As Double
Private _FinalPriceDEV_In As Double
Private _SumPriceHUF_In As Double
Private _SumPriceDEV_In As Double
Private _DifferentPercent As Double
Private _DifferentHUF As Double
Private _DifferentDEV As Double
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Association("OfferOutCostRows", GetType(OfferOutHeader))> _
Property OfferOutHeader As OfferOutHeader
Get
Return _OfferOutHeader
End Get
Set(value As OfferOutHeader)
SetPropertyValue("OfferOutHeader", _OfferOutHeader, value)
End Set
End Property
Property OfferOutRows As OfferOutRows
Get
Return _OfferOutRows
End Get
Set(value As OfferOutRows)
SetPropertyValue("OfferOutRows", _OfferOutRows, 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 RowIndex() As Long
Get
Return _RowIndex
End Get
Set(ByVal value As Long)
SetPropertyValue("RowIndex", _RowIndex, 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 FinalPriceHUF_Out As Double
Get
Return _FinalPriceHUF_Out
End Get
Set(value As Double)
SetPropertyValue("FinalPriceHUF_Out", _FinalPriceHUF_Out, value)
End Set
End Property
Property FinalPriceDEV_Out As Double
Get
Return _FinalPriceDEV_Out
End Get
Set(value As Double)
SetPropertyValue("FinalPriceDEV_Out", _FinalPriceDEV_Out, value)
End Set
End Property
Property SumPriceHUF_Out As Double
Get
Return _SumPriceHUF_Out
End Get
Set(value As Double)
SetPropertyValue("SumPriceHUF_Out", _SumPriceHUF_Out, value)
End Set
End Property
Property SumPriceDEV_Out As Double
Get
Return _SumPriceDEV_Out
End Get
Set(value As Double)
SetPropertyValue("SumPriceDEV_Out", _SumPriceDEV_Out, value)
End Set
End Property
Property FinalPriceHUF_In As Double
Get
Return _FinalPriceHUF_In
End Get
Set(value As Double)
SetPropertyValue("FinalPriceHUF_In", _FinalPriceHUF_In, value)
End Set
End Property
Property FinalPriceDEV_In As Double
Get
Return _FinalPriceDEV_In
End Get
Set(value As Double)
SetPropertyValue("FinalPriceDEV_In", _FinalPriceDEV_In, value)
End Set
End Property
Property SumPriceHUF_In As Double
Get
Return _SumPriceHUF_In
End Get
Set(value As Double)
SetPropertyValue("SumPriceHUF_In", _SumPriceHUF_In, value)
End Set
End Property
Property SumPriceDEV_In As Double
Get
Return _SumPriceDEV_In
End Get
Set(value As Double)
SetPropertyValue("SumPriceDEV_In", _SumPriceDEV_In, value)
End Set
End Property
Property DifferentPercent As Double
Get
Return _DifferentPercent
End Get
Set(value As Double)
SetPropertyValue("DifferentPercent", _DifferentPercent, value)
End Set
End Property
Property DifferentHUF As Double
Get
Return _DifferentHUF
End Get
Set(value As Double)
SetPropertyValue("DifferentHUF", _DifferentHUF, value)
End Set
End Property
Property DifferentDEV As Double
Get
Return _DifferentDEV
End Get
Set(value As Double)
SetPropertyValue("DifferentDEV", _DifferentDEV, value)
End Set
End Property
End Class
@@ -0,0 +1,858 @@
Imports System
Imports System.ComponentModel
Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering
Imports DevExpress.ExpressApp
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation
Imports DevExpress.ExpressApp.ConditionalAppearance
Imports System.Linq
Imports System.Linq.Expressions
'-- Kimenő árajánlatok --
'<EditorStateRule("Disable properties when IsEditable=False", "*", ViewType.DetailView, "IsEditable = False", EditorState.Disabled)> _
<Appearance("Disable properties when IsEditable=False", TargetItems:="*", Criteria:="IsEditable = False", Enabled:=False, Context:="DetailView")> _
<Appearance("Hide OfferLOSTReasons when eOfferOutState <> 2", AppearanceItemType.ViewItem, "OfferOutState <> 2", TargetItems:="OfferLOSTReason", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide OfferLOSTReasonDescription when OfferLOSTReason <> 7", AppearanceItemType.ViewItem, "OfferLOSTReason <> 7", TargetItems:="OfferLOSTReasonDescription", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide Installation when row_RowType = Product", AppearanceItemType.ViewItem, "row_RowType = 0", TargetItems:="row_VAT;row_Description;row_Installation;row_ShortName;row_Units", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide Product when row_RowType = Installation", AppearanceItemType.ViewItem, "row_RowType = 2", TargetItems:="row_VAT;row_Products;row_Units;row_Description;row_ShortName", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide some properties when RowType = Other", AppearanceItemType.ViewItem, "row_RowType = 1", TargetItems:="row_Installation;row_Products", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Disable row action when IsEditable=False", AppearanceItemType.LayoutItem, "!IsEditable", TargetItems:="@OfferOutHeader_AC", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Disable DocumentNumber, DocumentOutNumber", AppearanceItemType.ViewItem, "1=1", TargetItems:="DocumentNumber;DocumentOutNumber", Enabled:=False)> _
<Appearance("Hide CloneObject-OfferOut", AppearanceItemType.Action, "IsEditable = False", TargetItems:="CloneObject", enabled:=False)> _
<Appearance("Disable OpeneObject-OfferOut", AppearanceItemType.Action, "IsEditable = False", TargetItems:="OpenObject", Enabled:=False)> _
<Appearance("Disable Delete-OfferOut", AppearanceItemType.Action, "IsEditable = False", TargetItems:="Delete", Enabled:=False)> _
<Appearance("Disable ShowAllContexts-OfferOut", AppearanceItemType.Action, "IsEditable = False", TargetItems:="ShowAllContexts", Enabled:=False)> _
<Appearance("Hide _row_ListPriceDEV-OfferOut if CurrencyName is HUF", AppearanceItemType.ViewItem, "CurrencyName.ShortName='HUF'", TargetItems:="row_ListPriceDEV", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide _row_ListPriceHUF-OfferOut if CurrencyName is not HUF", AppearanceItemType.ViewItem, "CurrencyName.ShortName<>'HUF'", TargetItems:="row_ListPriceHUF", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide tab page Item3 if header is incomplete-OfferOut", AppearanceItemType.LayoutItem, "IsNull(CustomersFrom)=True Or IsNull(Contact)=True Or IsNull(Customers)=True Or IsNull(CurrencyName)=True Or IsNull(OfferOutParameters)=True Or IsNull(PaymentOption)=True", TargetItems:="Item3", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Disable OfferOutHeader-Contact", AppearanceItemType.ViewItem, "IsNull(Contact)=False", TargetItems:="Contact", Enabled:=False)> _
<Appearance("Disable OfferOutHeader-Customers", AppearanceItemType.ViewItem, "IsNull(Customers)=False", TargetItems:="Customers", Enabled:=False)> _
<Appearance("Disable OfferOutHeader-CustomersFrom", AppearanceItemType.ViewItem, "IsNull(CustomersFrom)=False", TargetItems:="CustomersFrom", Enabled:=False)> _
<Appearance("Disable aOffersOutFinal", AppearanceItemType.Action, "IsEditable = False", TargetItems:="aOffersOutFinal", Enabled:=False)> _
<Appearance("Hide row_ info when IsEditable=False OffersIn", AppearanceItemType.ViewItem, "IsEditable=False", TargetItems:="row_RowType, row_Products; row_Installation;" _
& "row_ShortName; row_Description; row_QTT; row_Units; row_VAT; row_ListPriceHUF; row_ListPriceDEV; row_DiscountPercent; row_RowGroup1; row_RowGroup2", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Disable ObjectCreated OfferOutHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="ObjectCreated", Enabled:=False)> _
<Appearance("Disable UserCreated OfferOutHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="UserCreated", Enabled:=False)> _
<DefaultClassOptions()> _
<NavigationItem("BusinessTransactions")> _
<DefaultProperty("DocumentNumber")> _
Public Class OfferOutHeader
Inherits BaseObject
Private _OfferOutParameters As OfferOutParameters 'Árajánlat paramétere, ami a sorszámot és egyéb tul. meghat.
Private _OfferOutState As eOfferOutState 'Ajánlat státusz, hol tart jelenleg
Private _OfferLOSTReason As eOfferOutLOSTReason 'Ha nem fogadták el, miért ?
Private _OfferLOSTReasonDescription As String ' Ha nem fogadták el és eOther akkor szövegesen beírni !
Private _DocumentNumber As String 'Árajánlat száma (generálódik)
Private _DocumentOutNumber As String 'Árajánlat változati szám
Private _CustomersFrom As CustomersFrom 'Saját cég
Private _Customers As Customers 'Partner, akire az árajánlat szól (ez nem kötelező, de a contactból ismerje fel !)
Private _Contact As Contacts 'Kapcsolat, akire az árajánlat szól (ez a fő !!! kötelező)
Private _DateCreated As Date 'Kiállítás dátuma
Private _DateExecution As Date 'Teljesítés dátuma
Private _DatePayment As Date 'Fiz. hat
Private _DateDue As Date 'Érvényesség dátuma
Private _Description As String 'Leírás (fejlécen)
Private _PaymentOption As PaymentOption 'Fizetési opció
Private _ShipmentOption As ShipmentOption 'Szállítási opció
Private _QualityOption As QualityOption 'Minőségi opció
Private _CurrencyName As CurrencyName 'Deviza
Private _SumPriceHUF As Double = 0 'Árajánlat összesített értéke HUF
Private _SumPriceDEV As Double = 0 'Árajánlat összesített értéke DEV
Private _ObjectCreated As Date 'Maga az objektum mikor készült el
Private _UserCreated As User 'Ki csinálta az ajánlatot
Private _IsEditable As Boolean = True 'Szerkeszthető vagy végleges ajánlat
Private _IsStorno As Boolean = False 'Stornírozott ajánlat
Private _DocumentBody As String 'RichText dokumentum test
Private _ExcelProperty As String 'Excel !!!
Private _ExcelFile As FileData
Private _PDF_Original As FileData
Private _WorkflowSystemSteps As WorkflowSystemSteps
Private _MasterBusinessDirectory As BusinessDirectory
'--- Sorok rögzítéséhez nonpersistent propertyk
Private _row_RowType As eRowType 'Sor tipus
Private _row_Products As Products 'Termék
Private _row_Installation As Installation 'Gyártmány
Private _row_ShortName As String 'Megnevezés
Private _row_Description As String 'Leírás
Private _row_QTT As Double 'Mennyiség
Private _row_Units As Units 'Mennyiségi egység
Private _row_VAT As VAT 'ÁFA kód
Private _row_ListPriceHUF As Double 'Termék listaára HUF
Private _row_ListPriceDEV As Double 'Termék listaára DEV
Private _row_DiscountPercent As Double 'Termék ár kedvezmény %-ban
Private _row_RowGroup1 As String 'Csoportosító sor1
Private _row_RowGroup2 As String 'Csoportosító sor2
'--- CRM miatt ----------------------------------------------
Private _CRM_Opportunities As CRM_Opportunities
Private _OtherCostPercent As Double 'egyéb sorokra vonatkozó általánios bekrülési %
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
Me.DateExecution = GetSQLTime(Session)
Me.DateCreated = GetSQLTime(Session)
Me.CurrencyName = Session.FindObject(Of CurrencyName)(CriteriaOperator.Parse("ShortName = 'HUF'"))
Me.row_VAT = Session.FindObject(Of VAT)(CriteriaOperator.Parse("DefaultForBusinnes='True'"))
Me.row_Units = Session.FindObject(Of Units)(CriteriaOperator.Parse("DefaultForBusinnes='True'"))
End Sub
Protected Overrides Sub OnSaving()
MyBase.OnSaving()
If String.IsNullOrEmpty(DocumentNumber) Then
DocumentNumber = Me.OfferOutParameters.NumberGenerator.GetNewNumber(Me.OfferOutParameters.NumberGenerator)
End If
If Session.IsNewObject(Me) Then
ObjectCreated = GetSQLTime(Session)
UserCreated = Session.GetObjectByKey(Of User)(Session.GetKeyValue(SecuritySystem.CurrentUser))
If Me.OfferOutParameters IsNot Nothing Then
If Me.OfferOutParameters.MasterBusinessDirectory IsNot Nothing Then
Dim _BusinessDirectory As New BusinessDirectory(Session)
_BusinessDirectory.ShortName = DocumentNumber
_BusinessDirectory.BusinessDirectory_Parent = Me.OfferOutParameters.MasterBusinessDirectory
_BusinessDirectory.IsDashBoard = False
_BusinessDirectory.Save()
End If
End If
End If
End Sub
Function CalculatePriceNettoHUF() As Double
Dim _i As Integer = 0 ' segédváltozó, hogy ha nincs a megadott intervallumokban a mennyiség akkor a normál listaárral térünk vissza
For Each _PricingFix As PricingFix In Me.Customers.Pricing.PricingFix '1. Fix árat megnézni
If _PricingFix.Products Is row_Products Then
Return _PricingFix.PriceNetto
End If
Next
For Each _PricingFixStaged As PricingFixStaged In Me.Customers.Pricing.PricingFixStaged '2. Fix lépcsõs árat megnézni
If _PricingFixStaged.Products Is Me.row_Products Then
If Me.row_QTT >= _PricingFixStaged.VolumeFrom And Me.row_QTT <= _PricingFixStaged.VolumeTo Then
Return _PricingFixStaged.PriceNetto
Else
_i = _i + 1
End If
If _i >= Me.Customers.Pricing.PricingFixStaged.Count Then ' Amennyiben a megadott intervallumokon kívül van a megadott mennyiség, akkor normál listaár
Return Me.row_Products.ListPriceOutHUF
End If
End If
Next
For Each _PricingProductsGroups As PricingProductsGroups In Me.Customers.Pricing.PricingProductsGroups '3. Termékcsoport árat megnézni
If _PricingProductsGroups.ProductsGroups Is Me.row_Products.ProductGroups Then ' Ha a levélelemnek meg van adva a kedvezmény
Me.row_DiscountPercent = _PricingProductsGroups.DiscountPercent
Return Me.row_Products.ListPriceOutHUF - ((_PricingProductsGroups.DiscountPercent / 100) * Me.row_Products.ListPriceOutHUF)
Else
Me.row_DiscountPercent = _PricingProductsGroups.DiscountPercent
Return RecurziveProductsGroupsHUF(Me.row_Products, _PricingProductsGroups, Me.row_Products.ProductGroups) ' A levélelemnek nincs megadva a kedvezmény akkor rekurzív bejárás
End If
Next
End Function
Function CalculatePriceNettoDEV() As Double
Dim _i As Integer = 0 ' segédváltozó, hogy ha nincs a megadott intervallumokban a mennyiség akkor a normál listaárral térünk vissza
For Each _PricingFix As PricingFix In Me.Customers.Pricing.PricingFix '1. Fix árat megnézni
If _PricingFix.Products Is row_Products Then
Return _PricingFix.PriceNetto
End If
Next
For Each _PricingFixStaged As PricingFixStaged In Me.Customers.Pricing.PricingFixStaged '2. Fix lépcsõs árat megnézni
If _PricingFixStaged.Products Is Me.row_Products Then
If Me.row_QTT >= _PricingFixStaged.VolumeFrom And Me.row_QTT <= _PricingFixStaged.VolumeTo Then
Return _PricingFixStaged.PriceNetto
Else
_i = _i + 1
End If
If _i >= Me.Customers.Pricing.PricingFixStaged.Count Then ' Amennyiben a megadott intervallumokon kívül van a megadott mennyiség, akkor normál listaár
Return Me.row_Products.ListPriceOutDEV
End If
End If
Next
For Each _PricingProductsGroups As PricingProductsGroups In Me.Customers.Pricing.PricingProductsGroups '3. Termékcsoport árat megnézni
If _PricingProductsGroups.ProductsGroups Is Me.row_Products.ProductGroups Then ' Ha a levélelemnek meg van adva a kedvezmény
Return Me.row_Products.ListPriceOutDEV - ((_PricingProductsGroups.DiscountPercent / 100) * Me.row_Products.ListPriceOutDEV)
Me.row_DiscountPercent = _PricingProductsGroups.DiscountPercent
Else
Return RecurziveProductsGroupsDEV(Me.row_Products, _PricingProductsGroups, Me.row_Products.ProductGroups) ' A levélelemnek nincs megadva a kedvezmény akkor rekurzív bejárás
Me.row_DiscountPercent = _PricingProductsGroups.DiscountPercent
End If
Next
End Function
Function RecurziveProductsGroupsHUF(ByVal _p_Products As Products, ByVal _p_PricingProductsGroups As PricingProductsGroups, ByVal _p_ProductsGroups As ProductsGroups) As Double
'A treelist bejárása rekurzívan, mindaddig amíg van szülő, és keressük van e termékcsoport kedvezmény, ha van visszatérünk vele, ha nincs akkor az eredeti listaárral térünk vissza
If _p_ProductsGroups.Parent IsNot Nothing Then
If _p_ProductsGroups.Parent Is _p_PricingProductsGroups.ProductsGroups Then
Return _p_Products.ListPriceOutHUF - ((_p_PricingProductsGroups.DiscountPercent / 100) * _p_Products.ListPriceOutHUF) ' Visszatérés a levélelemhez legközelebbi termékcsoport kedvezményes árral.
End If
RecurziveProductsGroupsHUF(_p_Products, _p_PricingProductsGroups, _p_ProductsGroups.Parent) ' Rekurzív hívás, hogy minden elemen keressen
End If
Return _p_Products.ListPriceOutHUF ' Visszatérés az eredeti listaárral
End Function
Function RecurziveProductsGroupsDEV(ByVal _p_Products As Products, ByVal _p_PricingProductsGroups As PricingProductsGroups, ByVal _p_ProductsGroups As ProductsGroups) As Double
'A treelist bejárása rekurzívan, mindaddig amíg van szülő, és keressük van e termékcsoport kedvezmény, ha van visszatérünk vele, ha nincs akkor az eredeti listaárral térünk vissza
If _p_ProductsGroups.Parent IsNot Nothing Then
If _p_ProductsGroups.Parent Is _p_PricingProductsGroups.ProductsGroups Then
Return _p_Products.ListPriceOutDEV - ((_p_PricingProductsGroups.DiscountPercent / 100) * _p_Products.ListPriceOutDEV) ' Visszatérés a levélelemhez legközelebbi termékcsoport kedvezményes árral.
End If
RecurziveProductsGroupsDEV(_p_Products, _p_PricingProductsGroups, _p_ProductsGroups.Parent) ' Rekurzív hívás, hogy minden elemen keressen
End If
Return _p_Products.ListPriceOutDEV ' Visszatérés az eredeti listaárral
End Function
<ImmediatePostData(True), DataSourceCriteria("CustomersFrom = '@This.CustomersFrom'")>
<RuleRequiredField("OfferOutHeader.OfferOutParameters", DefaultContexts.Save)>
Property OfferOutParameters As OfferOutParameters
Get
Return _OfferOutParameters
End Get
Set(ByVal value As OfferOutParameters)
SetPropertyValue("OfferOutParameters", _OfferOutParameters, value)
End Set
End Property
<ImmediatePostData()>
Property OfferOutState As eOfferOutState
Get
Return _OfferOutState
End Get
Set(ByVal value As eOfferOutState)
SetPropertyValue("OfferOutState", _OfferOutState, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
Select Case OfferOutState
Case eOfferOutState.eClosedWON
OfferLOSTReason = eOfferOutLOSTReason.eNotSet
Case eOfferOutState.eInProgress
OfferLOSTReason = eOfferOutLOSTReason.eNotSet
Case eOfferOutState.eInThinkingOf
OfferLOSTReason = eOfferOutLOSTReason.eNotSet
End Select
End If
End Set
End Property
<ImmediatePostData()>
<RuleValueComparison("OfferOutHeader.OfferLostReason", DevExpress.Persistent.Validation.DefaultContexts.Save,
DevExpress.Persistent.Validation.ValueComparisonType.NotEquals, eOfferOutLOSTReason.eNotSet, TargetCriteria:="OfferOutState = 2")>
Property OfferLOSTReason As eOfferOutLOSTReason
Get
Return _OfferLOSTReason
End Get
Set(ByVal value As eOfferOutLOSTReason)
SetPropertyValue("OfferLOSTReason", _OfferLOSTReason, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
Select Case OfferLOSTReason
Case eOfferOutLOSTReason.eNotSet
OfferLOSTReasonDescription = ""
Case eOfferOutLOSTReason.eTooExpensive
OfferLOSTReasonDescription = ""
Case eOfferOutLOSTReason.eTooLate
OfferLOSTReasonDescription = ""
Case eOfferOutLOSTReason.eChooseConcurrency
OfferLOSTReasonDescription = ""
Case eOfferOutLOSTReason.eQualityProblem
OfferLOSTReasonDescription = ""
Case eOfferOutLOSTReason.eNoAnswer
OfferLOSTReasonDescription = ""
Case eOfferOutLOSTReason.eWINOther
OfferLOSTReasonDescription = ""
End Select
End If
End Set
End Property
<RuleRequiredField("OfferOutHeader.OfferLostReasonDescription", DefaultContexts.Save, TargetCriteria:="OfferLOSTReason = 7")>
<ImmediatePostData()>
<Size(-1)>
Property OfferLOSTReasonDescription As String
Get
Return _OfferLOSTReasonDescription
End Get
Set(ByVal value As String)
SetPropertyValue("OfferLOSTReasonDescription", _OfferLOSTReasonDescription, value)
End Set
End Property
Property DocumentNumber As String
Get
Return _DocumentNumber
End Get
Set(ByVal value As String)
SetPropertyValue("DocumentNumber", _DocumentNumber, value)
End Set
End Property
Property DocumentOutNumber As String
Get
Return _DocumentOutNumber
End Get
Set(ByVal value As String)
SetPropertyValue("DocumentOutNumber", _DocumentOutNumber, value)
End Set
End Property
<RuleRequiredField("OfferOutHeader.CustomersFrom", DefaultContexts.Save)>
Property CustomersFrom As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(ByVal value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
End Set
End Property
Property Customers As Customers
Get
Return _Customers
End Get
Set(ByVal value As Customers)
SetPropertyValue("Customers", _Customers, value)
If Not Session.IsObjectsSaving And Not Session.IsObjectsLoading Then
If value IsNot Nothing Then
If value.PaymentOption IsNot Nothing And Me.PaymentOption Is Nothing Then
Me.PaymentOption = value.PaymentOption
End If
If value.ShipmentOption IsNot Nothing And Me.ShipmentOption Is Nothing Then
Me.ShipmentOption = value.ShipmentOption
End If
If value.QualityOption IsNot Nothing And Me.QualityOption Is Nothing Then
Me.QualityOption = value.QualityOption
End If
End If
End If
End Set
End Property
<ImmediatePostData(True), DataSourceProperty("Customers.Contacts", DataSourcePropertyIsNullMode.SelectAll)>
<RuleRequiredField("OfferOutHeader.Contact", DefaultContexts.Save)>
Property Contact As Contacts
Get
Return _Contact
End Get
Set(ByVal value As Contacts)
SetPropertyValue("Contact", _Contact, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False And value IsNot Nothing Then
Me.Customers = Me.Contact.Customers
End If
End Set
End Property
Property DateCreated As Date
Get
Return _DateCreated
End Get
Set(ByVal value As Date)
SetPropertyValue("DateCreated", _DateCreated, value)
End Set
End Property
Property DateExecution As Date
Get
Return _DateExecution
End Get
Set(ByVal value As Date)
SetPropertyValue("DateExecution", _DateExecution, value)
End Set
End Property
Property DatePayment As Date
Get
Return _DatePayment
End Get
Set(ByVal value As Date)
SetPropertyValue("DatePayment", _DatePayment, value)
End Set
End Property
<RuleRequiredField("OfferOutHeader-DateDue", DefaultContexts.Save)>
Property DateDue As Date
Get
Return _DateDue
End Get
Set(ByVal value As Date)
SetPropertyValue("DateDue", _DateDue, value)
End Set
End Property
<Size(-1)>
Property Description As String
Get
Return _Description
End Get
Set(ByVal value As String)
SetPropertyValue("Description", _Description, value)
End Set
End Property
<RuleRequiredField("OfferOutHeader.PaymentOption", DefaultContexts.Save)>
Property PaymentOption As PaymentOption
Get
Return _PaymentOption
End Get
Set(ByVal value As PaymentOption)
SetPropertyValue("PaymentOption", _PaymentOption, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
Me.DatePayment = Me.DateExecution.AddDays(Me.PaymentOption.PayDay)
End If
End Set
End Property
Property ShipmentOption As ShipmentOption
Get
Return _ShipmentOption
End Get
Set(ByVal value As ShipmentOption)
SetPropertyValue("ShipmentOption", _ShipmentOption, value)
End Set
End Property
Property QualityOption As QualityOption
Get
Return _QualityOption
End Get
Set(ByVal value As QualityOption)
SetPropertyValue("QualityOption", _QualityOption, value)
End Set
End Property
<RuleRequiredField("OfferOutHeader.CurrencyName", DefaultContexts.Save)>
Property CurrencyName As CurrencyName
Get
Return _CurrencyName
End Get
Set(ByVal value As CurrencyName)
SetPropertyValue("CurrencyName", _CurrencyName, value)
End Set
End Property
Property IsEditable As Boolean
Get
Return _IsEditable
End Get
Set(ByVal value As Boolean)
SetPropertyValue("IsEditable", _IsEditable, value)
End Set
End Property
Property IsStorno As Boolean
Get
Return _IsStorno
End Get
Set(ByVal value As Boolean)
SetPropertyValue("IsStorno", _IsStorno, value)
End Set
End Property
<Size(-1)>
Property DocumentBody As String
Get
Return _DocumentBody
End Get
Set(value As String)
SetPropertyValue("DocumentBody", _DocumentBody, value)
End Set
End Property
<Size(-1)>
Property ExcelProperty As String
Get
Return _ExcelProperty
End Get
Set(value As String)
SetPropertyValue("ExcelProperty", _ExcelProperty, value)
End Set
End Property
Property ExcelFile As FileData
Get
Return _ExcelFile
End Get
Set(value As FileData)
SetPropertyValue("ExcelFile", _ExcelFile, value)
End Set
End Property
Property PDF_Original As FileData
Get
Return _PDF_Original
End Get
Set(value As FileData)
SetPropertyValue("PDF_Original", _PDF_Original, value)
End Set
End Property
<ImmediatePostData(True), DataSourceCriteria("WorkflowSystem='@This.OfferOutParameters.WorkflowSystem'")>
Property WorkflowSystemSteps As WorkflowSystemSteps
Get
Return _WorkflowSystemSteps
End Get
Set(value As WorkflowSystemSteps)
SetPropertyValue("WorkflowSystemSteps", _WorkflowSystemSteps, value)
End Set
End Property
<Persistent("SumPriceHUF")> _
ReadOnly Property SumPriceHUF As Double
Get
'// Át kell nézni, mert nem jó !
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
_SumPriceHUF = 0
For Each detail As OfferOutRows In OfferOutRows
_SumPriceHUF += detail.SumPriceHUF
Next
Return _SumPriceHUF
End If
End Get
End Property
<Persistent("SumPriceDEV")> _
ReadOnly Property SumPriceDEV As Double
Get
'// Át kell nézni, mert nem jó !
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
_SumPriceDEV = 0
For Each detail As OfferOutRows In Me.OfferOutRows
_SumPriceDEV += detail.SumPriceDEV
Next
Return _SumPriceDEV
End If
End Get
End Property
<NonCloneable>
Property ObjectCreated As Date
Get
Return _ObjectCreated
End Get
Set(ByVal value As Date)
SetPropertyValue("ObjectCreated", _ObjectCreated, value)
End Set
End Property
<NonCloneable>
Property UserCreated As User
Get
Return _UserCreated
End Get
Set(value As User)
SetPropertyValue("UserCreated", _UserCreated, value)
End Set
End Property
<VisibleInListView(False)> _
<Association("OfferOutHeader", GetType(OfferOutRows))> _
Public ReadOnly Property OfferOutRows() As XPCollection(Of OfferOutRows)
Get
Return GetCollection(Of OfferOutRows)("OfferOutRows")
End Get
End Property
<VisibleInListView(False)> _
<Association("OfferOutCostRows", GetType(OfferOutCostRows))> _
Public ReadOnly Property OfferOutCostRows() As XPCollection
Get
Return GetCollection("OfferOutCostRows")
End Get
End Property
<VisibleInListView(False)> _
<Association("OfferOutHeader-OfferOutVATRows", GetType(OfferOutVATRows))> _
Public ReadOnly Property OfferOutVATRows() As XPCollection
Get
Return GetCollection("OfferOutVATRows")
End Get
End Property
Public ReadOnly Property OfferInHeader As XPCollection(Of OfferInHeader)
Get
Dim _OfferInHeader_Collection As New XPCollection(Of OfferInHeader)(Session, CriteriaOperator.Parse("1=2"))
Dim _OfferOutHeaderInHeader_Collection As New XPCollection(Of OfferOutHeaderInHeader)(Session, CriteriaOperator.Parse("OfferOutHeader=?", Me))
For Each _OfferOutHeaderInHeader As OfferOutHeaderInHeader In _OfferOutHeaderInHeader_Collection
_OfferInHeader_Collection.Add(_OfferOutHeaderInHeader.OfferInHeader)
Next
Return _OfferInHeader_Collection
End Get
End Property
'--Nonpersistent propertyk
<NonPersistent()> _
<ImmediatePostData()> _
<VisibleInListView(False)> _
Property row_RowType As eRowType
Get
Return _row_RowType
End Get
Set(value As eRowType)
SetPropertyValue("row_RowType", _row_RowType, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False And Me.row_RowType = eRowType.IsOther Then
Me.row_Units = Session.FindObject(Of Units)(CriteriaOperator.Parse("ShortName='DB'"))
Dim _DefaultVAT As VAT = Nothing
Dim _VAT_Collection As New XPCollection(Of VAT)(Session)
For Each _VAT As VAT In _VAT_Collection
If _VAT.DefaultForBusinnes = True Then
_DefaultVAT = _VAT
Exit For
End If
Next
If _DefaultVAT IsNot Nothing Then
Me.row_VAT = _DefaultVAT
End If
End If
End Set
End Property
<NonPersistent()> _
<ImmediatePostData()> _
<RuleRequiredField("OfferOutHeader.row_Products", "aTotable_OfferOut", TargetCriteria:="row_RowType = 0")> _
<VisibleInListView(False)> _
Property row_Products As Products
Get
Return _row_Products
End Get
Set(ByVal value As Products)
SetPropertyValue("row_Products", _row_Products, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False And value IsNot Nothing Then
If Me.Customers.Pricing IsNot Nothing And Me.OfferOutParameters.OfferOutMainType = eOfferOutMainType.eFromProducts And Me.row_QTT > 0 Then
If Me.CurrencyName.ShortName = "HUF" Then ' Ha a Deviza HUF
Me.row_ListPriceHUF = CalculatePriceNettoHUF()
Else ' Ha a deviza nem HUF
Me.row_ListPriceDEV = CalculatePriceNettoDEV() ' A kedvezményt tartalmazó listaár DEV-ben
End If
End If
If Me.Customers.Pricing Is Nothing Then
If Me.CurrencyName.ShortName = "HUF" Then ' Ha nincs árkalkuláció akkor a normál listaáron lesz a termék
Me.row_ListPriceHUF = Me.row_Products.ListPriceOutHUF
End If
If Me.CurrencyName.ShortName <> "HUF" Then
Me.row_ListPriceDEV = Me.row_Products.ListPriceOutDEV
End If
End If
End If
End Set
End Property
<NonPersistent()> _
<ImmediatePostData()> _
<RuleRequiredField("OfferOutHeader.row_Installation", "aTotable_OfferOut", TargetCriteria:="row_RowType = 2")> _
<VisibleInListView(False)> _
Property row_Installation As Installation
Get
Return _row_Installation
End Get
Set(ByVal value As Installation)
SetPropertyValue("row_Installation", _row_Installation, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData()> _
<RuleRequiredField("OfferOutHeader.row_ShortName", "aTotable_OfferOut", TargetCriteria:="row_RowType = 1")> _
<VisibleInListView(False)> _
Property row_ShortName As String
Get
Return _row_ShortName
End Get
Set(value As String)
SetPropertyValue("row_ShortName", _row_ShortName, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData()> _
<RuleRequiredField("OfferOutHeader.row_Description", "aTotable_OfferOut", TargetCriteria:="row_RowType = 1")> _
<VisibleInListView(False)> _
Property row_Description As String
Get
Return _row_Description
End Get
Set(value As String)
SetPropertyValue("row_Description", _row_Description, value)
End Set
End Property
<NonPersistent()> _
<ImmediatePostData()> _
<RuleRange("OfferOutHeader._row_QTT", "aTotable_OfferOut", 0.001, Double.MaxValue)> _
<VisibleInListView(False)> _
Property row_QTT As Double
Get
Return _row_QTT
End Get
Set(ByVal value As Double)
SetPropertyValue("row_QTT", _row_QTT, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False And value > 0 Then
If Me.Customers.Pricing IsNot Nothing And Me.OfferOutParameters.OfferOutMainType = eOfferOutMainType.eFromProducts And Me.row_Products IsNot Nothing Then
If Me.CurrencyName.ShortName = "HUF" Then ' Ha a Deviza HUF
Me.row_ListPriceHUF = CalculatePriceNettoHUF()
Else ' Ha a deviza nem HUF
Me.row_ListPriceDEV = CalculatePriceNettoDEV() ' A kedvezményt tartalmazó listaár DEV-ben
End If
End If
If Me.Customers.Pricing Is Nothing Then
If Me.row_ListPriceHUF = 0 And Me.CurrencyName.ShortName = "HUF" Then ' Ha nincs árkalkuláció akkor a normál listaáron lesz a termék
Me.row_ListPriceHUF = Me.row_Products.ListPriceOutHUF
End If
If Me.row_ListPriceDEV = 0 And Me.CurrencyName.ShortName <> "HUF" Then
Me.row_ListPriceDEV = Me.row_Products.ListPriceOutDEV
End If
End If
End If
End Set
End Property
<NonPersistent()> _
<ImmediatePostData()> _
<RuleRequiredField("OfferOutHeader.row_Units", "aTotable_OfferOut", TargetCriteria:="row_RowType = 1")> _
<VisibleInListView(False)> _
Property row_Units As Units
Get
Return _row_Units
End Get
Set(value As Units)
SetPropertyValue("row_Units", _row_Units, value)
End Set
End Property
<NonPersistent()> _
<RuleRequiredField("OfferOutHeader-row_VAT", "aToTable_OfferOut")> _
<VisibleInListView(False)> _
Property row_VAT As VAT
Get
Return _row_VAT
End Get
Set(value As VAT)
SetPropertyValue("row_VAT", _row_VAT, value)
End Set
End Property
<NonPersistent()> _
<RuleRange("OfferOutHeader-row_ListPriceHUF", "aToTable_OfferOut", 0.0001, Double.MaxValue, TargetCriteria:="CurrencyName.ShortName='HUF'")> _
<VisibleInListView(False)> _
Property row_ListPriceHUF As Double
Get
Return _row_ListPriceHUF
End Get
Set(value As Double)
SetPropertyValue("row_ListPriceHUF", _row_ListPriceHUF, value)
End Set
End Property
<NonPersistent()> _
<RuleRange("OfferOutHeader-row_ListPriceDEV", "aToTable_OfferOut", 0.0001, Double.MaxValue, TargetCriteria:="CurrencyName.ShortName!='HUF'")> _
<VisibleInListView(False)> _
Property row_ListPriceDEV As Double
Get
Return _row_ListPriceDEV
End Get
Set(value As Double)
SetPropertyValue("row_ListPriceDEV", _row_ListPriceDEV, value)
End Set
End Property
<NonPersistent()> _
<RuleRange("OfferOutHeader-row_DiscountPercent", "aToTable_OfferOut", 0, 99)> _
<VisibleInListView(False)> _
Property row_DiscountPercent As Double
Get
Return _row_DiscountPercent
End Get
Set(value As Double)
SetPropertyValue("row_DiscountPercent", _row_DiscountPercent, value)
End Set
End Property
<NonPersistent()> _
<VisibleInListView(False)> _
Property row_RowGroup1 As String
Get
Return _row_RowGroup1
End Get
Set(value As String)
SetPropertyValue("RowGroup1", _row_RowGroup1, value)
End Set
End Property
<NonPersistent()> _
<VisibleInListView(False)> _
Property row_RowGroup2 As String
Get
Return _row_RowGroup2
End Get
Set(value As String)
SetPropertyValue("RowGroup2", _row_RowGroup2, value)
End Set
End Property
'-- CRM miatt
<Association("OfferOutHeader-CRM_Opportunities", GetType(CRM_Opportunities))> _
Property CRM_Opportunities As CRM_Opportunities
Get
Return _CRM_Opportunities
End Get
Set(ByVal value As CRM_Opportunities)
SetPropertyValue("CRM_Opportunities", _CRM_Opportunities, value)
End Set
End Property
Property OtherCostPercent As Double
Get
Return _OtherCostPercent
End Get
Set(value As Double)
SetPropertyValue("OtherCostPercent", _OtherCostPercent, value)
End Set
End Property
Property MasterBusinessDirectory As BusinessDirectory
Get
Return _MasterBusinessDirectory
End Get
Set(value As BusinessDirectory)
SetPropertyValue("MasterBusinessDirectory", _MasterBusinessDirectory, value)
End Set
End Property
<VisibleInListView(False), VisibleInLookupListView(False)> _
Public ReadOnly Property OfferOutHeader_BusinessDirectory As XPCollection(Of BusinessDirectory)
Get
Dim _BusinessDirectory_Collection As New XPCollection(Of BusinessDirectory)(Session, CriteriaOperator.Parse("1=2"))
If MasterBusinessDirectory IsNot Nothing Then
If MasterBusinessDirectory.Children.Count > 0 Then
_BusinessDirectory_Collection.Add(MasterBusinessDirectory)
RecursiveBusinessDirectory(_BusinessDirectory_Collection, MasterBusinessDirectory.NestedBusinessDirectory)
Else
_BusinessDirectory_Collection.Add(MasterBusinessDirectory)
End If
End If
Return _BusinessDirectory_Collection
End Get
End Property
#Region "Other subs"
Private Sub RecursiveBusinessDirectory(_BusinessDirectoryList As XPCollection(Of BusinessDirectory), _NestedBusinessDirectory As XPCollection(Of BusinessDirectory))
For Each _BusinessDirectory As BusinessDirectory In _NestedBusinessDirectory
If _BusinessDirectory.Children.Count > 0 Then
_BusinessDirectoryList.Add(_BusinessDirectory)
RecursiveBusinessDirectory(_BusinessDirectoryList, _BusinessDirectory.NestedBusinessDirectory)
Else
_BusinessDirectoryList.Add(_BusinessDirectory)
End If
Next
End Sub
#End Region
Sub RecalculateOfferOut(ByVal _OfferOutHeader As OfferOutHeader, ByVal _ocur As Xpo.XPObjectSpace)
'-- A rutin újragenerálja a pénzügyi sorokat
Dim _OfferOutVATRows As OfferOutVATRows
Dim i As Long = 1
Dim j As Long = 1
Dim _Exists As Boolean = False
Session.Delete(_OfferOutHeader.OfferOutVATRows)
Dim OfferRows = New XPQuery(Of OfferOutRows)(_ocur.Session)
Dim query = From OfferRow In OfferRows Where OfferRow.OfferOutHeader.Oid = _OfferOutHeader.Oid _
Group OfferRow By OfferRow.VAT Into g = Group _
Select New With {Key .VAT = VAT, _
Key .AmountNettoHUF = g.Sum(Function(inv) (inv.FinalPriceHUF) * inv.QTT), _
Key .AmountNettoDEV = g.Sum(Function(inv) (inv.FinalPriceDEV) * inv.QTT), _
Key .S2 = g.Sum(Function(inv) inv.FinalPriceDEV), _
Key .M1 = g.Max(Function(inv) inv.DiscountPriceHUF * inv.QTT)}
'Select New With {Key .VAT = VAT, _
' Key .AmountNettoHUF = g.Sum(Function(inv) (inv.ListPriceHUF - inv.DiscountPriceHUF) * inv.QTT), _
' Key .AmountNettoDEV = g.Sum(Function(inv) (inv.ListPriceDEV - inv.DiscountPriceDEV) * inv.QTT), _
' Key .S2 = g.Sum(Function(inv) inv.ListPriceDEV), _
' Key .M1 = g.Max(Function(inv) inv.DiscountPriceHUF * inv.QTT)}
For Each item In query
_OfferOutVATRows = _ocur.CreateObject(Of OfferOutVATRows)()
_OfferOutVATRows.OfferOutHeader = _OfferOutHeader
_OfferOutVATRows.VAT = item.VAT
_OfferOutVATRows.AmountNettoHUF = Math.Round(item.AmountNettoHUF, 0, MidpointRounding.AwayFromZero)
_OfferOutVATRows.AmountVATHUF = 0
If item.VAT IsNot Nothing Then
_OfferOutVATRows.AmountVATHUF = Math.Round(item.VAT.KeyValue * _OfferOutVATRows.AmountNettoHUF, 0, MidpointRounding.AwayFromZero)
End If
_OfferOutVATRows.AmountBruttoHUF = _OfferOutVATRows.AmountNettoHUF + _OfferOutVATRows.AmountVATHUF
_OfferOutVATRows.AmountNettoDEV = Math.Round(item.AmountNettoDEV, 2, MidpointRounding.AwayFromZero)
_OfferOutVATRows.AmountVATDEV = 0
If item.VAT IsNot Nothing Then
_OfferOutVATRows.AmountVATDEV = Math.Round(item.VAT.KeyValue * _OfferOutVATRows.AmountNettoDEV, 2, MidpointRounding.AwayFromZero)
End If
_OfferOutVATRows.AmountBruttoDEV = _OfferOutVATRows.AmountNettoDEV + _OfferOutVATRows.AmountVATDEV
_OfferOutVATRows.Save()
_OfferOutHeader.OfferOutVATRows.Add(_OfferOutVATRows)
Next
_OfferOutHeader.Save()
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()> _
<CreatableItem(False)> _
<NavigationItem(False)> _
Public Class OfferOutHeaderInHeader
Inherits BaseObject
Private _OfferInHeader As OfferInHeader
Private _OfferOutHeader As OfferOutHeader
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
Property OfferInHeader As OfferInHeader
Get
Return _OfferInHeader
End Get
Set(value As OfferInHeader)
SetPropertyValue("OfferInHeader", _OfferInHeader, value)
End Set
End Property
Property OfferOutHeader As OfferOutHeader
Get
Return _OfferOutHeader
End Get
Set(value As OfferOutHeader)
SetPropertyValue("OfferOutHeader", _OfferOutHeader, value)
End Set
End Property
End Class
@@ -0,0 +1,24 @@
Public Class OfferOutRTF
Property [Sajátcég_Teljesnév] As String
Property [Sajátcég_Irányítószám] As String
Property [Sajátcég_Város] As String
Property [Sajátcég_Utca] As String
Property [Sajátcég_Ország] As String
Property [Sajátcég_Adószám] As String
Property [Sajátcég_Adószám_EU] As String
Property [Partner_Teljesnév] As String
Property [Partner_Irányítószám] As String
Property [Partner_Város] As String
Property [Partner_Utca] As String
Property [Partner_Ország] As String
Property [Partner_Adószám] As String
Property [Partner_Adószám_EU] As String
Property [Kapcsolat_Teljesnév] As String
Property [Kapcsolat_Email] As String
Property [Kapcsolat_Mobil] As String
Property [Ajánlat_Dokumentum_Sorszám] As String
End Class
@@ -0,0 +1,98 @@
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 OfferOutVATRows
Inherits BaseObject
Private _OfferOutHeader As OfferOutHeader
Private _VAT As VAT
Private _AmountNettoHUF As Double
Private _AmountVATHUF As Double
Private _AmountBruttoHUF As Double
Private _AmountNettoDEV As Double
Private _AmountVATDEV As Double
Private _AmountBruttoDEV As Double
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<Association("OfferOutHeader-OfferOutVATRows", GetType(OfferOutHeader))> _
Property OfferOutHeader As OfferOutHeader
Get
Return _OfferOutHeader
End Get
Set(value As OfferOutHeader)
SetPropertyValue("OfferOutHeader", _OfferOutHeader, value)
End Set
End Property
Property VAT As VAT
Get
Return _VAT
End Get
Set(value As VAT)
SetPropertyValue("VAT", _VAT, value)
End Set
End Property
Property AmountNettoHUF As Double
Get
Return _AmountNettoHUF
End Get
Set(ByVal value As Double)
SetPropertyValue("AmountNettoHUF", _AmountNettoHUF, value)
End Set
End Property
Property AmountVATHUF As Double
Get
Return _AmountVATHUF
End Get
Set(ByVal value As Double)
SetPropertyValue("AmountVATHUF", _AmountVATHUF, value)
End Set
End Property
Property AmountBruttoHUF As Double
Get
Return _AmountBruttoHUF
End Get
Set(ByVal value As Double)
SetPropertyValue("AmountBruttoHUF", _AmountBruttoHUF, value)
End Set
End Property
Property AmountNettoDEV As Double
Get
Return _AmountNettoDEV
End Get
Set(ByVal value As Double)
SetPropertyValue("AmountNettoDEV", _AmountNettoDEV, value)
End Set
End Property
Property AmountVATDEV As Double
Get
Return _AmountVATDEV
End Get
Set(ByVal value As Double)
SetPropertyValue("AmountVATDEV", _AmountVATDEV, value)
End Set
End Property
Property AmountBruttoDEV As Double
Get
Return _AmountBruttoDEV
End Get
Set(ByVal value As Double)
SetPropertyValue("AmountBruttoDEV", _AmountBruttoDEV, value)
End Set
End Property
End Class
@@ -0,0 +1,158 @@
Imports DevExpress.Xpo
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation
<DefaultClassOptions()> _
<NavigationItem("BusinessStocks")> _
Public Class OfferOutParameters
Inherits BaseObject
Private _CustomersFrom As CustomersFrom
Private _OfferOutMainType As eOfferOutMainType 'Fő tipus 1
Private _OfferOutMainType2 As eOfferOutMainType2 'Fő tipus 2
Private _ShortName As String 'Rövid megnevezés
Private _Description As String 'Leírás
Private _NumberGenerator As NumberGenerator 'Sorszám generátor
Private _IsGenerateNumber_First As Boolean = False 'Generáljon e azonnal sorszámot a kimenő árajánlatnak
Private _ReportData As ReportData ' Kimenő árajánlat 0. nyomtatvány
Private _ReportData1 As ReportData 'Kimenő árajánlat 1. nyomtatvány
Private _ReportData2 As ReportData 'Kimenő árajánlat 2. nyomtatvány
Private _ReportData3 As ReportData 'Kimenő árajánlat 3. nyomtatvány
Private _AlertPeriod As AlertPeriod 'Figyelmeztetési paraméter
Private _DocumentBody As String 'RTF template
Private _WorkflowSystem As WorkflowSystem
Private _MasterBusinessDirectory As BusinessDirectory 'Mi alatt hozza létre a dokumentumtárat.
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Property CustomersFrom As CustomersFrom
Get
Return _CustomersFrom
End Get
Set(ByVal value As CustomersFrom)
SetPropertyValue("CustomersFrom", _CustomersFrom, value)
End Set
End Property
Property OfferOutMainType As eOfferOutMainType
Get
Return _OfferOutMainType
End Get
Set(ByVal value As eOfferOutMainType)
SetPropertyValue("OfferOutMainType", _OfferOutMainType, value)
End Set
End Property
Property OfferOutMainType2 As eOfferOutMainType2
Get
Return _OfferOutMainType2
End Get
Set(ByVal value As eOfferOutMainType2)
SetPropertyValue("OfferOutMainType2", _OfferOutMainType2, value)
End Set
End Property
<RuleRequiredField("", DefaultContexts.Save)> _
Property ShortName As String
Get
Return _ShortName
End Get
Set(ByVal value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
<Size(-1)>
Property Description As String
Get
Return _Description
End Get
Set(ByVal value As String)
SetPropertyValue("Description", _Description, value)
End Set
End Property
<RuleRequiredField("", DefaultContexts.Save)> _
<NonCloneable()> _
Property NumberGenerator As NumberGenerator
Get
Return _NumberGenerator
End Get
Set(ByVal value As NumberGenerator)
SetPropertyValue("NumberGenerator", _NumberGenerator, value)
End Set
End Property
Property IsGenerateNumber_First As Boolean
Get
Return _IsGenerateNumber_First
End Get
Set(value As Boolean)
SetPropertyValue("IsGenerateNumber_First", _IsGenerateNumber_First, value)
End Set
End Property
Property ReportData As ReportData
Get
Return _ReportData
End Get
Set(ByVal value As ReportData)
SetPropertyValue("ReportData", _ReportData, value)
End Set
End Property
Property ReportData1 As ReportData
Get
Return _ReportData1
End Get
Set(ByVal value As ReportData)
SetPropertyValue("ReportData1", _ReportData1, value)
End Set
End Property
Property ReportData2 As ReportData
Get
Return _ReportData2
End Get
Set(ByVal value As ReportData)
SetPropertyValue("ReportData2", _ReportData2, value)
End Set
End Property
Property ReportData3 As ReportData
Get
Return _ReportData3
End Get
Set(ByVal value As ReportData)
SetPropertyValue("ReportData3", _ReportData3, value)
End Set
End Property
Property AlertPeriod As AlertPeriod
Get
Return _AlertPeriod
End Get
Set(value As AlertPeriod)
SetPropertyValue("AlertPeriod", _AlertPeriod, value)
End Set
End Property
<Size(-1)> _
Property DocumentBody As String
Get
Return _DocumentBody
End Get
Set(value As String)
SetPropertyValue("DocumentBody", _DocumentBody, value)
End Set
End Property
Property WorkflowSystem As WorkflowSystem
Get
Return _WorkflowSystem
End Get
Set(value As WorkflowSystem)
SetPropertyValue("WorkflowSystem", _WorkflowSystem, value)
End Set
End Property
Property MasterBusinessDirectory As BusinessDirectory
Get
Return _MasterBusinessDirectory
End Get
Set(value As BusinessDirectory)
SetPropertyValue("MasterBusinessDirectory", _MasterBusinessDirectory, value)
End Set
End Property
End Class
@@ -0,0 +1,115 @@
Partial Class OffersOutPrintVC
<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()
Dim ChoiceActionItem1 As DevExpress.ExpressApp.Actions.ChoiceActionItem = New DevExpress.ExpressApp.Actions.ChoiceActionItem()
Dim ChoiceActionItem2 As DevExpress.ExpressApp.Actions.ChoiceActionItem = New DevExpress.ExpressApp.Actions.ChoiceActionItem()
Me.aOffersOutPrint = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aOfferOutPrintChoice = New DevExpress.ExpressApp.Actions.SingleChoiceAction(Me.components)
Me.aOffersOutPrintPDF = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aOffersOutPrintPDF2 = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
'
'aOffersOutPrint
'
Me.aOffersOutPrint.Caption = "Print document"
Me.aOffersOutPrint.Category = "View"
Me.aOffersOutPrint.ConfirmationMessage = Nothing
Me.aOffersOutPrint.Id = "aOffersOutPrint"
Me.aOffersOutPrint.ImageName = "Action_Printing_Print"
Me.aOffersOutPrint.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aOffersOutPrint.Shortcut = Nothing
Me.aOffersOutPrint.Tag = Nothing
Me.aOffersOutPrint.TargetObjectsCriteria = Nothing
Me.aOffersOutPrint.TargetObjectType = GetType(Nuvolar.[Module].OfferOutHeader)
Me.aOffersOutPrint.TargetViewId = Nothing
Me.aOffersOutPrint.ToolTip = Nothing
Me.aOffersOutPrint.TypeOfView = Nothing
'
'aOfferOutPrintChoice
'
Me.aOfferOutPrintChoice.Caption = "Print document"
Me.aOfferOutPrintChoice.ConfirmationMessage = Nothing
Me.aOfferOutPrintChoice.Id = "aOfferOutPrintChoice"
Me.aOfferOutPrintChoice.ImageName = "Action_Printing_Print"
ChoiceActionItem1.Caption = "Standard"
ChoiceActionItem1.Data = "0"
ChoiceActionItem1.ImageName = Nothing
ChoiceActionItem1.Shortcut = Nothing
ChoiceActionItem2.Caption = "Contract"
ChoiceActionItem2.Data = "1"
ChoiceActionItem2.ImageName = Nothing
ChoiceActionItem2.Shortcut = Nothing
Me.aOfferOutPrintChoice.Items.Add(ChoiceActionItem1)
Me.aOfferOutPrintChoice.Items.Add(ChoiceActionItem2)
Me.aOfferOutPrintChoice.Shortcut = Nothing
Me.aOfferOutPrintChoice.Tag = Nothing
Me.aOfferOutPrintChoice.TargetObjectsCriteria = Nothing
Me.aOfferOutPrintChoice.TargetObjectType = GetType(Nuvolar.[Module].OfferOutHeader)
Me.aOfferOutPrintChoice.TargetViewId = Nothing
Me.aOfferOutPrintChoice.ToolTip = Nothing
Me.aOfferOutPrintChoice.TypeOfView = Nothing
'
'aOffersOutPrintPDF
'
Me.aOffersOutPrintPDF.Caption = "Print document PDF"
Me.aOffersOutPrintPDF.Category = "View"
Me.aOffersOutPrintPDF.ConfirmationMessage = Nothing
Me.aOffersOutPrintPDF.Id = "aOffersOutPrintPDF"
Me.aOffersOutPrintPDF.ImageName = "Action_Printing_Print"
Me.aOffersOutPrintPDF.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aOffersOutPrintPDF.Shortcut = Nothing
Me.aOffersOutPrintPDF.Tag = Nothing
Me.aOffersOutPrintPDF.TargetObjectsCriteria = Nothing
Me.aOffersOutPrintPDF.TargetObjectType = GetType(Nuvolar.[Module].OfferOutHeader)
Me.aOffersOutPrintPDF.TargetViewId = Nothing
Me.aOffersOutPrintPDF.ToolTip = Nothing
Me.aOffersOutPrintPDF.TypeOfView = Nothing
'
'aOffersOutPrintPDF2
'
Me.aOffersOutPrintPDF2.Caption = "Print document PDF"
Me.aOffersOutPrintPDF2.Category = "View"
Me.aOffersOutPrintPDF2.ConfirmationMessage = Nothing
Me.aOffersOutPrintPDF2.Id = "aOffersOutPrintPDF2"
Me.aOffersOutPrintPDF2.ImageName = "Action_Printing_Print"
Me.aOffersOutPrintPDF2.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aOffersOutPrintPDF2.Shortcut = Nothing
Me.aOffersOutPrintPDF2.Tag = Nothing
Me.aOffersOutPrintPDF2.TargetObjectsCriteria = Nothing
Me.aOffersOutPrintPDF2.TargetObjectType = GetType(Nuvolar.[Module].OfferOutHeader)
Me.aOffersOutPrintPDF2.TargetViewId = Nothing
Me.aOffersOutPrintPDF2.ToolTip = Nothing
Me.aOffersOutPrintPDF2.TypeOfView = Nothing
End Sub
Public WithEvents aOffersOutPrint As DevExpress.ExpressApp.Actions.SimpleAction
Public WithEvents aOfferOutPrintChoice As DevExpress.ExpressApp.Actions.SingleChoiceAction
Public WithEvents aOffersOutPrintPDF As DevExpress.ExpressApp.Actions.SimpleAction
Public WithEvents aOffersOutPrintPDF2 As DevExpress.ExpressApp.Actions.SimpleAction
End Class
@@ -0,0 +1,135 @@
<?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="aOffersOutPrint.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aOfferOutPrintChoice.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="aOffersOutPrintPDF.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 134</value>
</metadata>
<metadata name="aOffersOutPrintPDF2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>171, 146</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,158 @@
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.XtraReports.UI
Imports DevExpress.XtraReports.Parameters
Imports DevExpress.ExpressApp.Reports
Imports DevExpress.Persistent.BaseImpl
Imports System.IO
Public Class OffersOutPrintVC
Inherits DevExpress.ExpressApp.ViewController
Private _ReportServiceController As ReportServiceController
Public Sub New()
MyBase.New()
InitializeComponent()
RegisterActions(components)
End Sub
Protected Overrides Sub OnActivated()
MyBase.OnActivated()
If View.Id = "OfferOutHeader_DetailView" Then
Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.Active.SetItemValue("", True)
Frame.GetController(Of OffersOutPrintVC).aOffersOutPrint.Active.SetItemValue("", True)
End If
If View.Id = "CRM_Opportunities_OfferOutHeader_ListView" Then
Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.Active.SetItemValue("", True)
Frame.GetController(Of OffersOutPrintVC).aOffersOutPrint.Active.SetItemValue("", True)
End If
If View.Id = "OfferOutHeader_ListView_Support" Then
Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.Active.SetItemValue("", False)
Frame.GetController(Of OffersOutPrintVC).aOffersOutPrint.Active.SetItemValue("", False)
Frame.GetController(Of OffersOutPrintVC).aOffersOutPrintPDF2.Active.SetItemValue("", False)
Frame.GetController(Of OffersOutPrintVC).aOffersOutPrintPDF.Active.SetItemValue("", False)
End If
If View.Id = "OfferOutHeader_ListView_Subcontractor" Then
Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.Active.SetItemValue("", False)
Frame.GetController(Of OffersOutPrintVC).aOffersOutPrint.Active.SetItemValue("", False)
Frame.GetController(Of OffersOutPrintVC).aOffersOutPrintPDF2.Active.SetItemValue("", False)
Frame.GetController(Of OffersOutPrintVC).aOffersOutPrintPDF.Active.SetItemValue("", False)
End If
End Sub
Protected Overrides Sub OnDeactivated()
MyBase.OnDeactivated()
If View.Id = "OfferOutHeader_DetailView" Then
Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.Active.SetItemValue("", False)
Frame.GetController(Of OffersOutPrintVC).aOffersOutPrint.Active.SetItemValue("", False)
End If
If View.Id = "CRM_Opportunities_OfferOutHeader_ListView" Then
Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.Active.SetItemValue("", False)
Frame.GetController(Of OffersOutPrintVC).aOffersOutPrint.Active.SetItemValue("", False)
End If
End Sub
Public Sub aOffersOutPrint_Execute(ByVal sender As System.Object, ByVal e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aOffersOutPrint.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _OfferOutHeader As OfferOutHeader
Dim _ReportData As ReportData
If e.SelectedObjects.Count > 0 Then
_OfferOutHeader = TryCast(e.SelectedObjects(0), OfferOutHeader)
If _OfferOutHeader IsNot Nothing Then
If Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.SelectedItem IsNot Nothing Then
If _OfferOutHeader.IsEditable = True Then
_OfferOutHeader.RecalculateOfferOut(_OfferOutHeader, _ocur)
_ocur.CommitChanges()
End If
If Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.SelectedItem.Data = "0" Then
_ReportData = _OfferOutHeader.OfferOutParameters.ReportData
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("OfferOutHeader=?", _OfferOutHeader), True)
End If
If Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.SelectedItem.Data = "1" Then
_ReportData = _OfferOutHeader.OfferOutParameters.ReportData1
Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("OfferOutHeader=?", _OfferOutHeader), True)
End If
Else
Throw New Exception("*Nincs nyomtatvány típus kiválasztva!")
End If
End If
End If
End Sub
Public Sub aOfferOutPrintChoice_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SingleChoiceActionExecuteEventArgs) Handles aOfferOutPrintChoice.Execute
If e.SelectedObjects.Count > 0 Then
Dim _OfferOutHeader As OfferOutHeader = TryCast(e.SelectedObjects(0), OfferOutHeader)
Dim _ReportData As ReportData = Nothing
If _OfferOutHeader IsNot Nothing Then
Select Case e.SelectedChoiceActionItem.Data
Case 0 'Standard
_ReportData = _OfferOutHeader.OfferOutParameters.ReportData
Case 1 'Contract
_ReportData = _OfferOutHeader.OfferOutParameters.ReportData1
Case 2 'Other
_ReportData = _OfferOutHeader.OfferOutParameters.ReportData2
End Select
'If _ReportData IsNot Nothing Then
' Frame.GetController(Of Reports.ReportServiceController).ShowPreview(_ReportData, CriteriaOperator.Parse("OfferOutHeader=?", _OfferOutHeader),true)
'End If
End If
End If
End Sub
Private Sub aOffersOutPrintPDF_Execute(sender As System.Object, e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) Handles aOffersOutPrintPDF.Execute
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
Dim _OfferOutHeader As OfferOutHeader = TryCast(View.SelectedObjects(0), OfferOutHeader)
Dim _ReportData As ReportData = Nothing
If _OfferOutHeader IsNot Nothing Then
If Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.SelectedItem IsNot Nothing Then
If _OfferOutHeader.IsEditable = True Then
_OfferOutHeader.RecalculateOfferOut(_OfferOutHeader, _ocur)
_ocur.CommitChanges()
End If
If Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.SelectedItem.Data = "0" Then
_ReportData = _OfferOutHeader.OfferOutParameters.ReportData
End If
If Frame.GetController(Of OffersOutPrintVC).aOfferOutPrintChoice.SelectedItem.Data = "1" Then
_ReportData = _OfferOutHeader.OfferOutParameters.ReportData1
End If
Else
Throw New Exception("*Nincs nyomtatvány típus kiválasztva!")
End If
If _ReportData IsNot Nothing Then
Dim _XafReport As XafReport = _ReportData.LoadReport(_ocur)
Dim _FilterString As String = "[OfferOutHeader.Oid]='" & _OfferOutHeader.Oid.ToString & "'"
_XafReport.FilterString = _FilterString
Dim _FileName As String = Path.GetTempPath & CorrectFileName(_OfferOutHeader.DocumentNumber) & ".pdf"
Dim _StreamFile As New FileStream(_FileName, FileMode.Create)
_XafReport.ExportToPdf(_StreamFile)
_StreamFile.Close()
_StreamFile = New FileStream(_FileName, FileMode.Open, FileAccess.Read)
Dim _StreamReader As New StreamReader(_StreamFile)
_StreamFile.Seek(0, SeekOrigin.Begin)
_OfferOutHeader.PDF_Original = New FileData(_ocur.Session)
_OfferOutHeader.PDF_Original.LoadFromStream(_FileName, _StreamFile)
_OfferOutHeader.PDF_Original.FileName = CorrectFileName(_OfferOutHeader.DocumentNumber) & ".pdf"
_StreamReader.Close()
_StreamFile.Close()
_ocur.CommitChanges()
If File.Exists(_FileName) Then File.Delete(_FileName)
End If
End If
End Sub
End Class
@@ -0,0 +1,386 @@
Imports System
Imports System.ComponentModel
Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering
Imports DevExpress.ExpressApp
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation
Imports DevExpress.ExpressApp.ConditionalAppearance
<DefaultClassOptions()> _
<NavigationItem(False), CreatableItem(False)> _
<Appearance("Disable InsertServicesToOfferOut and aImportRecipe", AppearanceItemType.Action, "OfferOutHeader.IsEditable = False", TargetItems:="InsertServicesToOfferOut;aImportRecipe", Enabled:=False)> _
Public Class OfferOutRows
Inherits BaseObject
Private _OfferOutHeader As OfferOutHeader 'Árajánlat fejléce
Private _RowType As eRowType 'Sor miről szól ?
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 _Product As Products 'Termék
Private _Installation As Installation 'Gyártmány
Private _RowIndex As Long 'Sor index (mozgathatónak kell lennie !)
Private _CustomsTariffs As CustomsTariffs 'Vámtarifaszám, vagy szj szám vagy még ami lesz
Private _ShortName As String 'Megnevezés -> Ez megy majd rá később a számlára is !
Private _Description As String 'Leírás -> ez is rá fog menni a számlára !
Private _DescriptionPrivate As String 'Na ez csak látszódjon, de nem menjen föl semmilyen doksira !!!
Private _ListPriceHUF As Double = 0 'Listaár HUF
Private _ListPriceDEV As Double = 0 ' Listaár DEV
Private _DiscountPriceHUF As Double = 0 'Kedvezmény összege HUF
Private _DiscountPriceDEV As Double = 0 'Kedvezmény összege DEV
Private _DiscountPercent As Double = 0 'Kedvezmény %-ban (56 az 56% !!!)
Private _QTT As Double = 0 'Mennyiség. A Mennyiségi egység vagy a Products-ból, vag Installationnál DB
Private _Units As Units 'Mennyiségi egység
Private _QualityOption As QualityOption 'Minőségi opció
Private _VAT As VAT 'ÁFA kód
Private _SumPriceHUF As Double
Private _SumPriceDEV As Double
Private _FinalPriceDEV As Double
Private _FinalPriceHUF As Double
Private _OfferInRows As OfferInRows 'Bejövő ajánlat sora !!! (Alvállalkozó!!!)
Private _Recipe As Recipe 'Milyen receptből van ez a sor
Private _CanChangeProperty As Boolean = True
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
<Association("OfferOutHeader", GetType(OfferOutHeader))> _
Property OfferOutHeader() As OfferOutHeader
Get
Return _OfferOutHeader
End Get
Set(ByVal value As OfferOutHeader)
SetPropertyValue("OfferOutHeader", _OfferOutHeader, value)
End Set
End Property
Property RowType() As eRowType
Get
Return _RowType
End Get
Set(ByVal value As eRowType)
SetPropertyValue("RowType", _RowType, value)
End Set
End Property
<RuleRequiredField("", "aTotable_OfferOut")> _
Property Product() As Products
Get
Return _Product
End Get
Set(ByVal value As Products)
SetPropertyValue("Product", _Product, value)
If value Is Nothing Then
Else
_ShortName = value.ShortName
_ListPriceHUF = value.ListPriceOutHUF
OnChanged("ShortName")
OnChanged("ListPriceHUF")
End If
End Set
End Property
Property Installation As Installation
Get
Return _Installation
End Get
Set(ByVal value As Installation)
SetPropertyValue("Installation", _Installation, value)
End Set
End Property
Property RowIndex() As Long
Get
Return _RowIndex
End Get
Set(ByVal value As Long)
SetPropertyValue("RowIndex", _RowIndex, 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 CustomsTariffs() As CustomsTariffs
Get
Return _CustomsTariffs
End Get
Set(ByVal value As CustomsTariffs)
SetPropertyValue("CustomsTariffs", _CustomsTariffs, value)
End Set
End Property
<Size(255)> _
Property ShortName() As String
Get
Return _ShortName
End Get
Set(ByVal value As String)
SetPropertyValue("ShortName", _ShortName, value)
End Set
End Property
<Size(-1)> _
Property Description() As String
Get
Return _Description
End Get
Set(ByVal value As String)
SetPropertyValue("Description", _Description, value)
End Set
End Property
<Size(-1)> _
Property DescriptionPrivate As String
Get
Return _DescriptionPrivate
End Get
Set(ByVal value As String)
SetPropertyValue("DescriptionPrivate", _DescriptionPrivate, value)
End Set
End Property
Property ListPriceHUF() As Double
Get
Return _ListPriceHUF
End Get
Set(ByVal value As Double)
SetPropertyValue("ListPriceHUF", _ListPriceHUF, value)
End Set
End Property
Property ListPriceDEV() As Double
Get
Return _ListPriceDEV
End Get
Set(ByVal value As Double)
SetPropertyValue("ListPriceDEV", _ListPriceDEV, value)
End Set
End Property
<ImmediatePostData()> _
Property DiscountPercent() As Double
Get
Return _DiscountPercent
End Get
Set(ByVal value As Double)
SetPropertyValue("DiscountPercent", _DiscountPercent, value)
End Set
End Property
<RuleRequiredField("", DefaultContexts.Save)> _
<RuleRange("", DefaultContexts.Save, 0.001, 999999999)> _
Property QTT() As Double
Get
Return _QTT
End Get
Set(ByVal value As Double)
SetPropertyValue("QTT", _QTT, value)
RecalculateRow()
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 QualityOption() As QualityOption
Get
Return _QualityOption
End Get
Set(ByVal value As QualityOption)
SetPropertyValue("QualityOption", _QualityOption, value)
End Set
End Property
Property VAT() As VAT
Get
Return _VAT
End Get
Set(ByVal value As VAT)
SetPropertyValue("VAT", _VAT, value)
End Set
End Property
Property FinalPriceDEV() As Double
Get
Return _FinalPriceDEV
End Get
Set(value As Double)
SetPropertyValue("FinalPriceDEV", _FinalPriceDEV, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
If ListPriceDEV = 0 Then ListPriceDEV = value
If CanChangeProperty Then
RecalculateRow2()
RecalculateRow()
End If
End If
End Set
End Property
Property FinalPriceHUF() As Double
Get
Return _FinalPriceHUF
End Get
Set(value As Double)
SetPropertyValue("FinalPriceHUF", _FinalPriceHUF, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
If ListPriceHUF = 0 Then ListPriceHUF = value
If CanChangeProperty Then
RecalculateRow2()
RecalculateRow()
End If
End If
End Set
End Property
Property SumPriceHUF() As Double
Get
Return _SumPriceHUF
End Get
Set(value As Double)
SetPropertyValue("SumPriceHUF", _SumPriceHUF, value)
End Set
End Property
Property SumPriceDEV() As Double
Get
Return _SumPriceDEV
End Get
Set(value As Double)
SetPropertyValue("SumPriceDEV", _SumPriceDEV, value)
End Set
End Property
<Browsable(False)> _
Property DiscountPriceHUF() As Double
Get
Return _DiscountPriceHUF
End Get
Set(ByVal value As Double)
SetPropertyValue("DiscountPriceHUF", _DiscountPriceHUF, value)
End Set
End Property
<Browsable(False)> _
Property DiscountPriceDEV() As Double
Get
Return _DiscountPriceDEV
End Get
Set(ByVal value As Double)
SetPropertyValue("DiscountPriceDEV", _DiscountPriceDEV, value)
End Set
End Property
Property OfferInRows As OfferInRows
Get
Return _OfferInRows
End Get
Set(value As OfferInRows)
SetPropertyValue("OfferInRows", _OfferInRows, value)
End Set
End Property
Property Recipe As Recipe
Get
Return _Recipe
End Get
Set(value As Recipe)
SetPropertyValue("Recipe", _Recipe, value)
End Set
End Property
<Browsable(False)> _
Property CanChangeProperty As Boolean
Get
Return _CanChangeProperty
End Get
Set(value As Boolean)
SetPropertyValue("CanChangeProperty", _CanChangeProperty, value)
End Set
End Property
Public Sub RecalculateRow()
DiscountPriceDEV = ListPriceDEV * (DiscountPercent / 100)
DiscountPriceHUF = ListPriceHUF * (DiscountPercent / 100)
SumPriceDEV = (ListPriceDEV - DiscountPriceDEV) * QTT
SumPriceHUF = (ListPriceHUF - DiscountPriceHUF) * QTT
End Sub
Public Sub RecalculateRow2()
If Me.OfferOutHeader.CurrencyName.ShortName = "HUF" Then
If ListPriceHUF <> 0 Then
DiscountPercent = 100 - (FinalPriceHUF / ListPriceHUF * 100)
End If
Else
If ListPriceDEV <> 0 Then
DiscountPercent = 100 - (FinalPriceDEV / ListPriceDEV * 100)
End If
End If
End Sub
Public Sub AddRows(ByVal _p_OfferOutHeader As OfferOutHeader)
' Sor hozzáadása
CanChangeProperty = False
Me.OfferOutHeader = _p_OfferOutHeader
If _p_OfferOutHeader.row_RowType = eRowType.IsInstallation Then ' Sor hozzáadása ha gyártmány típusú a sor
Me.Installation = _p_OfferOutHeader.row_Installation
Me.RowType = _p_OfferOutHeader.row_RowType
Me.QTT = _p_OfferOutHeader.row_QTT
Me.Units = Session.FindObject(Of Units)(CriteriaOperator.Parse("ShortName='DB'"))
Me.ListPriceHUF = _p_OfferOutHeader.row_ListPriceHUF
Me.ListPriceDEV = _p_OfferOutHeader.row_ListPriceDEV
Me.DiscountPercent = _p_OfferOutHeader.row_DiscountPercent
Me.RowGroup1 = _p_OfferOutHeader.row_RowGroup1
Me.RowGroup2 = _p_OfferOutHeader.row_RowGroup2
Me.VAT = _p_OfferOutHeader.row_VAT
RecalculateRow()
FinalPriceDEV = ListPriceDEV - DiscountPriceDEV
FinalPriceHUF = ListPriceHUF - DiscountPriceHUF
End If
If _p_OfferOutHeader.row_RowType = eRowType.IsOther Then ' Sor hozzáadása ha egyéb típusú a sor
Me.ShortName = _p_OfferOutHeader.row_ShortName
Me.RowType = _p_OfferOutHeader.row_RowType
Me.QTT = _p_OfferOutHeader.row_QTT
Me.Units = _p_OfferOutHeader.row_Units
Me.ListPriceHUF = _p_OfferOutHeader.row_ListPriceHUF
Me.ListPriceDEV = _p_OfferOutHeader.row_ListPriceDEV
Me.DiscountPercent = _p_OfferOutHeader.row_DiscountPercent
Me.Description = _p_OfferOutHeader.row_Description
Me.VAT = _p_OfferOutHeader.row_VAT
Me.RowGroup1 = _p_OfferOutHeader.row_RowGroup1
Me.RowGroup2 = _p_OfferOutHeader.row_RowGroup2
RecalculateRow()
FinalPriceDEV = ListPriceDEV - DiscountPriceDEV
FinalPriceHUF = ListPriceHUF - DiscountPriceHUF
End If
If _p_OfferOutHeader.row_RowType = eRowType.IsProduct Then ' Sor hozzáadása ha termék típusú a sor
Me.Product = _p_OfferOutHeader.row_Products
Me.RowType = _p_OfferOutHeader.row_RowType
Me.QTT = _p_OfferOutHeader.row_QTT
Me.Units = _p_OfferOutHeader.row_Products.Units
Me.ListPriceHUF = _p_OfferOutHeader.row_ListPriceHUF
Me.ListPriceDEV = _p_OfferOutHeader.row_ListPriceDEV
Me.DiscountPercent = _p_OfferOutHeader.row_DiscountPercent
Me.VAT = _p_OfferOutHeader.row_Products.VAT
Me.RowGroup1 = _p_OfferOutHeader.row_RowGroup1
Me.RowGroup2 = _p_OfferOutHeader.row_RowGroup2
RecalculateRow()
FinalPriceDEV = ListPriceDEV - DiscountPriceDEV
FinalPriceHUF = ListPriceHUF - DiscountPriceHUF
End If
' Indexelés
If _p_OfferOutHeader.OfferOutRows.Count = 0 Then
Me.RowIndex = 0
Else
Me.RowIndex = _p_OfferOutHeader.OfferOutRows.Count - 1
End If
CanChangeProperty = True
End Sub
End Class
@@ -0,0 +1,363 @@
Partial Class OffersOutVC
<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.aOffersOutFinal = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aOrderOfferedRows = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aTotableD_OfferOut = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aTotable_OfferOut = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aUp_OfferOut = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aDown_OfferOut = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aCloneOfferOut = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aCreateOrderIn_From_OfferOut = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aCloneOfferOut_CRM = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aOffersOut_ChangeRows = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aOffersOutFinalWidthVersion = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aGenerateOfferOutCost = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aImportRecipe = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aInsert_Discount_RowOther = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aInsertServicesToOfferOut = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aBackToRowEdit_OfferOut = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aOfferOut_ChangeState = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aGeneratePDFandSendDefaultMailClient = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aBackToEditOfferOut = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
Me.aProductVariableFinder = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aImportOrderInRows = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aOfferOut_RecalculateDEV = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aOfferOutHeader_AddOfferInHeader = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
Me.aOfferOutHeader_ImportOfferInRows = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
'
'aOffersOutFinal
'
Me.aOffersOutFinal.Caption = "Offers Out Final"
Me.aOffersOutFinal.Category = "RecordEdit"
Me.aOffersOutFinal.ConfirmationMessage = Nothing
Me.aOffersOutFinal.Id = "aOffersOutFinal"
Me.aOffersOutFinal.ImageName = "MenuBar_SaveAndClose"
Me.aOffersOutFinal.ToolTip = Nothing
'
'aOrderOfferedRows
'
Me.aOrderOfferedRows.Caption = "OrderOfferedRows"
Me.aOrderOfferedRows.Category = "RecordEdit"
Me.aOrderOfferedRows.ConfirmationMessage = Nothing
Me.aOrderOfferedRows.Id = "aOrderOfferedRows"
Me.aOrderOfferedRows.ToolTip = Nothing
'
'aTotableD_OfferOut
'
Me.aTotableD_OfferOut.Caption = "Delete row"
Me.aTotableD_OfferOut.Category = "aTotableD_OfferOut"
Me.aTotableD_OfferOut.ConfirmationMessage = Nothing
Me.aTotableD_OfferOut.Id = "aTotableD_OfferOut"
Me.aTotableD_OfferOut.ImageName = "table_delete"
Me.aTotableD_OfferOut.TargetViewId = ""
Me.aTotableD_OfferOut.ToolTip = Nothing
'
'aTotable_OfferOut
'
Me.aTotable_OfferOut.Caption = "Add row"
Me.aTotable_OfferOut.Category = "aTotable_OfferOut"
Me.aTotable_OfferOut.ConfirmationMessage = Nothing
Me.aTotable_OfferOut.Id = "aTotable_OfferOut"
Me.aTotable_OfferOut.ImageName = "table_add"
Me.aTotable_OfferOut.TargetViewId = ""
Me.aTotable_OfferOut.ToolTip = Nothing
'
'aUp_OfferOut
'
Me.aUp_OfferOut.Caption = "Up"
Me.aUp_OfferOut.Category = "RecordsNavigation"
Me.aUp_OfferOut.ConfirmationMessage = Nothing
Me.aUp_OfferOut.Id = "aUp_OfferOut"
Me.aUp_OfferOut.ImageName = "arrow_up_green"
Me.aUp_OfferOut.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aUp_OfferOut.ToolTip = Nothing
'
'aDown_OfferOut
'
Me.aDown_OfferOut.Caption = "Down"
Me.aDown_OfferOut.Category = "RecordsNavigation"
Me.aDown_OfferOut.ConfirmationMessage = Nothing
Me.aDown_OfferOut.Id = "aDown_OfferOut"
Me.aDown_OfferOut.ImageName = "arrow_down_green"
Me.aDown_OfferOut.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aDown_OfferOut.ToolTip = Nothing
'
'aCloneOfferOut
'
Me.aCloneOfferOut.Caption = "Clone selected OfferOut"
Me.aCloneOfferOut.Category = "ObjectsCreation"
Me.aCloneOfferOut.ConfirmationMessage = Nothing
Me.aCloneOfferOut.Id = "aCloneOfferOut"
Me.aCloneOfferOut.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aCloneOfferOut.ToolTip = Nothing
'
'aCreateOrderIn_From_OfferOut
'
Me.aCreateOrderIn_From_OfferOut.AcceptButtonCaption = Nothing
Me.aCreateOrderIn_From_OfferOut.CancelButtonCaption = Nothing
Me.aCreateOrderIn_From_OfferOut.Caption = "Create OrderIn"
Me.aCreateOrderIn_From_OfferOut.Category = "ObjectsCreation"
Me.aCreateOrderIn_From_OfferOut.ConfirmationMessage = Nothing
Me.aCreateOrderIn_From_OfferOut.Id = "aCreateOrderIn_From_OfferOut"
Me.aCreateOrderIn_From_OfferOut.ImageName = "document_down"
Me.aCreateOrderIn_From_OfferOut.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aCreateOrderIn_From_OfferOut.TargetViewId = ""
Me.aCreateOrderIn_From_OfferOut.ToolTip = Nothing
'
'aCloneOfferOut_CRM
'
Me.aCloneOfferOut_CRM.AcceptButtonCaption = Nothing
Me.aCloneOfferOut_CRM.CancelButtonCaption = Nothing
Me.aCloneOfferOut_CRM.Caption = "CloneOfferOut CRM"
Me.aCloneOfferOut_CRM.Category = "ObjectsCreation"
Me.aCloneOfferOut_CRM.ConfirmationMessage = Nothing
Me.aCloneOfferOut_CRM.Id = "aCloneOfferOut_CRM"
Me.aCloneOfferOut_CRM.ImageName = "Action_CloneMerge_Clone_Object"
Me.aCloneOfferOut_CRM.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aCloneOfferOut_CRM.ToolTip = Nothing
'
'aOffersOut_ChangeRows
'
Me.aOffersOut_ChangeRows.AcceptButtonCaption = Nothing
Me.aOffersOut_ChangeRows.CancelButtonCaption = Nothing
Me.aOffersOut_ChangeRows.Caption = "Change data in selected rows"
Me.aOffersOut_ChangeRows.ConfirmationMessage = Nothing
Me.aOffersOut_ChangeRows.Id = "aOffersOut_ChangeRows"
Me.aOffersOut_ChangeRows.ImageName = "Action_EditModel"
Me.aOffersOut_ChangeRows.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aOffersOut_ChangeRows.ToolTip = Nothing
'
'aOffersOutFinalWidthVersion
'
Me.aOffersOutFinalWidthVersion.AcceptButtonCaption = Nothing
Me.aOffersOutFinalWidthVersion.CancelButtonCaption = Nothing
Me.aOffersOutFinalWidthVersion.Caption = "Offers Out Final Width Version"
Me.aOffersOutFinalWidthVersion.Category = "RecordEdit"
Me.aOffersOutFinalWidthVersion.ConfirmationMessage = Nothing
Me.aOffersOutFinalWidthVersion.Id = "aOffersOutFinalWidthVersion"
Me.aOffersOutFinalWidthVersion.ImageName = "MenuBar_SaveAndClose"
Me.aOffersOutFinalWidthVersion.ToolTip = Nothing
'
'aGenerateOfferOutCost
'
Me.aGenerateOfferOutCost.Caption = "Generate Offer Out Cost"
Me.aGenerateOfferOutCost.Category = "ObjectsCreation"
Me.aGenerateOfferOutCost.ConfirmationMessage = Nothing
Me.aGenerateOfferOutCost.Id = "aGenerateOfferOutCost"
Me.aGenerateOfferOutCost.ImageName = "stopwatch_run"
Me.aGenerateOfferOutCost.TargetViewId = "OfferOutHeader_OfferOutCostRows_ListView"
Me.aGenerateOfferOutCost.ToolTip = Nothing
'
'aImportRecipe
'
Me.aImportRecipe.AcceptButtonCaption = Nothing
Me.aImportRecipe.CancelButtonCaption = Nothing
Me.aImportRecipe.Caption = "Import Recipe"
Me.aImportRecipe.ConfirmationMessage = Nothing
Me.aImportRecipe.Id = "aImportRecipe"
Me.aImportRecipe.ToolTip = Nothing
'
'aInsert_Discount_RowOther
'
Me.aInsert_Discount_RowOther.AcceptButtonCaption = Nothing
Me.aInsert_Discount_RowOther.CancelButtonCaption = Nothing
Me.aInsert_Discount_RowOther.Caption = "Insert discount row"
Me.aInsert_Discount_RowOther.Category = "aInsert_Discount_RowOther"
Me.aInsert_Discount_RowOther.ConfirmationMessage = Nothing
Me.aInsert_Discount_RowOther.Id = "aInsert_Discount_RowOther"
Me.aInsert_Discount_RowOther.TargetViewId = ""
Me.aInsert_Discount_RowOther.ToolTip = Nothing
'
'aInsertServicesToOfferOut
'
Me.aInsertServicesToOfferOut.AcceptButtonCaption = Nothing
Me.aInsertServicesToOfferOut.CancelButtonCaption = Nothing
Me.aInsertServicesToOfferOut.Caption = "aInsert Services To Offer Out"
Me.aInsertServicesToOfferOut.ConfirmationMessage = Nothing
Me.aInsertServicesToOfferOut.Id = "aInsertServicesToOfferOut"
Me.aInsertServicesToOfferOut.TargetViewId = ""
Me.aInsertServicesToOfferOut.ToolTip = Nothing
'
'aBackToRowEdit_OfferOut
'
Me.aBackToRowEdit_OfferOut.Caption = "Edit row"
Me.aBackToRowEdit_OfferOut.Category = "aBackToRowEdit_OfferOut"
Me.aBackToRowEdit_OfferOut.ConfirmationMessage = Nothing
Me.aBackToRowEdit_OfferOut.Id = "aBackToRowEdit_OfferOut"
Me.aBackToRowEdit_OfferOut.ImageName = "table_refresh"
Me.aBackToRowEdit_OfferOut.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aBackToRowEdit_OfferOut.TargetViewId = ""
Me.aBackToRowEdit_OfferOut.ToolTip = Nothing
Me.aBackToRowEdit_OfferOut.TypeOfView = GetType(DevExpress.ExpressApp.View)
'
'aOfferOut_ChangeState
'
Me.aOfferOut_ChangeState.AcceptButtonCaption = Nothing
Me.aOfferOut_ChangeState.CancelButtonCaption = Nothing
Me.aOfferOut_ChangeState.Caption = "OfferOut Change State"
Me.aOfferOut_ChangeState.ConfirmationMessage = Nothing
Me.aOfferOut_ChangeState.Id = "aOfferOut_ChangeState"
Me.aOfferOut_ChangeState.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireMultipleObjects
Me.aOfferOut_ChangeState.TargetViewId = ""
Me.aOfferOut_ChangeState.ToolTip = Nothing
'
'aGeneratePDFandSendDefaultMailClient
'
Me.aGeneratePDFandSendDefaultMailClient.Caption = "aGenerate PDFand Send Default Mail Client"
Me.aGeneratePDFandSendDefaultMailClient.ConfirmationMessage = Nothing
Me.aGeneratePDFandSendDefaultMailClient.Id = "aGeneratePDFandSendDefaultMailClient"
Me.aGeneratePDFandSendDefaultMailClient.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aGeneratePDFandSendDefaultMailClient.TargetObjectType = GetType(Nuvolar.[Module].OfferOutHeader)
Me.aGeneratePDFandSendDefaultMailClient.ToolTip = Nothing
'
'aBackToEditOfferOut
'
Me.aBackToEditOfferOut.Caption = "aBackToEditOfferOut"
Me.aBackToEditOfferOut.Category = "Edit"
Me.aBackToEditOfferOut.ConfirmationMessage = Nothing
Me.aBackToEditOfferOut.Id = "aBackToEditOfferOut"
Me.aBackToEditOfferOut.ImageName = "table_refresh"
Me.aBackToEditOfferOut.SelectionDependencyType = DevExpress.ExpressApp.Actions.SelectionDependencyType.RequireSingleObject
Me.aBackToEditOfferOut.TargetObjectType = GetType(Nuvolar.[Module].OfferOutHeader)
Me.aBackToEditOfferOut.TargetViewId = ""
Me.aBackToEditOfferOut.ToolTip = Nothing
Me.aBackToEditOfferOut.TypeOfView = GetType(DevExpress.ExpressApp.View)
'
'aProductVariableFinder
'
Me.aProductVariableFinder.AcceptButtonCaption = Nothing
Me.aProductVariableFinder.CancelButtonCaption = Nothing
Me.aProductVariableFinder.Caption = "aProductVariableFinder"
Me.aProductVariableFinder.ConfirmationMessage = Nothing
Me.aProductVariableFinder.Id = "aProductVariableFinder"
Me.aProductVariableFinder.TargetObjectType = GetType(Nuvolar.[Module].OfferOutRows)
Me.aProductVariableFinder.TargetViewId = ""
Me.aProductVariableFinder.ToolTip = Nothing
'
'aImportOrderInRows
'
Me.aImportOrderInRows.AcceptButtonCaption = Nothing
Me.aImportOrderInRows.CancelButtonCaption = Nothing
Me.aImportOrderInRows.Caption = "Import Order In Rows"
Me.aImportOrderInRows.ConfirmationMessage = Nothing
Me.aImportOrderInRows.Id = "aImportOrderInRows"
Me.aImportOrderInRows.TargetObjectType = GetType(Nuvolar.[Module].OfferOutRows)
Me.aImportOrderInRows.TargetViewId = "OfferOutHeader_OfferOutRows_ListView"
Me.aImportOrderInRows.ToolTip = Nothing
'
'aOfferOut_RecalculateDEV
'
Me.aOfferOut_RecalculateDEV.AcceptButtonCaption = Nothing
Me.aOfferOut_RecalculateDEV.CancelButtonCaption = Nothing
Me.aOfferOut_RecalculateDEV.Caption = "aOfferOut_RecalculateDEV"
Me.aOfferOut_RecalculateDEV.ConfirmationMessage = Nothing
Me.aOfferOut_RecalculateDEV.Id = "aOfferOut_RecalculateDEV"
Me.aOfferOut_RecalculateDEV.TargetObjectType = GetType(Nuvolar.[Module].OfferOutHeader)
Me.aOfferOut_RecalculateDEV.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
Me.aOfferOut_RecalculateDEV.ToolTip = Nothing
Me.aOfferOut_RecalculateDEV.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
'
'aOfferOutHeader_AddOfferInHeader
'
Me.aOfferOutHeader_AddOfferInHeader.AcceptButtonCaption = Nothing
Me.aOfferOutHeader_AddOfferInHeader.CancelButtonCaption = Nothing
Me.aOfferOutHeader_AddOfferInHeader.Caption = "aOfferOutHeader_AddOfferInHeader"
Me.aOfferOutHeader_AddOfferInHeader.Category = "ObjectsCreation"
Me.aOfferOutHeader_AddOfferInHeader.ConfirmationMessage = Nothing
Me.aOfferOutHeader_AddOfferInHeader.Id = "aOfferOutHeader_AddOfferInHeader"
Me.aOfferOutHeader_AddOfferInHeader.TargetObjectType = GetType(Nuvolar.[Module].OfferInHeader)
Me.aOfferOutHeader_AddOfferInHeader.TargetViewId = ""
Me.aOfferOutHeader_AddOfferInHeader.ToolTip = Nothing
'
'aOfferOutHeader_ImportOfferInRows
'
Me.aOfferOutHeader_ImportOfferInRows.AcceptButtonCaption = Nothing
Me.aOfferOutHeader_ImportOfferInRows.CancelButtonCaption = Nothing
Me.aOfferOutHeader_ImportOfferInRows.Caption = "aOfferOutHeader_ImportOfferInRows"
Me.aOfferOutHeader_ImportOfferInRows.ConfirmationMessage = Nothing
Me.aOfferOutHeader_ImportOfferInRows.Id = "aOfferOutHeader_ImportOfferInRows"
Me.aOfferOutHeader_ImportOfferInRows.TargetObjectType = GetType(Nuvolar.[Module].OfferOutRows)
Me.aOfferOutHeader_ImportOfferInRows.TargetViewId = "OfferOutHeader_OfferOutRows_ListView"
Me.aOfferOutHeader_ImportOfferInRows.ToolTip = Nothing
'
'OffersOutVC
'
Me.Actions.Add(Me.aOffersOutFinal)
Me.Actions.Add(Me.aOrderOfferedRows)
Me.Actions.Add(Me.aTotableD_OfferOut)
Me.Actions.Add(Me.aTotable_OfferOut)
Me.Actions.Add(Me.aUp_OfferOut)
Me.Actions.Add(Me.aDown_OfferOut)
Me.Actions.Add(Me.aCloneOfferOut)
Me.Actions.Add(Me.aCreateOrderIn_From_OfferOut)
Me.Actions.Add(Me.aCloneOfferOut_CRM)
Me.Actions.Add(Me.aOffersOut_ChangeRows)
Me.Actions.Add(Me.aOffersOutFinalWidthVersion)
Me.Actions.Add(Me.aGenerateOfferOutCost)
Me.Actions.Add(Me.aImportRecipe)
Me.Actions.Add(Me.aInsert_Discount_RowOther)
Me.Actions.Add(Me.aInsertServicesToOfferOut)
Me.Actions.Add(Me.aBackToRowEdit_OfferOut)
Me.Actions.Add(Me.aOfferOut_ChangeState)
Me.Actions.Add(Me.aGeneratePDFandSendDefaultMailClient)
Me.Actions.Add(Me.aBackToEditOfferOut)
Me.Actions.Add(Me.aProductVariableFinder)
Me.Actions.Add(Me.aImportOrderInRows)
Me.Actions.Add(Me.aOfferOut_RecalculateDEV)
Me.Actions.Add(Me.aOfferOutHeader_AddOfferInHeader)
Me.Actions.Add(Me.aOfferOutHeader_ImportOfferInRows)
End Sub
Friend WithEvents aOffersOutFinal As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aOrderOfferedRows As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aTotableD_OfferOut As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aTotable_OfferOut As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aUp_OfferOut As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aDown_OfferOut As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aCloneOfferOut As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aCreateOrderIn_From_OfferOut As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aCloneOfferOut_CRM As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aOffersOut_ChangeRows As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aOffersOutFinalWidthVersion As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aGenerateOfferOutCost As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aImportRecipe As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aInsert_Discount_RowOther As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aInsertServicesToOfferOut As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aBackToRowEdit_OfferOut As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aOfferOut_ChangeState As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aBackToEditOfferOut As DevExpress.ExpressApp.Actions.SimpleAction
Friend WithEvents aProductVariableFinder As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aImportOrderInRows As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aOfferOut_RecalculateDEV As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aOfferOutHeader_AddOfferInHeader As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Friend WithEvents aOfferOutHeader_ImportOfferInRows As DevExpress.ExpressApp.Actions.PopupWindowShowAction
Protected WithEvents aGeneratePDFandSendDefaultMailClient As DevExpress.ExpressApp.Actions.SimpleAction
End Class
@@ -0,0 +1,195 @@
<?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="aOffersOutFinal.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>523, 17</value>
</metadata>
<metadata name="aOrderOfferedRows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>660, 17</value>
</metadata>
<metadata name="aTotableD_OfferOut.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1323, 17</value>
</metadata>
<metadata name="aTotable_OfferOut.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>196, 56</value>
</metadata>
<metadata name="aUp_OfferOut.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>694, 56</value>
</metadata>
<metadata name="aDown_OfferOut.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1015, 17</value>
</metadata>
<metadata name="aCloneOfferOut.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1092, 56</value>
</metadata>
<metadata name="aCreateOrderIn_From_OfferOut.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 95</value>
</metadata>
<metadata name="aCloneOfferOut_CRM.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>433, 95</value>
</metadata>
<metadata name="aOffersOut_ChangeRows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>796, 95</value>
</metadata>
<metadata name="aOffersOutFinalWidthVersion.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1184, 95</value>
</metadata>
<metadata name="aGenerateOfferOutCost.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>348, 56</value>
</metadata>
<metadata name="aImportRecipe.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1395, 95</value>
</metadata>
<metadata name="aInsert_Discount_RowOther.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>983, 95</value>
</metadata>
<metadata name="aInsertServicesToOfferOut.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>602, 95</value>
</metadata>
<metadata name="aBackToRowEdit_OfferOut.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>239, 95</value>
</metadata>
<metadata name="aOfferOut_ChangeState.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1229, 56</value>
</metadata>
<metadata name="aGeneratePDFandSendDefaultMailClient.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>821, 56</value>
</metadata>
<metadata name="aBackToEditOfferOut.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>528, 56</value>
</metadata>
<metadata name="aProductVariableFinder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 56</value>
</metadata>
<metadata name="aImportOrderInRows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1158, 17</value>
</metadata>
<metadata name="aOfferOut_RecalculateDEV.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>820, 17</value>
</metadata>
<metadata name="aOfferOutHeader_AddOfferInHeader.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>272, 17</value>
</metadata>
<metadata name="aOfferOutHeader_ImportOfferInRows.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
</root>
@@ -0,0 +1,11 @@
Public Enum eOfferOutLOSTReason
eNotSet = 0 'Nincs beállitva
eTooExpensive = 1 'Túl drága
eTooLate = 2 'Határidő nem megfelelő
eChooseConcurrency = 3 'Konkurenciát választották
eQualityProblem = 4 'Nem megfelelő minőségű
eNoAnswer = 5 ' Nem mondják meg miért
eWINOther = 6 ' Más ajánlatunkat fogadták el
eOther = 7 'Egyéb
End Enum
@@ -0,0 +1,5 @@
Public Enum eOfferOutMainType
eFromProducts = 0 'Termékrõl adjuk
eFromInstallation = 1 'Gyártmányról adjuk (Gyártmány hierarchia !)
End Enum
@@ -0,0 +1,6 @@
Public Enum eOfferOutMainType2
eOfferDetail = 0 'Tételes ajánlat és összesítés van a végén
eOfferDetailNoSum = 1 'Tételes, de nem összesíthetõ !
eOfferUnique = 2 'Abszolute egyedi és sok sok dokumentum
End Enum
@@ -0,0 +1,7 @@
Public Enum eOfferOutState
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
@@ -0,0 +1,9 @@
Public Enum eRowType
IsProduct = 0 'Termékrõl
IsOther = 1 'Egyéb
IsInstallation = 2 'Gyártmányról
End Enum
@@ -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(Nuvolar.[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(Nuvolar.[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(Nuvolar.[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(Nuvolar.[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,47 @@
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 ImportOrderInRowsPopUp
Inherits BaseObject
Private _CRM_Opportunities As CRM_Opportunities
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<VisibleInDetailView(False)> _
<VisibleInListView(False)> _
<Browsable(False)> _
<ImmediatePostData()> _
Property CRM_Opportunities As CRM_Opportunities
Get
Return _CRM_Opportunities
End Get
Set(value As CRM_Opportunities)
SetPropertyValue("CRM_Opportunities", _CRM_Opportunities, value)
End Set
End Property
'--------------ReadOnly------------------------
<ImmediatePostData()> _
ReadOnly Property OrderInHeader As XPCollection(Of OrderInHeader)
Get
Return New XPCollection(Of OrderInHeader)(Session, Session.ParseCriteria("CRM_Opportunities=?", Me.CRM_Opportunities))
End Get
End Property
End Class
@@ -0,0 +1,24 @@
Imports System
Imports System.ComponentModel
Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering
Imports DevExpress.ExpressApp
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation
<DefaultClassOptions()> _
<NonPersistent()> _
<NavigationItem(False), CreatableItem(False)> _
Public Class ImportRecipePopUp
Inherits BaseObject
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
Property Recipe As Recipe
End Class
@@ -0,0 +1,140 @@
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
<NonPersistent()> _
<NavigationItem(False), CreatableItem(False)> _
<DefaultClassOptions()> _
<Appearance("Disable QTT, Units", AppearanceItemType.ViewItem, "1=1", TargetItems:="QTT;Units", Enabled:=False)> _
<Appearance("Disable SUMFinalPrice", AppearanceItemType.ViewItem, "1=1", TargetItems:="SUMFinalPrice", Enabled:=False)> _
<Appearance("Disable DiscountPriceHUF and DiscountPriceDEV", AppearanceItemType.ViewItem, "DiscountPercent>0", TargetItems:="DiscountPriceHUF;DiscountPriceDEV", Enabled:=False)> _
<Appearance("Disable DiscountPercent", AppearanceItemType.ViewItem, "DiscountPriceHUF > 0 Or DiscountPriceDEV > 0", TargetItems:="DiscountPercent", Enabled:=False)> _
<Appearance("Hide DiscountPriceHUF if CurrencyName is HUF", AppearanceItemType.ViewItem, "OfferOutHeader.CurrencyName.ShortName='HUF'", TargetItems:="DiscountPriceDEV", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide DiscountPriceDEV if CurrencyName is not HUF", AppearanceItemType.ViewItem, "OfferOutHeader.CurrencyName.ShortName<>'HUF'", TargetItems:="DiscountPriceHUF", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide OfferOutHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="OfferOutHeader", visibility:=Editors.ViewItemVisibility.Hide)> _
Public Class InsertDiscountRowPopup
Inherits BaseObject
Private _Row_Group1 As String
Private _Row_Group2 As String
Private _ShortName As String = "Kedvezmény"
Private _Description As String
Private _DiscountPriceHUF As Double
Private _DiscountPriceDEV As Double
Private _Units As Units
Private _DiscountPercent As Double
Private _QTT As Double
Private _OfferOutHeader As OfferOutHeader
Private _SUMFinalPrice As Double
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
Me.QTT = 1
Me.Units = Session.FindObject(Of Units)(CriteriaOperator.Parse("ShortName='DB'"))
End Sub
Property Row_Group1 As String
Get
Return _Row_Group1
End Get
Set(value As String)
SetPropertyValue("Row_Group1", _Row_Group1, value)
End Set
End Property
Property Row_Group2 As String
Get
Return _Row_Group2
End Get
Set(value As String)
SetPropertyValue("Row_Group2", _Row_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
<Size(-1)> _
Property Description As String
Get
Return _Description
End Get
Set(value As String)
SetPropertyValue("Description", _Description, value)
End Set
End Property
<ImmediatePostData()> _
Property DiscountPriceHUF As Double
Get
Return _DiscountPriceHUF
End Get
Set(value As Double)
SetPropertyValue("DiscountPriceHUF", _DiscountPriceHUF, value)
End Set
End Property
<ImmediatePostData()> _
Property DiscountPriceDEV As Double
Get
Return _DiscountPriceDEV
End Get
Set(value As Double)
SetPropertyValue("DiscountPriceDEV", _DiscountPriceDEV, value)
End Set
End Property
<Browsable(False)> _
Property Units As Units
Get
Return _Units
End Get
Set(value As Units)
SetPropertyValue("Units", _Units, value)
End Set
End Property
<Browsable(False)> _
Property QTT As Double
Get
Return _QTT
End Get
Set(value As Double)
SetPropertyValue("QTT", _QTT, value)
End Set
End Property
<ImmediatePostData()> _
Property DiscountPercent As Double
Get
Return _DiscountPercent
End Get
Set(value As Double)
SetPropertyValue("DiscountPercent", _DiscountPercent, value)
End Set
End Property
Property OfferOutHeader As OfferOutHeader
Get
Return _OfferOutHeader
End Get
Set(value As OfferOutHeader)
SetPropertyValue("OfferOutHeader", _OfferOutHeader, value)
End Set
End Property
<ImmediatePostData()> _
Property SUMFinalPrice As Double
Get
Return _SUMFinalPrice
End Get
Set(value As Double)
SetPropertyValue("SUMFinalPrice", _SUMFinalPrice, value)
End Set
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()> _
<NonPersistent()> _
<NavigationItem(False), CreatableItem(False)> _
Public Class OfferInRows_ChangeGroup
Inherits BaseObject
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
Property ShortName As String
Property Change_ShortName As Boolean = False
Property Description As String
Property Change_Description As Boolean = False
Property DescriptionPrivate As String
Property Change_DescriptionPrivate As Boolean = False
Property QualityOption As QualityOption
Property Change_QualityOption As Boolean = False
Property Units As Units
Property Change_Units As Boolean = False
Property VAT As VAT
Property Change_VAT As Boolean = False
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,57 @@
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()> _
<NonPersistent()> _
<NavigationItem(False), CreatableItem(False)> _
<Appearance("Hide OfferLOSTReason if OfferInState<>2", AppearanceItemType.ViewItem, "OfferInState<>2", TargetItems:="OfferLOSTReason", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide OfferLOSTReasonDescription if OfferLOSTReason<>7", AppearanceItemType.ViewItem, "OfferLOSTReason<>7", TargetItems:="OfferLOSTReasonDescription", visibility:=Editors.ViewItemVisibility.Hide)> _
Public Class OfferIn_ChangeState_PopUp
Inherits BaseObject
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
Private _OfferInState As eOfferInState
Private _OfferLOSTReasonDescription As String
Private _OfferLOSTReason As eOfferInLOSTReason
<ImmediatePostData()> _
Property OfferInState As eOfferInState
Get
Return _OfferInState
End Get
Set(value As eOfferInState)
SetPropertyValue("OfferInState", _OfferInState, value)
End Set
End Property
Property OfferLOSTReasonDescription As String
Get
Return _OfferLOSTReasonDescription
End Get
Set(value As String)
SetPropertyValue("OfferLOSTReasonDescription", _OfferLOSTReasonDescription, value)
End Set
End Property
<ImmediatePostData()> _
Property OfferLOSTReason As eOfferInLOSTReason
Get
Return _OfferLOSTReason
End Get
Set(value As eOfferInLOSTReason)
SetPropertyValue("OfferLOSTReason", _OfferLOSTReason, value)
End Set
End Property
End Class
@@ -0,0 +1,33 @@
Imports System
Imports System.ComponentModel
Imports DevExpress.Xpo
Imports DevExpress.Data.Filtering
Imports DevExpress.ExpressApp
Imports DevExpress.Persistent.Base
Imports DevExpress.Persistent.BaseImpl
Imports DevExpress.Persistent.Validation
<DefaultClassOptions(), NavigationItem(False), NonPersistent(), CreatableItem(False)> _
Public Class OfferIn_RegenerateDEV_Popup
Inherits BaseObject
Public Sub New(ByVal session As Session)
MyBase.New(session)
' This constructor is used when an object is loaded from a persistent storage.
' Do not place any code here or place it only when the IsLoading property is false:
' if (!IsLoading){
' It is now OK to place your initialization code here.
' }
' or as an alternative, move your initialization code into the AfterConstruction method.
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
' Place here your initialization code.
End Sub
Property CurrencyName As CurrencyName
Property CurrencyRate As Double
Property DateExecution As Date
Property PriceMode As ePriceMode
End Class
@@ -0,0 +1,49 @@
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)> _
<NonPersistent()> _
Public Class OfferOutRows_ChangeGroup
Inherits BaseObject
Public Sub New(ByVal session As Session)
MyBase.New(session)
' This constructor is used when an object is loaded from a persistent storage.
' Do not place any code here or place it only when the IsLoading property is false:
' if (!IsLoading){
' It is now OK to place your initialization code here.
' }
' or as an alternative, move your initialization code into the AfterConstruction method.
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
' Place here your initialization code.
End Sub
Property VAT As VAT
Property Change_VAT As Boolean = False
Property Units As Units
Property Change_Units As Boolean = False
Property RowGroup1 As String
Property Change_RowGroup1 As Boolean = False
Property RowGroup2 As String
Property Change_RowGroup2 As Boolean = False
Property QualityOption As QualityOption
Property Change_QualityOption As Boolean = False
Property FinalPricePercent As Double '%-osan a meglévõ értéket növeli (+ és - lehet !!!)
Property Change_FinalPricePercent As Boolean = False
Property ShortName As String
Property Change_ShortName As Boolean = False
Property Description As String
Property Change_Description As Boolean = False
<ImmediatePostData(True), DataSourceCriteria("OfferInHeader.IsEditable='False'")>
Property OfferInRows As OfferInRows
Property Change_OfferInRows As Boolean = False
End Class
@@ -0,0 +1,57 @@
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()> _
<NonPersistent()> _
<NavigationItem(False), CreatableItem(False)> _
<Appearance("Hide OfferLOSTReason if OfferOutState<>2", AppearanceItemType.ViewItem, "OfferOutState<>2", TargetItems:="OfferLOSTReason", visibility:=Editors.ViewItemVisibility.Hide)> _
<Appearance("Hide OfferLOSTReasonDescription if OfferLOSTReason<>7 OfferOut", AppearanceItemType.ViewItem, "OfferLOSTReason<>7", TargetItems:="OfferLOSTReasonDescription", visibility:=Editors.ViewItemVisibility.Hide)> _
Public Class OfferOut_ChangeState_PopUp
Inherits BaseObject
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
Private _OfferOutState As eOfferOutState
Private _OfferLOSTReason As eOfferOutLOSTReason
Private _OfferLOSTReasonDescription As String
<ImmediatePostData()> _
Property OfferOutState As eOfferOutState
Get
Return _OfferOutState
End Get
Set(value As eOfferOutState)
SetPropertyValue("OfferOutState", _OfferOutState, value)
End Set
End Property
<ImmediatePostData()> _
Property OfferLOSTReason As eOfferOutLOSTReason
Get
Return _OfferLOSTReason
End Get
Set(value As eOfferOutLOSTReason)
SetPropertyValue("OfferLOSTReason", _OfferLOSTReason, value)
End Set
End Property
Property OfferLOSTReasonDescription As String
Get
Return _OfferLOSTReasonDescription
End Get
Set(value As String)
SetPropertyValue("OfferLOSTReasonDescription", _OfferLOSTReasonDescription, value)
End Set
End Property
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
Imports DevExpress.ExpressApp.ConditionalAppearance
<NonPersistent()> _
<NavigationItem(False), CreatableItem(False)> _
<DefaultClassOptions()> _
<Appearance("Hide OfferOutHeader", AppearanceItemType.ViewItem, "1=1", TargetItems:="OfferOutHeader", visibility:=Editors.ViewItemVisibility.Hide)> _
Public Class OffersOutCloneForCRM
Inherits BaseObject
Private _OfferOutHeader As OfferOutHeader
Private _CRM_Opportunities As CRM_Opportunities
Public Sub New(ByVal session As Session)
MyBase.New(session)
End Sub
Public Overrides Sub AfterConstruction()
MyBase.AfterConstruction()
End Sub
<RuleRequiredField("OffersOutCloneForCRM-CRM_Opportunities", DefaultContexts.Save)> _
Property CRM_Opportunities As CRM_Opportunities
Get
Return _CRM_Opportunities
End Get
Set(value As CRM_Opportunities)
SetPropertyValue("CRM_Opportunities", _CRM_Opportunities, value)
End Set
End Property
Property OfferOutHeader As OfferOutHeader
Get
Return _OfferOutHeader
End Get
Set(value As OfferOutHeader)
SetPropertyValue("OfferOutHeader", _OfferOutHeader, 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(False), CreatableItem(False), NonPersistent> _
Public Class RecalcDEV
Inherits BaseObject
Private _PriceMode As ePriceMode
Private _CurrencyRate As Double
Private _CurrencyName As CurrencyName
Private _DateExecution As Date
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
<ImmediatePostData()> _
Property PriceMode As ePriceMode
Get
Return _PriceMode
End Get
Set(value As ePriceMode)
SetPropertyValue("PriceMode", _PriceMode, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
DateExecution = DateExecution
End If
End Set
End Property
<ImmediatePostData()> _
Property CurrencyName As CurrencyName
Get
Return _CurrencyName
End Get
Set(value As CurrencyName)
SetPropertyValue("CurrencyName", _CurrencyName, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
DateExecution = DateExecution
End If
End Set
End Property
Property CurrencyRate As Double
Get
Return _CurrencyRate
End Get
Set(value As Double)
SetPropertyValue("CurrencyRate", _CurrencyRate, value)
End Set
End Property
<ImmediatePostData()> _
Property DateExecution As Date
Get
Return _DateExecution
End Get
Set(value As Date)
SetPropertyValue("DateExecution", _DateExecution, value)
If Session.IsObjectsLoading = False And Session.IsObjectsSaving = False Then
'// MNB árfolyam lekérése
If CurrencyName IsNot Nothing Then
Dim _CurrencyRate_MNB_Collection = New XPCollection(Of CurrencyRate) _
(Session, CriteriaOperator.Parse("CurrencyName.ShortName=? and IsMNB=True and GetDate(DateValid)<=?", _
CurrencyName.ShortName, DateExecution.Date))
_CurrencyRate_MNB_Collection.Sorting.Add(New SortProperty("DateValid", DB.SortingDirection.Descending))
If _CurrencyRate_MNB_Collection.Count > 0 Then
For Each _CurrencyRate_MNB In _CurrencyRate_MNB_Collection
If _CurrencyRate_MNB.DateValid.Date = value.Date Then 'Now
CurrencyRate = _CurrencyRate_MNB.RateAverage
Exit For
Else
CurrencyRate = 0
End If
Exit For
Next
End If
End If
End If
End Set
End Property
End Class