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,35 @@
Imports System
Imports System.ComponentModel
Imports System.Collections.Generic
Imports System.Diagnostics
Imports System.Text
Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Actions
Imports DevExpress.Persistent.Base
Imports DevExpress.Data.Filtering
Imports DevExpress.Xpo
Imports DevExpress.ExpressApp.SystemModule
Imports System.Linq
Imports System.IO
Imports DevExpress.ExpressApp.Editors
Public Module GLBaseCheck
Public Function CheckGLBaseInfo(_onew As Xpo.XPObjectSpace, _
_Application As DevExpress.ExpressApp.XafApplication, _
_DateFrom As Date, _
_DateTo As Date, _
_CustomersFrom As CustomersFrom, _
_e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs) As Boolean
'// Az eljárás leellenőrzi, hogy van-e
'// - fel nem adott iktatás
'// - fel nem adott vevői számla
'// - szerkeszthető dokumentum GLAccounts,GLBank,GLCassa,GLCompensation,GLMoxed
Dim _GLBaseMainCheck As GLBaseMainCheck = Nothing
Dim _CheckGLBaseInfo As Boolean = False
Return _CheckGLBaseInfo
End Function
End Module
@@ -0,0 +1,67 @@
Imports System
Imports System.ComponentModel
Imports System.Collections.Generic
Imports System.Diagnostics
Imports System.Text
Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Actions
Imports DevExpress.Persistent.Base
Imports DevExpress.Data.Filtering
Imports DevExpress.Xpo
Imports DevExpress.ExpressApp.SystemModule
Imports System.Linq
Imports System.IO
Imports DevExpress.ExpressApp.Editors
Imports DevExpress.Persistent.BaseImpl
Public Module ViewAttachments
Public Sub ViewAttachments(_ObjectSpace As Xpo.XPObjectSpace, _Frame As DevExpress.ExpressApp.Frame, _
_CustomersFrom As CustomersFrom, _Customers As Customers, _
_DocumentNumber As String, Optional _DocumentNumberProforma As String = "", _
Optional _GLMixed As GLMixed = Nothing)
Dim _RegistryHeader As RegistryHeader = _ObjectSpace.FindObject(Of RegistryHeader) _
(CriteriaOperator.Parse("CustomersFrom=? and Customers=? and DocumentNumber=?", _CustomersFrom, _Customers, _DocumentNumber))
Dim _InvoiceHeader As InvoiceHeader = _ObjectSpace.FindObject(Of InvoiceHeader) _
(CriteriaOperator.Parse("CustomersFrom=? and Customers=? and DocumentNumber=?", _CustomersFrom, _Customers, _DocumentNumber))
If _InvoiceHeader Is Nothing Then
_InvoiceHeader = _ObjectSpace.FindObject(Of InvoiceHeader)(CriteriaOperator.Parse("CustomersFrom=? and Customers=? and DocumentNumberProforma=?", _CustomersFrom, _Customers, _DocumentNumberProforma))
End If
If _RegistryHeader IsNot Nothing Then
Dim _FilePath As String = Path.Combine(Path.GetTempPath(), _RegistryHeader.DocumentFile.FileName)
Dim _Stream As Stream = New FileStream(_FilePath, FileMode.Create)
_RegistryHeader.DocumentFile.SaveToStream(_Stream)
_Stream.Close()
Process.Start(_FilePath)
ElseIf _InvoiceHeader IsNot Nothing Then
Dim _ReportData As ReportData
Dim _ReportData_DEV As ReportData
Dim _ReportData_DEV_EU As ReportData
Dim _CurrencyName As CurrencyName
_CurrencyName = _InvoiceHeader.CurrencyName
If _InvoiceHeader IsNot Nothing Then
Dim _XAFPrintHelper_I As New XAFPrintHelper(_ObjectSpace, _Frame, _InvoiceHeader.InvoiceType.ReportDataV2, CriteriaOperator.Parse("InvoiceHeader.Oid=?", _InvoiceHeader.Oid))
_XAFPrintHelper_I.ShowPreviewV2()
End If
End If
If _GLMixed IsNot Nothing Then
If _GLMixed.DocumentFile IsNot Nothing Then
ProcessDocument(_GLMixed.DocumentFile)
End If
End If
End Sub
Private Sub ProcessDocument(_DocumentFile As FileData)
Dim _FilePath As String = Path.Combine(Path.GetTempPath(), _DocumentFile.FileName)
Dim _Stream As Stream = New FileStream(_FilePath, FileMode.Create)
_DocumentFile.SaveToStream(_Stream)
_Stream.Close()
Process.Start(_FilePath)
End Sub
End Module
@@ -0,0 +1,98 @@
Imports System
Imports System.ComponentModel
Imports System.Collections.Generic
Imports System.Diagnostics
Imports System.Text
Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Actions
Imports DevExpress.Persistent.Base
Imports DevExpress.Data.Filtering
Imports DevExpress.Xpo
Imports DevExpress.ExpressApp.SystemModule
Imports System.Linq
Imports System.IO
Imports DevExpress.ExpressApp.Editors
Public Module ViewPDCI
'Public Sub ViewPDCI(_onew As Xpo.XPObjectSpace, _
' _Application As DevExpress.ExpressApp.XafApplication, _
' _e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs, _
' _CustomersFrom As CustomersFrom, _
' _Customers As Customers, _
' _PartnerType As ePartnerType, _
' _ConnectInfo As String)
' Dim _CS As New CollectionSource(_onew, GetType(PCIDetail))
' _CS.BeginUpdateCriteria()
' _CS.Criteria.Clear()
' _CS.Criteria("First") = CriteriaOperator.Parse("CustomersFrom.Oid=? and PartnerType=? and Customers.Oid=? and ConnectInfo=?", _
' _CustomersFrom.Oid, _
' _PartnerType, _
' _Customers.Oid, _
' _ConnectInfo)
' _CS.EndUpdateCriteria()
' _e.ShowViewParameters.CreatedView = _Application.CreateListView("PCIDetail_ListView", _CS, False)
' _e.ShowViewParameters.TargetWindow = TargetWindow.NewModalWindow
'End Sub
Public Sub ViewPDCIDetail(_onew As Xpo.XPObjectSpace, _
_Application As DevExpress.ExpressApp.XafApplication, _
_e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs, _
_CustomersFrom As CustomersFrom, _
_Customers As Customers, _
_PartnerType As ePartnerType, _
_ConnectInfo As String)
Dim _CS As New CollectionSource(_onew, GetType(PCIDetail))
_CS.BeginUpdateCriteria()
_CS.Criteria.Clear()
_CS.Criteria("First") = CriteriaOperator.Parse("CustomersFrom.Oid=? and PartnerType=? and Customers.Oid=? and ConnectInfo=?", _
_CustomersFrom.Oid, _
_PartnerType, _
_Customers.Oid, _
_ConnectInfo)
_CS.EndUpdateCriteria()
_e.ShowViewParameters.CreatedView = _Application.CreateListView("PCIDetail_ListView_View", _CS, False)
_e.ShowViewParameters.TargetWindow = TargetWindow.NewModalWindow
End Sub
Public Sub ViewGLDetails(_onew As Xpo.XPObjectSpace, _
_Application As DevExpress.ExpressApp.XafApplication, _
_e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs, _
_CustomersFrom As CustomersFrom, _
_Customers As Customers, _
_PartnerType As ePartnerType, _
_ConnectInfo As String)
Dim _CS As New CollectionSource(_onew, GetType(GLDetails))
_CS.BeginUpdateCriteria()
_CS.Criteria.Clear()
_CS.Criteria("First") = CriteriaOperator.Parse("IsNull(GLRows.GCRecord)=True and IsNull(GLRows.GLHeader.GCRecord)=True and GLRows.GLHeader.IsEditable=False and GLRows.GLHeader.CustomersFrom.Oid=? and GLRows.PartnerType=? and GLRows.Customer.Oid=? and GLRows.ConnectInfo=?", _
_CustomersFrom.Oid, _
_PartnerType, _
_Customers.Oid, _
_ConnectInfo)
_CS.EndUpdateCriteria()
_e.ShowViewParameters.CreatedView = _Application.CreateListView("GLDetails_ListView_PCIDetail", _CS, False)
_e.ShowViewParameters.TargetWindow = TargetWindow.NewModalWindow
End Sub
Public Sub ViewPDCIDetail_Customers(_onew As Xpo.XPObjectSpace, _
_Application As DevExpress.ExpressApp.XafApplication, _
_e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs, _
_CustomersFrom As CustomersFrom, _
_Customers As Customers)
Dim _CS As New CollectionSource(_onew, GetType(PCIDetail))
_CS.BeginUpdateCriteria()
_CS.Criteria.Clear()
_CS.Criteria("First") = CriteriaOperator.Parse("CustomersFrom.Oid=? and Customers.Oid=? ", _
_CustomersFrom.Oid, _
_Customers.Oid)
_CS.EndUpdateCriteria()
_e.ShowViewParameters.CreatedView = _Application.CreateListView("PCIDetail_ListView", _CS, False)
_e.ShowViewParameters.TargetWindow = TargetWindow.NewModalWindow
End Sub
End Module
@@ -0,0 +1,31 @@
Imports System
Imports System.ComponentModel
Imports System.Collections.Generic
Imports System.Diagnostics
Imports System.Text
Imports DevExpress.ExpressApp
Imports DevExpress.ExpressApp.Actions
Imports DevExpress.Persistent.Base
Imports DevExpress.Data.Filtering
Imports DevExpress.Xpo
Imports DevExpress.ExpressApp.SystemModule
Imports System.Linq
Imports System.IO
Imports DevExpress.ExpressApp.Editors
Public Module ViewRegistry
Public Sub ViewRegistry(_ObjectSpace As Xpo.XPObjectSpace, Application As DevExpress.ExpressApp.XafApplication, _
e As DevExpress.ExpressApp.Actions.SimpleActionExecuteEventArgs, _
_CustomersFrom As CustomersFrom, _Customers As Customers, _DocumentNumber As String)
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
Dim _RegistryHeader As RegistryHeader = _ObjectSpace.FindObject(Of RegistryHeader) _
(CriteriaOperator.Parse("CustomersFrom=? and Customers=? and DocumentNumber=?", _CustomersFrom, _Customers, _DocumentNumber))
If _RegistryHeader IsNot Nothing Then
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "RegistryHeader_DetailView", False, _onew.GetObject(_RegistryHeader))
End If
End Sub
End Module