First create solution
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class ProductFinderVC
|
||||
|
||||
<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()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,320 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.ExpressApp.Win.Editors
|
||||
Imports DevExpress.XtraGrid
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.XtraGrid.Views.Base
|
||||
Imports DevExpress.XtraGrid.Columns
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
|
||||
Public Class ProductFinderVC
|
||||
Inherits DevExpress.ExpressApp.ViewController(Of ListView)
|
||||
Private _GridListEditor_Selected As GridListEditor
|
||||
Private _GridListEditor_Select As GridListEditor
|
||||
Private gridView As ColumnView
|
||||
Private currentView As ListView
|
||||
Private falseCriteria As CriteriaOperator = CriteriaOperator.Parse("1=0")
|
||||
Private Edit_QTT_Will As RepositoryItemDoubleEdit
|
||||
Private Delegate Sub EditCellDelegate()
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
If View.Id = "ProductFinder_ProductSelect_ListView" Then
|
||||
currentView = CType(View, ListView)
|
||||
AddHandler currentView.ControlsCreated, AddressOf AutoFilterRowController_ControlsCreated
|
||||
End If
|
||||
If View.Id = "ProductFinder_DetailView" Then
|
||||
Frame.GetController(Of RefreshController).Active.SetItemValue("", False)
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "ProductFinder_ProductSelected_ListView" Then
|
||||
If _GridListEditor_Selected IsNot Nothing Then
|
||||
'RemoveHandler _GridListEditor_Selected.GridView.CellValueChanged, AddressOf ProductFinder_ProductSelected_ListView_CellValueChanged
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
|
||||
If View.Id = "ProductFinder_ProductSelected_ListView" Then
|
||||
_GridListEditor_Selected = TryCast(View.Editor, GridListEditor)
|
||||
|
||||
If _GridListEditor_Selected IsNot Nothing Then
|
||||
AddHandler _GridListEditor_Selected.GridView.CellValueChanged, AddressOf ProductFinder_ProductSelected_ListView_CellValueChanged
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
If View.Id = "ProductFinder_ProductSelect_ListView" Then
|
||||
_GridListEditor_Select = TryCast(TryCast(View, ListView).Editor, GridListEditor)
|
||||
|
||||
For Each column As DevExpress.XtraGrid.Columns.GridColumn In _GridListEditor_Select.GridView.Columns
|
||||
column.OptionsFilter.ImmediateUpdateAutoFilter = False
|
||||
If column.FieldName = "Products.ShortName" Then
|
||||
column.OptionsFilter.AutoFilterCondition = Columns.AutoFilterCondition.Contains
|
||||
End If
|
||||
Next
|
||||
If _GridListEditor_Select IsNot Nothing Then
|
||||
AddHandler _GridListEditor_Select.ColumnCreated, AddressOf Products_ListView_ColumnCreated
|
||||
AddHandler _GridListEditor_Select.GridView.ColumnFilterChanged, AddressOf GridView_ColumnFilterChanged
|
||||
AddHandler _GridListEditor_Select.GridView.CellValueChanged, AddressOf ProductFinder_ProductSelect_ListView_CellValueChanged
|
||||
AddHandler _GridListEditor_Select.GridView.RowClick, AddressOf ProductFinder_ProductSelect_RowClick
|
||||
End If
|
||||
End If
|
||||
If View.Id = "ProductFinder_ProductFinderInfo_ListView" Then
|
||||
Dim _GLE As GridListEditor = TryCast(View.Editor, GridListEditor)
|
||||
If _GLE IsNot Nothing Then
|
||||
If _GLE.GridView IsNot Nothing Then
|
||||
_GLE.GridView.OptionsView.RowAutoHeight = True
|
||||
'_GLE.GridView.OptionsView.ShowColumnHeaders = False
|
||||
'_GLE.GridView.OptionsView.ShowVerticalLines = False
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ProductFinder_ProductSelected_ListView_CellValueChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs)
|
||||
|
||||
Dim nestedFrame As NestedFrame = TryCast(Frame, NestedFrame)
|
||||
Dim parentView As View = nestedFrame.View
|
||||
parentView.ObjectSpace.CommitChanges()
|
||||
|
||||
End Sub
|
||||
Private Sub Products_ListView_ColumnCreated(sender As Object, e As ColumnCreatedEventArgs)
|
||||
e.Column.OptionsFilter.ImmediateUpdateAutoFilter = False
|
||||
End Sub
|
||||
|
||||
Private Sub Timer_Elapsed()
|
||||
_GridListEditor_Select.GridView.GridControl.Invoke(New EditCellDelegate(AddressOf Edit_QTT_Will_Cell))
|
||||
End Sub
|
||||
Private Sub Edit_QTT_Will_Cell()
|
||||
'e.KeyCode = Windows.Forms.Keys.Enter And
|
||||
If _GridListEditor_Select.GridView.FocusedRowHandle = GridControl.AutoFilterRowHandle And _GridListEditor_Select.GridView.RowCount >= 1 Then
|
||||
'_GridListEditor_Select.GridView.FocusedColumn = _GridListEditor_Select.GridView.GetVisibleColumn(_GridListEditor_Select.FindColumn("QTT_Will").VisibleIndex)
|
||||
_GridListEditor_Select.GridView.FocusedColumn = _GridListEditor_Select.GridView.Columns("QTT_Will")
|
||||
_GridListEditor_Select.GridView.HideEditor()
|
||||
_GridListEditor_Select.GridView.FocusedRowHandle = _GridListEditor_Select.GridView.GetVisibleRowHandle(0)
|
||||
_GridListEditor_Select.GridView.ShowEditor()
|
||||
If _GridListEditor_Select.GridView.ActiveEditor IsNot Nothing Then
|
||||
_GridListEditor_Select.GridView.ActiveEditor.Focus()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub GridView_ColumnFilterChanged(sender As Object, e As EventArgs)
|
||||
Dim timer As System.Timers.Timer = New System.Timers.Timer(200)
|
||||
AddHandler timer.Elapsed, AddressOf Timer_Elapsed
|
||||
timer.Enabled = True
|
||||
timer.AutoReset = False
|
||||
End Sub
|
||||
|
||||
Private Sub ProductFinder_ProductSelect_ListView_CellValueChanged(sender As Object, e As Views.Base.CellValueChangedEventArgs)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
|
||||
If e.Column.FieldName = "QTT_Will" Then
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
|
||||
Dim _ListView As ListView = TryCast(View, ListView)
|
||||
Dim _PropertyCollectionSource As PropertyCollectionSource = TryCast(_ListView.CollectionSource, PropertyCollectionSource)
|
||||
Dim _ProductFinder As ProductFinder = TryCast(_PropertyCollectionSource.MasterObject, ProductFinder)
|
||||
|
||||
|
||||
Dim _ProductNumber As String = _GridListEditor_Select.GridView.GetRowCellValue(e.RowHandle, "Products.ProductNumber")
|
||||
Dim _Products As Products = _onew.FindObject(Of Products)(CriteriaOperator.Parse("ProductNumber=?", _ProductNumber))
|
||||
|
||||
Dim _ProductSelected As ProductSelected = _onew.FindObject(Of ProductSelected)(CriteriaOperator.Parse("MasterKey=? AND Products=?", _ProductFinder.MasterKey, _Products))
|
||||
If _ProductSelected Is Nothing Then
|
||||
_ProductSelected = _onew.CreateObject(Of ProductSelected)()
|
||||
_ProductSelected.Products = _Products
|
||||
_ProductSelected.MasterKey = _ProductFinder.MasterKey
|
||||
_ProductSelected.QTT = _GridListEditor_Select.GridView.GetRowCellValue(e.RowHandle, "QTT_Will")
|
||||
Else
|
||||
_ProductSelected.QTT += _GridListEditor_Select.GridView.GetRowCellValue(e.RowHandle, "QTT_Will")
|
||||
End If
|
||||
|
||||
_onew.CommitChanges()
|
||||
|
||||
End If
|
||||
|
||||
If _GridListEditor_Select.GridView.FocusedColumn Is _GridListEditor_Select.GridView.Columns("QTT_Will") Then
|
||||
_GridListEditor_Select.GridView.FocusedColumn = _GridListEditor_Select.GridView.GetVisibleColumn(_GridListEditor_Select.FindColumn("Products.ProductNumber").VisibleIndex)
|
||||
_GridListEditor_Select.GridView.FocusedRowHandle = GridControl.AutoFilterRowHandle
|
||||
_GridListEditor_Select.GridView.ShowEditor()
|
||||
If _GridListEditor_Select.GridView.ActiveEditor IsNot Nothing Then
|
||||
_GridListEditor_Select.GridView.ActiveEditor.Focus()
|
||||
End If
|
||||
End If
|
||||
If e.Column.FieldName = "QTT_Will" Then
|
||||
Dim _DetailView As DetailView = TryCast(TryCast(Frame, NestedFrame).ViewItem.View, DetailView)
|
||||
If _DetailView IsNot Nothing Then
|
||||
Dim _ListPropertyEditor As ListPropertyEditor = _DetailView.FindItem("ProductSelected")
|
||||
If _ListPropertyEditor IsNot Nothing Then
|
||||
TryCast(_ListPropertyEditor.ListView, ListView).CollectionSource.Reload()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub AutoFilterRowController_ControlsCreated(ByVal sender As Object, ByVal e As EventArgs)
|
||||
Dim grid As GridControl = TryCast(currentView.Control, GridControl)
|
||||
gridView = TryCast(grid.FocusedView, ColumnView)
|
||||
If gridView.ActiveFilter.IsEmpty Then
|
||||
currentView.CollectionSource.Criteria("FalseCriteria") = falseCriteria
|
||||
End If
|
||||
AddHandler gridView.ActiveFilter.Changed, AddressOf ActiveFilter_Changed
|
||||
End Sub
|
||||
Private Sub ActiveFilter_Changed(ByVal sender As Object, ByVal e As EventArgs)
|
||||
If (CType(sender, ViewFilter)).IsEmpty Then
|
||||
currentView.CollectionSource.Criteria("FalseCriteria") = falseCriteria
|
||||
Else
|
||||
If currentView.CollectionSource.Criteria.ContainsKey("FalseCriteria") Then
|
||||
currentView.CollectionSource.Criteria.Remove("FalseCriteria")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub ProductFinder_ProductSelect_RowClick(sender As Object, e As Views.Grid.RowClickEventArgs)
|
||||
Dim _ProductFinder As ProductFinder
|
||||
Dim _Products As Products = _GridListEditor_Select.GridView.GetRowCellValue(e.RowHandle, "Products")
|
||||
Dim _PropertyCollectionSource As PropertyCollectionSource = TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource)
|
||||
Dim _ListPropertyEditor As ListPropertyEditor
|
||||
Dim _ProductFinderInfo As ProductFinderInfo
|
||||
|
||||
If _PropertyCollectionSource IsNot Nothing Then
|
||||
_ProductFinder = TryCast(_PropertyCollectionSource.MasterObject, ProductFinder)
|
||||
If _ProductFinder IsNot Nothing Then
|
||||
Dim _DetailView As DetailView = TryCast(TryCast(Frame, NestedFrame).ViewItem.View, DetailView)
|
||||
If _DetailView IsNot Nothing Then
|
||||
_ListPropertyEditor = _DetailView.FindItem("ProductFinderInfo")
|
||||
If _ListPropertyEditor IsNot Nothing Then
|
||||
|
||||
Dim _ListView As ListView = TryCast(_ListPropertyEditor.ListView, ListView)
|
||||
If _ListView IsNot Nothing Then
|
||||
Dim _onew As Xpo.XPObjectSpace = TryCast(_ListView.ObjectSpace, Xpo.XPObjectSpace) 'Application.CreateObjectSpace
|
||||
_ListView.CollectionSource.ResetCollection()
|
||||
If _Products IsNot Nothing Then
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "ProductGroups")
|
||||
_ProductFinderInfo.InfoString = _Products.ProductGroups.ShortName
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "Description")
|
||||
_ProductFinderInfo.InfoString = _Products.Description
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "ProductNumber")
|
||||
_ProductFinderInfo.InfoString = _Products.ProductNumber
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "ShortName")
|
||||
_ProductFinderInfo.InfoString = _Products.ShortName
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "PacketUnitIn")
|
||||
_ProductFinderInfo.InfoString = _Products.PacketUnitIn.ToString
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "ProductStrategyCode")
|
||||
_ProductFinderInfo.InfoString = _Products.ProductStrategyCode
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "Units")
|
||||
_ProductFinderInfo.InfoString = _Products.Units.ShortName
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "CustomsTariff")
|
||||
If _Products.CustomsTariff IsNot Nothing Then
|
||||
_ProductFinderInfo.InfoString = _Products.CustomsTariff.CustomsTariffNumber
|
||||
Else
|
||||
_ProductFinderInfo.InfoString = "nincs beállítva"
|
||||
End If
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "GrossWeight")
|
||||
_ProductFinderInfo.InfoString = _Products.GrossWeight
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "ListPriceOutHUF")
|
||||
_ProductFinderInfo.InfoString = _Products.ListPriceOutHUF.ToString
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = CaptionHelper.GetMemberCaption(GetType(Products), "VAT")
|
||||
_ProductFinderInfo.InfoString = _Products.VAT.ShortName
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
Dim _PricingActionRows As PricingActionRows = _onew.Session.FindObject(Of PricingActionRows) _
|
||||
(_onew.Session.ParseCriteria("Products=? and PricingActionHeader.IsActive=1 and PricingActionHeader.DateFrom<=Now() and PricingActionHeader.DateTo>=Now()", _Products))
|
||||
|
||||
If _PricingActionRows IsNot Nothing Then
|
||||
|
||||
_ProductFinderInfo = _onew.CreateObject(Of ProductFinderInfo)()
|
||||
_ProductFinderInfo.PropertyName = "Akció!"
|
||||
_ProductFinderInfo.InfoString = Format(_PricingActionRows.ListPriceHUF, "#,##0") & Chr(13) & Chr(10) & _
|
||||
_PricingActionRows.PricingActionHeader.ShortName & Chr(13) & Chr(10) & _PricingActionRows.PricingActionHeader.DateFrom.ToShortDateString & _
|
||||
" - " & _PricingActionRows.PricingActionHeader.DateTo.ToShortDateString
|
||||
_ListView.CollectionSource.Add(_ProductFinderInfo)
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'_ListView.CollectionSource.Reload()
|
||||
End If
|
||||
|
||||
End If
|
||||
_ListPropertyEditor = _DetailView.FindItem("StorageOutCirculation")
|
||||
If _ListPropertyEditor IsNot Nothing Then
|
||||
Dim _ListView As ListView = TryCast(_ListPropertyEditor.ListView, ListView)
|
||||
If _ListView IsNot Nothing Then
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(_ListView.ObjectSpace, Xpo.XPObjectSpace) 'Application.CreateObjectSpace
|
||||
_ListView.CollectionSource.ResetCollection()
|
||||
If _Products IsNot Nothing Then
|
||||
Dim _StorageOutCirculation As StorageOutCirculation
|
||||
Dim _StorageOutCirculation_Collection As New XPCollection(Of StorageOutCirculation)(_ocur.Session, CriteriaOperator.Parse("Products.Oid=?", _Products.Oid))
|
||||
For Each _StorageOutCirculation In _StorageOutCirculation_Collection
|
||||
_ListView.CollectionSource.Add(_StorageOutCirculation)
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class ProductSelect_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()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,121 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.ExpressApp.Win.Editors
|
||||
|
||||
Imports DevExpress.XtraGrid
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.XtraGrid.Views.Base
|
||||
Imports DevExpress.XtraGrid.Columns
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Public Class ProductSelect_VC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
Private _GridListEditor_Select As GridListEditor
|
||||
Private Delegate Sub EditCellDelegate()
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
|
||||
'This call is required by the Component Designer.
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
If View.Id = "ProductSelect_LookupListView" Then
|
||||
_GridListEditor_Select = TryCast(TryCast(View, ListView).Editor, GridListEditor)
|
||||
|
||||
For Each column As DevExpress.XtraGrid.Columns.GridColumn In _GridListEditor_Select.GridView.Columns
|
||||
column.OptionsFilter.ImmediateUpdateAutoFilter = False
|
||||
If column.FieldName = "Products.ShortName" Then
|
||||
column.OptionsFilter.AutoFilterCondition = Columns.AutoFilterCondition.Contains
|
||||
End If
|
||||
Next
|
||||
If _GridListEditor_Select IsNot Nothing Then
|
||||
AddHandler _GridListEditor_Select.ColumnCreated, AddressOf ProductSelect_LookupListView_ColumnCreated
|
||||
AddHandler _GridListEditor_Select.GridView.ColumnFilterChanged, AddressOf ProductSelect_LookupListView_ColumnFilterChanged
|
||||
AddHandler _GridListEditor_Select.GridView.CellValueChanged, AddressOf ProductSelect_LookupListView_ListView_CellValueChanged
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ProductSelect_LookupListView_ColumnCreated(sender As Object, e As ColumnCreatedEventArgs)
|
||||
e.Column.OptionsFilter.ImmediateUpdateAutoFilter = False
|
||||
End Sub
|
||||
|
||||
Private Sub ProductSelect_LookupListView_ColumnFilterChanged(sender As Object, e As EventArgs)
|
||||
Dim timer As System.Timers.Timer = New System.Timers.Timer(200)
|
||||
AddHandler timer.Elapsed, AddressOf Timer_Elapsed
|
||||
timer.Enabled = True
|
||||
timer.AutoReset = False
|
||||
End Sub
|
||||
|
||||
Private Sub ProductSelect_LookupListView_ListView_CellValueChanged(sender As Object, e As CellValueChangedEventArgs)
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
|
||||
If e.Column.FieldName = "QTT_Will" Then
|
||||
'Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
|
||||
'Dim _ListView As ListView = TryCast(View, ListView)
|
||||
'Dim _PropertyCollectionSource As PropertyCollectionSource = TryCast(_ListView.CollectionSource, PropertyCollectionSource)
|
||||
'Dim _ProductFinder As ProductFinder = TryCast(_PropertyCollectionSource.MasterObject, ProductFinder)
|
||||
|
||||
|
||||
'Dim _ProductNumber As String = _GridListEditor_Select.GridView.GetRowCellValue(e.RowHandle, "Products.ProductNumber")
|
||||
'Dim _Products As Products = _onew.FindObject(Of Products)(CriteriaOperator.Parse("ProductNumber=?", _ProductNumber))
|
||||
|
||||
'Dim _ProductSelected As ProductSelected = _onew.FindObject(Of ProductSelected)(CriteriaOperator.Parse("MasterKey=? AND Products=?", _ProductFinder.MasterKey, _Products))
|
||||
'If _ProductSelected Is Nothing Then
|
||||
' _ProductSelected = _onew.CreateObject(Of ProductSelected)()
|
||||
' _ProductSelected.Products = _Products
|
||||
' _ProductSelected.MasterKey = _ProductFinder.MasterKey
|
||||
' _ProductSelected.QTT = _GridListEditor_Select.GridView.GetRowCellValue(e.RowHandle, "QTT_Will")
|
||||
'Else
|
||||
' _ProductSelected.QTT += _GridListEditor_Select.GridView.GetRowCellValue(e.RowHandle, "QTT_Will")
|
||||
'End If
|
||||
|
||||
'_onew.CommitChanges()
|
||||
|
||||
End If
|
||||
|
||||
If _GridListEditor_Select.GridView.FocusedColumn Is _GridListEditor_Select.GridView.Columns("QTT_Will") Then
|
||||
_GridListEditor_Select.GridView.FocusedColumn = _GridListEditor_Select.GridView.GetVisibleColumn(_GridListEditor_Select.FindColumn("Products.ProductNumber").VisibleIndex)
|
||||
_GridListEditor_Select.GridView.FocusedRowHandle = GridControl.AutoFilterRowHandle
|
||||
_GridListEditor_Select.GridView.ShowEditor()
|
||||
If _GridListEditor_Select.GridView.ActiveEditor IsNot Nothing Then
|
||||
_GridListEditor_Select.GridView.ActiveEditor.Focus()
|
||||
End If
|
||||
End If
|
||||
If e.Column.FieldName = "QTT_Will" Then
|
||||
'Dim _DetailView As DetailView = TryCast(TryCast(Frame, NestedFrame).ViewItem.View, DetailView)
|
||||
'If _DetailView IsNot Nothing Then
|
||||
' Dim _ListPropertyEditor As ListPropertyEditor = _DetailView.FindItem("ProductSelected")
|
||||
' If _ListPropertyEditor IsNot Nothing Then
|
||||
' TryCast(_ListPropertyEditor.ListView, ListView).CollectionSource.Reload()
|
||||
' End If
|
||||
'End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub Timer_Elapsed()
|
||||
_GridListEditor_Select.GridView.GridControl.Invoke(New EditCellDelegate(AddressOf Edit_QTT_Will_Cell))
|
||||
End Sub
|
||||
Private Sub Edit_QTT_Will_Cell()
|
||||
'e.KeyCode = Windows.Forms.Keys.Enter And
|
||||
If _GridListEditor_Select.GridView.FocusedRowHandle = GridControl.AutoFilterRowHandle And _GridListEditor_Select.GridView.RowCount >= 1 Then
|
||||
_GridListEditor_Select.GridView.FocusedColumn = _GridListEditor_Select.GridView.Columns("QTT_Will")
|
||||
_GridListEditor_Select.GridView.HideEditor()
|
||||
_GridListEditor_Select.GridView.FocusedRowHandle = _GridListEditor_Select.GridView.GetVisibleRowHandle(0)
|
||||
_GridListEditor_Select.GridView.ShowEditor()
|
||||
If _GridListEditor_Select.GridView.ActiveEditor IsNot Nothing Then
|
||||
_GridListEditor_Select.GridView.ActiveEditor.Focus()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
+107
@@ -0,0 +1,107 @@
|
||||
Partial Class ProductsGant_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.aProductsGant_Refresh = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
Me.aProductsGant_SetGantItemColumn = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aProductsGant_CreateCustomersReport = New DevExpress.ExpressApp.Actions.PopupWindowShowAction(Me.components)
|
||||
Me.aProductsGant_OpenProducts = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aProductsGant_Refresh
|
||||
'
|
||||
Me.aProductsGant_Refresh.Caption = "aProductsGant_Refresh"
|
||||
Me.aProductsGant_Refresh.Category = "aProductsGant_Refresh"
|
||||
Me.aProductsGant_Refresh.ConfirmationMessage = Nothing
|
||||
Me.aProductsGant_Refresh.Id = "aProductsGant_Refresh"
|
||||
Me.aProductsGant_Refresh.ImageName = Nothing
|
||||
Me.aProductsGant_Refresh.Shortcut = Nothing
|
||||
Me.aProductsGant_Refresh.Tag = Nothing
|
||||
Me.aProductsGant_Refresh.TargetObjectsCriteria = Nothing
|
||||
Me.aProductsGant_Refresh.TargetObjectType = GetType(Nuvolar.[Module].ProductsGant)
|
||||
Me.aProductsGant_Refresh.TargetViewId = Nothing
|
||||
Me.aProductsGant_Refresh.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aProductsGant_Refresh.ToolTip = Nothing
|
||||
Me.aProductsGant_Refresh.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aProductsGant_SetGantItemColumn
|
||||
'
|
||||
Me.aProductsGant_SetGantItemColumn.AcceptButtonCaption = Nothing
|
||||
Me.aProductsGant_SetGantItemColumn.CancelButtonCaption = Nothing
|
||||
Me.aProductsGant_SetGantItemColumn.Caption = "aProductsGant_SetGantItemColumn"
|
||||
Me.aProductsGant_SetGantItemColumn.Category = "aProductsGant_SetGantItemColumn"
|
||||
Me.aProductsGant_SetGantItemColumn.ConfirmationMessage = Nothing
|
||||
Me.aProductsGant_SetGantItemColumn.Id = "aProductsGant_SetGantItemColumn"
|
||||
Me.aProductsGant_SetGantItemColumn.ImageName = Nothing
|
||||
Me.aProductsGant_SetGantItemColumn.Shortcut = Nothing
|
||||
Me.aProductsGant_SetGantItemColumn.Tag = Nothing
|
||||
Me.aProductsGant_SetGantItemColumn.TargetObjectsCriteria = Nothing
|
||||
Me.aProductsGant_SetGantItemColumn.TargetObjectType = GetType(Nuvolar.[Module].ProductsGant)
|
||||
Me.aProductsGant_SetGantItemColumn.TargetViewId = Nothing
|
||||
Me.aProductsGant_SetGantItemColumn.ToolTip = Nothing
|
||||
Me.aProductsGant_SetGantItemColumn.TypeOfView = Nothing
|
||||
'
|
||||
'aProductsGant_CreateCustomersReport
|
||||
'
|
||||
Me.aProductsGant_CreateCustomersReport.AcceptButtonCaption = Nothing
|
||||
Me.aProductsGant_CreateCustomersReport.CancelButtonCaption = Nothing
|
||||
Me.aProductsGant_CreateCustomersReport.Caption = "aProductsGant_CreateCustomersReport"
|
||||
Me.aProductsGant_CreateCustomersReport.Category = "aProductsGant_CreateCustomersReport"
|
||||
Me.aProductsGant_CreateCustomersReport.ConfirmationMessage = Nothing
|
||||
Me.aProductsGant_CreateCustomersReport.Id = "aProductsGant_CreateCustomersReport"
|
||||
Me.aProductsGant_CreateCustomersReport.ImageName = Nothing
|
||||
Me.aProductsGant_CreateCustomersReport.Shortcut = Nothing
|
||||
Me.aProductsGant_CreateCustomersReport.Tag = Nothing
|
||||
Me.aProductsGant_CreateCustomersReport.TargetObjectsCriteria = Nothing
|
||||
Me.aProductsGant_CreateCustomersReport.TargetObjectType = GetType(Nuvolar.[Module].ProductsGant)
|
||||
Me.aProductsGant_CreateCustomersReport.TargetViewId = Nothing
|
||||
Me.aProductsGant_CreateCustomersReport.TargetViewType = DevExpress.ExpressApp.ViewType.DetailView
|
||||
Me.aProductsGant_CreateCustomersReport.ToolTip = Nothing
|
||||
Me.aProductsGant_CreateCustomersReport.TypeOfView = GetType(DevExpress.ExpressApp.DetailView)
|
||||
'
|
||||
'aProductsGant_OpenProducts
|
||||
'
|
||||
Me.aProductsGant_OpenProducts.Caption = "aProductsGant_OpenProducts"
|
||||
Me.aProductsGant_OpenProducts.Category = "aProductsGant_OpenProducts"
|
||||
Me.aProductsGant_OpenProducts.ConfirmationMessage = Nothing
|
||||
Me.aProductsGant_OpenProducts.Id = "aProductsGant_OpenProducts"
|
||||
Me.aProductsGant_OpenProducts.ImageName = Nothing
|
||||
Me.aProductsGant_OpenProducts.Shortcut = Nothing
|
||||
Me.aProductsGant_OpenProducts.Tag = Nothing
|
||||
Me.aProductsGant_OpenProducts.TargetObjectsCriteria = Nothing
|
||||
Me.aProductsGant_OpenProducts.TargetObjectType = GetType(Nuvolar.[Module].ProductsGant)
|
||||
Me.aProductsGant_OpenProducts.TargetViewId = Nothing
|
||||
Me.aProductsGant_OpenProducts.ToolTip = Nothing
|
||||
Me.aProductsGant_OpenProducts.TypeOfView = Nothing
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aProductsGant_Refresh As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
Friend WithEvents aProductsGant_SetGantItemColumn As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aProductsGant_CreateCustomersReport As DevExpress.ExpressApp.Actions.PopupWindowShowAction
|
||||
Friend WithEvents aProductsGant_OpenProducts 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="aProductsGant_Refresh.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="aProductsGant_SetGantItemColumn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>338, 199</value>
|
||||
</metadata>
|
||||
<metadata name="aProductsGant_CreateCustomersReport.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>42, 200</value>
|
||||
</metadata>
|
||||
<metadata name="aProductsGant_OpenProducts.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>461, 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,756 @@
|
||||
Imports System
|
||||
Imports System.ComponentModel
|
||||
Imports System.Collections.Generic
|
||||
Imports System.Diagnostics
|
||||
Imports System.Text
|
||||
|
||||
Imports DevExpress.ExpressApp
|
||||
Imports DevExpress.ExpressApp.Actions
|
||||
Imports DevExpress.Persistent.Base
|
||||
Imports DevExpress.ExpressApp.Editors
|
||||
Imports exontrol.EXG2ANTTLib
|
||||
Imports DevExpress.Xpo
|
||||
Imports DevExpress.Data.Filtering
|
||||
Imports DevExpress.ExpressApp.SystemModule
|
||||
Imports DevExpress.Persistent.BaseImpl
|
||||
Imports System.Net.Mail
|
||||
Imports System.Reflection
|
||||
Imports DevExpress.ExpressApp.Utils
|
||||
Imports DevExpress.ExpressApp.Model
|
||||
Imports System.Linq
|
||||
|
||||
Public Class ProductsGant_VC
|
||||
Inherits Nuvolar.Module.ProductsGant_VC
|
||||
|
||||
Dim _GanttControl As exontrol.EXG2ANTTLib.exg2antt
|
||||
Dim _ProductGandRowsOidindex As Long = 0
|
||||
Dim _GantItemColumn_Array As New ArrayList
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
Dim _GantChange As Boolean = False
|
||||
Dim _FocusedItem As String
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
Structure SISGantColumn
|
||||
Public IsGroupColumn As Boolean
|
||||
Public Index As Long
|
||||
Public ColumnID As String
|
||||
Public Caption As String
|
||||
Public Width As Long
|
||||
Public GantColumnIndex As Long
|
||||
End Structure
|
||||
|
||||
#Region "Overrides"
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
|
||||
AddHandler DoWork, AddressOf _WaitFormClass.DoWork
|
||||
AddHandler InitWork, AddressOf _WaitFormClass.InitWork
|
||||
AddHandler FinalWork, AddressOf _WaitFormClass.Finalwork
|
||||
|
||||
If View.Id = "ProductsGant_DetailView" Then
|
||||
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", False)
|
||||
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
Dim _GanttContolViewItem As ViewItem = _DetailView.FindItem("G2antt")
|
||||
If _GanttContolViewItem IsNot Nothing Then
|
||||
AddHandler _GanttContolViewItem.ControlCreated, AddressOf GanttContolViewItem_ControlCreated
|
||||
AddHandler Frame.GetController(Of RefreshController).RefreshAction.Executing, AddressOf RefreshAction_Executing
|
||||
End If
|
||||
End If
|
||||
If View.Id = "ProductsGant_ProductsGantRows_ListView" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", False)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController)().Active.SetItemValue("", False)
|
||||
End If
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
|
||||
RemoveHandler DoWork, AddressOf _WaitFormClass.DoWork
|
||||
RemoveHandler InitWork, AddressOf _WaitFormClass.InitWork
|
||||
RemoveHandler FinalWork, AddressOf _WaitFormClass.Finalwork
|
||||
|
||||
If View.Id = "ProductsGant_DetailView" Then
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController).Active.SetItemValue("", True)
|
||||
End If
|
||||
|
||||
If View.Id = "ProductsGant_ProductsGantRows_ListView" Then
|
||||
Frame.GetController(Of DeleteObjectsViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of LinkUnlinkController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of NewObjectViewController)().Active.SetItemValue("", True)
|
||||
Frame.GetController(Of CloneObject.CloneObjectViewController)().Active.SetItemValue("", True)
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
Private Sub GanttContolViewItem_ControlCreated(sender As Object, e As EventArgs)
|
||||
Dim _ItemControl As Object = TryCast(sender, ViewItem).Control
|
||||
_GanttControl = TryCast(_ItemControl, G2anttUserControl).Exg2antt
|
||||
|
||||
AddHandler _GanttControl.EditCloseEvent, AddressOf _GanttControl_EditCloseEvent
|
||||
AddHandler _GanttControl.SelectionChanged, AddressOf _GanttControl_SelectionChanged
|
||||
|
||||
Frame.GetController(Of ProductsGant_VC).aProductsGant_Refresh.DoExecute()
|
||||
End Sub
|
||||
Private Sub aProductsGant_Refresh_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aProductsGant_Refresh.Execute
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _ProductsGant As ProductsGant = TryCast(View.SelectedObjects(0), ProductsGant)
|
||||
If _ProductsGant Is Nothing Then
|
||||
_ProductsGant = TryCast(TryCast(TryCast(View, ListView).CollectionSource, PropertyCollectionSource).MasterObject, ProductsGant)
|
||||
End If
|
||||
|
||||
Dim _ProductsGantRowsBar_Collection As New XPCollection(Of ProductsGantRowsBar)(_onew.Session, CriteriaOperator.Parse("BarType=3"))
|
||||
|
||||
If _ProductsGantRowsBar_Collection.Count > 0 Then
|
||||
For Each _ProductsGantRowsBar As ProductsGantRowsBar In _ProductsGantRowsBar_Collection
|
||||
With _ProductsGantRowsBar
|
||||
.FromDate = GetSQLTime(_onew.Session).Date
|
||||
If .ProductsGantRows.Products.CustomersOrderPriority.Count > 0 Then
|
||||
.ProductsGantRows.Products.CustomersOrderPriority.Sorting.Add(New SortProperty("RowIndex", DB.SortingDirection.Ascending))
|
||||
|
||||
.ToDate = .FromDate.AddDays(.ProductsGantRows.Products.CustomersOrderPriority(0).DeadlineWeek * 7)
|
||||
Else
|
||||
.ToDate = .FromDate
|
||||
End If
|
||||
End With
|
||||
|
||||
Next
|
||||
End If
|
||||
_ProductsGantRowsBar_Collection = New XPCollection(Of ProductsGantRowsBar)(_onew.Session, CriteriaOperator.Parse("BarType=0"))
|
||||
|
||||
If _ProductsGantRowsBar_Collection.Count > 0 Then
|
||||
For Each _ProductsGantRowsBar As ProductsGantRowsBar In _ProductsGantRowsBar_Collection
|
||||
With _ProductsGantRowsBar
|
||||
If _ProductsGantRowsBar.ProductsGantRows.ManualRotation > 0 Then
|
||||
.ToDate = .FromDate.AddDays(_ProductsGantRowsBar.ProductsGantRows.ManualRotation)
|
||||
ElseIf _ProductsGantRowsBar.ProductsGantRows.CalculatedRotation > 0 Then
|
||||
.ToDate = .FromDate.AddDays(_ProductsGantRowsBar.ProductsGantRows.CalculatedRotation)
|
||||
Else
|
||||
.ToDate = .FromDate.AddDays(1)
|
||||
|
||||
End If
|
||||
End With
|
||||
Next
|
||||
End If
|
||||
_onew.CommitChanges()
|
||||
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
Dim _ProductsGantRowsViewItem As ListPropertyEditor = _DetailView.FindItem("ProductsGantRows")
|
||||
Dim _IModelListView As IModelListView = Application.Model.Views.GetNode("ProductsGant_ProductsGantRows_ListView")
|
||||
If _GanttControl IsNot Nothing And _IModelListView IsNot Nothing Then
|
||||
|
||||
_GantChange = False
|
||||
|
||||
|
||||
AddHandler _GanttControl.Change, AddressOf GanttControl_Change
|
||||
AddHandler _GanttControl.LayoutChanged, AddressOf GanttControl_LayoutChanged
|
||||
|
||||
|
||||
With _GanttControl
|
||||
.BeginUpdate()
|
||||
.Columns.Clear()
|
||||
.DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exRowLines
|
||||
.LinesAtRoot = exontrol.EXG2ANTTLib.LinesAtRootEnum.exGroupLinesAtRoot
|
||||
.HasButtons = exontrol.EXG2ANTTLib.ExpandButtonEnum.exArrow
|
||||
.HasLines = HierarchyLineEnum.exSolidLine
|
||||
|
||||
With .Chart
|
||||
.MarkNowColor = Drawing.Color.Red
|
||||
.MarkNowWidth = 3
|
||||
.DrawGridLines = exontrol.EXG2ANTTLib.GridLinesEnum.exAllLines
|
||||
.FirstVisibleDate = GetSQLTime(_onew.Session).ToString("yyyy.MM.dd")
|
||||
.PaneWidthRight = 500
|
||||
.FirstWeekDay = 1
|
||||
.UnitWidth = 36
|
||||
.LevelCount = 2
|
||||
.get_Level(0).ToolTip = _GanttControl.Chart.get_Level(0).Label
|
||||
.get_Level(0).Unit = 256
|
||||
.get_Level(1).ToolTip = _GanttControl.Chart.get_Level(1).Label
|
||||
.OverviewVisible = exontrol.EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAll
|
||||
.AllowOverviewZoom = exontrol.EXG2ANTTLib.OverviewZoomEnum.exZoomOnRClick
|
||||
.AllowLinkBars = True
|
||||
.set_PaneWidth(True, 800)
|
||||
' .HistogramVisible = True
|
||||
'.HistogramHeight = 80
|
||||
'.OverviewZoomCaption = "Year|1/2Year|1/4Year|<img>3</img>Month|Third|<img>2</img>Week|<img>1</img>Day|Hour|Min|Sec"
|
||||
'.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exYear, "")
|
||||
'.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exHalfYear, "")
|
||||
'.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exQuarterYear, "")
|
||||
'.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exThirdMonth, "")
|
||||
'.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exHour, "")
|
||||
'.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exMinute, "")
|
||||
'.set_Label(exontrol.EXG2ANTTLib.UnitEnum.exSecond, "")
|
||||
'.OverviewZoomUnit = 64
|
||||
End With
|
||||
|
||||
'.SingleSel = False
|
||||
|
||||
With .Chart.Bars
|
||||
With .Copy("Task", "Accounted")
|
||||
.Color = Drawing.Color.Black
|
||||
.Shape = ShapeBarEnum.exShapeSolid
|
||||
.StartShape = ShapeCornerEnum.exShapeIconUp3
|
||||
.EndShape = ShapeCornerEnum.exShapeIconDown3
|
||||
.StartColor = Drawing.Color.LightYellow
|
||||
.EndColor = Drawing.Color.Yellow
|
||||
.Pattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow
|
||||
.Height = 18
|
||||
.HistogramPattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow
|
||||
.HistogramColor = Drawing.Color.Yellow
|
||||
.OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsStack
|
||||
End With
|
||||
With .Copy("Task", "Ordered")
|
||||
.Color = Drawing.Color.Black
|
||||
.Shape = ShapeBarEnum.exShapeSolid
|
||||
.StartColor = Drawing.Color.LightPink
|
||||
.EndColor = Drawing.Color.Pink
|
||||
.Pattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow
|
||||
.Height = 18
|
||||
.HistogramPattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow
|
||||
.HistogramColor = Drawing.Color.Pink
|
||||
.OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsStack
|
||||
End With
|
||||
With .Copy("Summary", "Reported")
|
||||
.Color = Drawing.Color.DarkGray
|
||||
.Shape = ShapeBarEnum.exShapeSolid
|
||||
.StartShape = ShapeCornerEnum.exShapeIconUp3
|
||||
.EndShape = ShapeCornerEnum.exShapeIconDown3
|
||||
.HistogramRulerLinesColor = Drawing.Color.Black
|
||||
.StartColor = Drawing.Color.DarkGreen
|
||||
.EndColor = Drawing.Color.LightGreen
|
||||
.Pattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow + PatternEnum.exPatternEmpty
|
||||
.Height = 18
|
||||
.HistogramPattern = PatternEnum.exPatternBox + PatternEnum.exPatternDot + PatternEnum.exPatternShadow + PatternEnum.exPatternEmpty
|
||||
.HistogramColor = Drawing.Color.Green
|
||||
.OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsStack
|
||||
End With
|
||||
With .Copy("Milestone", "OrderArrive")
|
||||
.StartShape = ShapeCornerEnum.exShapeIconVBar
|
||||
.StartColor = Drawing.Color.IndianRed
|
||||
.EndColor = Drawing.Color.DarkRed
|
||||
.Color = Drawing.Color.Black
|
||||
.Pattern = PatternEnum.exRectangularCurve + PatternEnum.exPatternDot + PatternEnum.exPatternShadow
|
||||
.Shape = ShapeBarEnum.exShapeSolidCenter
|
||||
.Height = 18
|
||||
.HistogramPattern = PatternEnum.exRectangularCurve + PatternEnum.exPatternDot + PatternEnum.exPatternShadow
|
||||
.HistogramColor = Drawing.Color.Red
|
||||
.OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsStack
|
||||
End With
|
||||
End With
|
||||
|
||||
For Each _Column In _IModelListView.Columns
|
||||
If _Column.Index <> -1 Then
|
||||
Dim _SISGantColumn As New SISGantColumn
|
||||
With _SISGantColumn
|
||||
.Caption = _Column.Caption
|
||||
.ColumnID = _Column.Id
|
||||
.Index = _Column.Index
|
||||
.Width = _Column.Width
|
||||
End With
|
||||
If _Column.GroupIndex = 0 Then
|
||||
_SISGantColumn.IsGroupColumn = True
|
||||
Else
|
||||
_SISGantColumn.IsGroupColumn = False
|
||||
End If
|
||||
|
||||
_GantItemColumn_Array.Add(_SISGantColumn)
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim _GroupColumn As SISGantColumn = Nothing
|
||||
|
||||
For Each _SISGantColumn As SISGantColumn In _GantItemColumn_Array
|
||||
If _SISGantColumn.IsGroupColumn Then
|
||||
_GroupColumn = _SISGantColumn
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim _GantColumnIndex As Integer = 0
|
||||
|
||||
.TreeColumnIndex = 1
|
||||
|
||||
.Columns.Add(_GantColumnIndex)
|
||||
.Columns(_GantColumnIndex).Caption = "ProductGandRowsOid"
|
||||
.Columns(_GantColumnIndex).Key = "ProductGandRowsOid"
|
||||
.Columns(_GantColumnIndex).Width = 100
|
||||
.Columns(_GantColumnIndex).Visible = False
|
||||
_ProductGandRowsOidindex = _GantColumnIndex
|
||||
_GantColumnIndex += 1
|
||||
|
||||
.Columns.Add(_GantColumnIndex)
|
||||
.Columns(_GantColumnIndex).Key = _GroupColumn.ColumnID
|
||||
.Columns(_GantColumnIndex).Caption = _GroupColumn.Caption
|
||||
.Columns(_GantColumnIndex).Width = _GroupColumn.Width
|
||||
_GroupColumn.GantColumnIndex = _GantColumnIndex
|
||||
_GantColumnIndex += 1
|
||||
|
||||
For _ik = 0 To _GantItemColumn_Array.Count
|
||||
For Each _SISGantColumn As SISGantColumn In _GantItemColumn_Array
|
||||
If Not _SISGantColumn.IsGroupColumn And _SISGantColumn.Index = _ik Then
|
||||
.Columns.Add(_GantColumnIndex)
|
||||
.Columns(_GantColumnIndex).Key = _SISGantColumn.ColumnID
|
||||
.Columns(_GantColumnIndex).Caption = _SISGantColumn.Caption
|
||||
.Columns(_GantColumnIndex).Width = _SISGantColumn.Width
|
||||
If _SISGantColumn.ColumnID <> "Customers" And _SISGantColumn.ColumnID <> "Products" Then
|
||||
.Columns(_GantColumnIndex).Editor.EditType = EditTypeEnum.EditType
|
||||
End If
|
||||
If _GroupColumn.ColumnID = "Customers" Or _GroupColumn.ColumnID = "Products" Then
|
||||
.Columns.Item(_GroupColumn.Caption).SortOrder = exontrol.EXG2ANTTLib.SortOrderEnum.SortAscending
|
||||
End If
|
||||
_SISGantColumn.GantColumnIndex = _GantColumnIndex
|
||||
|
||||
_GantColumnIndex += 1
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
|
||||
'Csoportsítás
|
||||
Dim _GroupObjects_Collection As New ArrayList
|
||||
If Not String.IsNullOrEmpty(_GroupColumn.ColumnID) Then
|
||||
Select Case _GroupColumn.ColumnID
|
||||
Case "Customers"
|
||||
For Each _ProductsGantRows As ProductsGantRows In _ProductsGant.ProductsGantRows
|
||||
If _GroupObjects_Collection.Count = 0 Then
|
||||
_GroupObjects_Collection.Add(_ProductsGantRows.Customers)
|
||||
Else
|
||||
Dim _Need As Boolean = True
|
||||
For Each _Customers As Customers In _GroupObjects_Collection
|
||||
If _ProductsGantRows.Customers.Oid = _Customers.Oid Then
|
||||
_Need = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If _Need Then _GroupObjects_Collection.Add(_ProductsGantRows.Customers)
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim _CustomerColumn As exontrol.EXG2ANTTLib.Column = Nothing
|
||||
For Each _G2Column As exontrol.EXG2ANTTLib.Column In _GanttControl.Columns
|
||||
If _G2Column.Key = _GroupColumn.ColumnID Then
|
||||
_CustomerColumn = _G2Column
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If _CustomerColumn IsNot Nothing Then
|
||||
For Each _Customers As Customers In _GroupObjects_Collection
|
||||
Dim _GroupItem As Long = _GanttControl.Items.AddItem()
|
||||
|
||||
_GanttControl.Items.set_CellValue(_GroupItem, _CustomerColumn.Index, "<b><fgcolor=0000FF>" + _Customers.FullName + "</fgcolor></b>")
|
||||
_GanttControl.Items.set_CellValueFormat(_GroupItem, _CustomerColumn.Index, ValueFormatEnum.exHTML)
|
||||
Dim _GroupCollectionElement_Collection As New XPCollection(Of ProductsGantRows)(_onew.Session, CriteriaOperator.Parse("Customers=? AND ProductsGant=?", _onew.GetObject(_Customers), _onew.GetObject(_ProductsGant)))
|
||||
|
||||
For Each _ProductsGantRows As ProductsGantRows In _GroupCollectionElement_Collection
|
||||
Dim _Item As Long = _GanttControl.Items.get_FindItem(_ProductsGantRows.Oid.ToString, 0)
|
||||
If _Item = 0 Then
|
||||
_Item = .Items.InsertItem(_GroupItem, "")
|
||||
.Items.set_ExpandItem(_Item, True)
|
||||
SetItemsAndItemData(_Item, _ProductsGantRows)
|
||||
End If
|
||||
Next
|
||||
_GanttControl.Items.set_ExpandItem(_GroupItem, True)
|
||||
Next
|
||||
End If
|
||||
Case "Products"
|
||||
For Each _ProductsGantRows As ProductsGantRows In _ProductsGant.ProductsGantRows
|
||||
If _GroupObjects_Collection.Count = 0 Then
|
||||
_GroupObjects_Collection.Add(_ProductsGantRows.Products)
|
||||
Else
|
||||
Dim _Need As Boolean = True
|
||||
For Each _Products As Products In _GroupObjects_Collection
|
||||
If _ProductsGantRows.Products.Oid = _Products.Oid Then
|
||||
_Need = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If _Need Then _GroupObjects_Collection.Add(_ProductsGantRows.Products)
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim _ProductsColumn As exontrol.EXG2ANTTLib.Column = Nothing
|
||||
For Each _G2Column As exontrol.EXG2ANTTLib.Column In _GanttControl.Columns
|
||||
If _G2Column.Key = _GroupColumn.ColumnID Then
|
||||
_ProductsColumn = _G2Column
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If _ProductsColumn IsNot Nothing Then
|
||||
For Each _Products As Products In _GroupObjects_Collection
|
||||
Dim _GroupItem As Long = _GanttControl.Items.AddItem()
|
||||
_GanttControl.Items.set_CellValue(_GroupItem, _ProductsColumn.Index, _Products.ShortName)
|
||||
|
||||
Dim _GroupCollectionElement_Collection As New XPCollection(Of ProductsGantRows)(_onew.Session, CriteriaOperator.Parse("Products=? AND ProductsGant=?", _onew.GetObject(_Products), _onew.GetObject(_ProductsGant)))
|
||||
|
||||
For Each _ProductsGantRows As ProductsGantRows In _GroupCollectionElement_Collection
|
||||
Dim _Item As Long = _GanttControl.Items.get_FindItem(_ProductsGantRows.Oid.ToString, 0)
|
||||
If _Item = 0 Then
|
||||
_Item = _GanttControl.Items.InsertItem(_GroupItem, "")
|
||||
|
||||
SetItemsAndItemData(_Item, _ProductsGantRows)
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
End If
|
||||
|
||||
End Select
|
||||
End If
|
||||
If Not String.IsNullOrEmpty(_FocusedItem) Then
|
||||
Dim _SelectedItem As Long = _GanttControl.Items.get_FindItem(_FocusedItem, 0)
|
||||
If _SelectedItem > 0 Then
|
||||
.Items.set_SelectItem(_SelectedItem, True)
|
||||
End If
|
||||
End If
|
||||
.EndUpdate()
|
||||
|
||||
_GantItemColumn_Array.Clear()
|
||||
_GantChange = True
|
||||
End With
|
||||
End If
|
||||
End Sub
|
||||
Private Sub SetItemBars(_item As Long, _ProductsGantRows As ProductsGantRows)
|
||||
For Each _ProductsGantRowsBar As ProductsGantRowsBar In _ProductsGantRows.ProductsGantRowsBar
|
||||
|
||||
|
||||
|
||||
|
||||
Next
|
||||
End Sub
|
||||
Private Sub aProductsGant_SetGantItemColumn_CustomizePopupWindowParams(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aProductsGant_SetGantItemColumn.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
|
||||
Dim _ProductsGant_SetGantItemColumn_PopUp_CollectionSource As New CollectionSource(_onew, GetType(ProductsGant_SetGantItemColumn_PopUp))
|
||||
Dim _IModelListView As IModelListView = Application.Model.Views.GetNode("ProductsGant_ProductsGantRows_ListView")
|
||||
|
||||
For Each _Column In _IModelListView.Columns
|
||||
Dim _ProductsGant_SetGantItemColumn_PopUp As New ProductsGant_SetGantItemColumn_PopUp(_onew.Session)
|
||||
With _ProductsGant_SetGantItemColumn_PopUp
|
||||
.ColumnCaption = _Column.Caption
|
||||
If _Column.Index <> -1 Then
|
||||
.IsVisable = True
|
||||
Else
|
||||
.IsVisable = False
|
||||
End If
|
||||
.Index = _Column.Index
|
||||
If _Column.GroupIndex <> -1 Then
|
||||
.IsGroupColumn = True
|
||||
Else
|
||||
.IsGroupColumn = False
|
||||
End If
|
||||
.Width = _Column.Width
|
||||
.GroupIndex = _Column.GroupIndex
|
||||
End With
|
||||
|
||||
_ProductsGant_SetGantItemColumn_PopUp_CollectionSource.Add(_ProductsGant_SetGantItemColumn_PopUp)
|
||||
Next
|
||||
|
||||
e.View = Application.CreateListView("ProductsGant_SetGantItemColumn_PopUp_ListView", _ProductsGant_SetGantItemColumn_PopUp_CollectionSource, False)
|
||||
End Sub
|
||||
Private Sub aProductsGant_SetGantItemColumn_Execute(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aProductsGant_SetGantItemColumn.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _IModelListView As IModelListView = Application.Model.Views.GetNode("ProductsGant_ProductsGantRows_ListView")
|
||||
|
||||
For Each _ProductsGant_SetGantItemColumn_PopUp As ProductsGant_SetGantItemColumn_PopUp In TryCast(e.PopupWindow.View, ListView).CollectionSource.Collection
|
||||
For Each _Column In _IModelListView.Columns
|
||||
If _Column.Caption = _ProductsGant_SetGantItemColumn_PopUp.ColumnCaption Then
|
||||
_Column.Index = _ProductsGant_SetGantItemColumn_PopUp.Index
|
||||
If _ProductsGant_SetGantItemColumn_PopUp.IsGroupColumn Then
|
||||
_Column.GroupIndex = _ProductsGant_SetGantItemColumn_PopUp.GroupIndex
|
||||
Else
|
||||
_Column.GroupIndex = -1
|
||||
End If
|
||||
_Column.Width = _ProductsGant_SetGantItemColumn_PopUp.Width
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
Application.SaveModelChanges()
|
||||
|
||||
_GanttControl.BeginUpdate()
|
||||
For Each _Column As exontrol.EXG2ANTTLib.Column In _GanttControl.Columns
|
||||
For Each _ColumnModel In _IModelListView.Columns
|
||||
If _ColumnModel.Caption = _Column.Caption Then
|
||||
_Column.Width = _ColumnModel.Width
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
_GanttControl.EndUpdate()
|
||||
|
||||
End Sub
|
||||
Private Sub _GanttControl_EditCloseEvent(sender As Object)
|
||||
Dim _Item As Long = _GanttControl.Items.get_SelectedItem(0)
|
||||
|
||||
Dim _Oid As String = _GanttControl.Items.get_CellValue(_GanttControl.Items.get_SelectedItem(0), 0)
|
||||
If String.IsNullOrEmpty(_Oid) Then
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
|
||||
Dim _ProductsGantRows As ProductsGantRows = _ocur.FindObject(Of ProductsGantRows)(CriteriaOperator.Parse("Oid=?", _Oid))
|
||||
|
||||
If _ProductsGantRows IsNot Nothing Then
|
||||
For Each _G2Column As exontrol.EXG2ANTTLib.Column In _GanttControl.Columns
|
||||
Select Case _G2Column.Key
|
||||
Case "ManualRotation"
|
||||
_ProductsGantRows.ManualRotation = _GanttControl.Items.get_CellValue(_GanttControl.Items.get_SelectedItem(0), _G2Column.Index)
|
||||
Case "CalculatedRotation"
|
||||
_ProductsGantRows.CalculatedRotation = _GanttControl.Items.get_CellValue(_GanttControl.Items.get_SelectedItem(0), _G2Column.Index)
|
||||
End Select
|
||||
Next
|
||||
|
||||
End If
|
||||
_ocur.CommitChanges()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub aProductsGant_CreateCustomersReport_CustomizePopupWindowParams1(sender As Object, e As CustomizePopupWindowParamsEventArgs) Handles aProductsGant_CreateCustomersReport.CustomizePopupWindowParams
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _ReportDate As Date = GetSQLTime(_onew.Session).Date
|
||||
Dim _ProductsGantRows_Oid As String = _GanttControl.Items.get_CellValue(_GanttControl.Items.get_SelectedItem(0), 0)
|
||||
If String.IsNullOrEmpty(_ProductsGantRows_Oid) Then
|
||||
MsgBox("Nincs kiválasztva egyetlen sor sem, nem lehet azonosítani az Ügyfelet!", MsgBoxStyle.OkOnly, "Hiba!")
|
||||
Exit Sub
|
||||
End If
|
||||
Dim _ProductsGantRows_Selected As ProductsGantRows = _onew.FindObject(Of ProductsGantRows)(CriteriaOperator.Parse("Oid=?", _ProductsGantRows_Oid))
|
||||
|
||||
Dim _ProductsGantCustomersReport_CollectionSource As New CollectionSource(_onew, GetType(ProductsGantCustomersReport))
|
||||
_ProductsGantCustomersReport_CollectionSource.BeginUpdateCriteria()
|
||||
_ProductsGantCustomersReport_CollectionSource.Criteria.Clear()
|
||||
_ProductsGantCustomersReport_CollectionSource.Criteria("First") = CriteriaOperator.Parse("GetDate(DateExecution)=? AND Customers.Oid=?", _ReportDate.Date, _ProductsGantRows_Selected.Customers.Oid)
|
||||
_ProductsGantCustomersReport_CollectionSource.EndUpdateCriteria()
|
||||
|
||||
If _GanttControl.Items.get_SelectedItem(0) > 0 Then
|
||||
Dim _ProductsGantRows_Collection As New XPCollection(Of ProductsGantRows)(_onew.Session, CriteriaOperator.Parse("Customers=?", _ProductsGantRows_Selected.Customers))
|
||||
|
||||
If _ProductsGantRows_Collection.Count > 0 Then
|
||||
For Each _ProductsGantRows As ProductsGantRows In _ProductsGantRows_Collection
|
||||
Dim _ProductsGantCustomersReport As New ProductsGantCustomersReport(_onew.Session)
|
||||
With _ProductsGantCustomersReport
|
||||
.Customers = _ProductsGantRows_Selected.Customers
|
||||
.Products = _ProductsGantRows.Products
|
||||
.QTT = 0
|
||||
.DateExecution = _ReportDate
|
||||
End With
|
||||
|
||||
_ProductsGantCustomersReport_CollectionSource.Add(_ProductsGantCustomersReport)
|
||||
Next
|
||||
End If
|
||||
|
||||
End If
|
||||
e.View = Application.CreateListView("ProductsGantCustomersReport_ListView_PopUp", _ProductsGantCustomersReport_CollectionSource, False)
|
||||
End Sub
|
||||
Private Sub aProductsGant_CreateCustomersReport_Execute_1(sender As Object, e As PopupWindowShowActionExecuteEventArgs) Handles aProductsGant_CreateCustomersReport.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _ProductsGant As ProductsGant = TryCast(View.SelectedObjects(0), ProductsGant)
|
||||
Dim _Customers As Customers = Nothing
|
||||
Dim _Products As Products = Nothing
|
||||
Dim _QTT As Double = 0
|
||||
Dim _DateExecution As Date = Date.MinValue
|
||||
|
||||
|
||||
For Each _ProductsGantCustomersReport As ProductsGantCustomersReport In TryCast(e.PopupWindow.View, ListView).CollectionSource.Collection
|
||||
|
||||
If _ProductsGantCustomersReport.QTT > 0 Then
|
||||
|
||||
Dim _ProductsGantCustomersReport_New As ProductsGantCustomersReport = _ocur.FindObject(Of ProductsGantCustomersReport)(CriteriaOperator.Parse("Customers=? AND Products=? AND DateExecution=?", _
|
||||
_ocur.GetObject(_ProductsGantCustomersReport.Customers), _
|
||||
_ocur.GetObject(_ProductsGantCustomersReport.Products), _
|
||||
_ProductsGantCustomersReport.DateExecution))
|
||||
If _ProductsGantCustomersReport_New Is Nothing Then
|
||||
_ProductsGantCustomersReport_New = New ProductsGantCustomersReport(_ocur.Session)
|
||||
_ProductsGantCustomersReport_New.Customers = _ocur.GetObject(_ProductsGantCustomersReport.Customers)
|
||||
_ProductsGantCustomersReport_New.Products = _ocur.GetObject(_ProductsGantCustomersReport.Products)
|
||||
_ProductsGantCustomersReport_New.QTT = _ocur.GetObject(_ProductsGantCustomersReport.QTT)
|
||||
_ProductsGantCustomersReport_New.DateExecution = _ocur.GetObject(_ProductsGantCustomersReport.DateExecution)
|
||||
End If
|
||||
|
||||
|
||||
Dim _ProductsGantRows As ProductsGantRows = _ocur.FindObject(Of ProductsGantRows)(CriteriaOperator.Parse("ProductsGant=? AND Customers.Oid=? AND Products.Oid=?", _
|
||||
_ProductsGant, _ProductsGantCustomersReport_New.Customers.Oid, _ProductsGantCustomersReport_New.Products.Oid))
|
||||
If _ProductsGantRows IsNot Nothing Then
|
||||
Dim _ProductsGantRowsBar As ProductsGantRowsBar = _ocur.FindObject(Of ProductsGantRowsBar) _
|
||||
(CriteriaOperator.Parse("ProductsGantRows.Oid=? AND GetDate(FromDate)=? AND BarType=2", _
|
||||
_ProductsGantRows.Oid, _ProductsGantCustomersReport.DateExecution.Date))
|
||||
If _ProductsGantRowsBar Is Nothing Then
|
||||
_ProductsGantRowsBar = New ProductsGantRowsBar(_ocur.Session)
|
||||
With _ProductsGantRowsBar
|
||||
.ProductsGantRows = _ProductsGantRows
|
||||
.FromDate = _ProductsGantCustomersReport.DateExecution
|
||||
If _ProductsGantRowsBar.ProductsGantRows.Products.CustomersOrderPriority.Count > 0 Then
|
||||
.ProductsGantRows.Products.CustomersOrderPriority.Sorting.Add(New SortProperty("RowIndex", DB.SortingDirection.Ascending))
|
||||
.ToDate = .FromDate.AddDays(.ProductsGantRows.Products.CustomersOrderPriority(0).DeadlineWeek * 7)
|
||||
Else
|
||||
If _ProductsGantRowsBar.ProductsGantRows.CalculatedRotation > 0 Then
|
||||
.ToDate = .FromDate.AddDays(.ProductsGantRows.CalculatedRotation)
|
||||
ElseIf _ProductsGantRowsBar.ProductsGantRows.ManualRotation > 0 Then
|
||||
.ToDate = .FromDate.AddDays(.ProductsGantRows.ManualRotation)
|
||||
Else
|
||||
.ToDate = .FromDate.AddDays(1) 'temp
|
||||
End If
|
||||
End If
|
||||
.BarType = eBarType.eReported
|
||||
.Caption = _ProductsGantCustomersReport_New.QTT.ToString
|
||||
End With
|
||||
Else
|
||||
With _ProductsGantRowsBar
|
||||
.FromDate = _ProductsGantCustomersReport.DateExecution
|
||||
If _ProductsGantRowsBar.ProductsGantRows.Products.CustomersOrderPriority.Count > 0 Then
|
||||
.ProductsGantRows.Products.CustomersOrderPriority.Sorting.Add(New SortProperty("RowIndex", DB.SortingDirection.Ascending))
|
||||
.ToDate = .FromDate.AddDays(.ProductsGantRows.Products.CustomersOrderPriority(0).DeadlineWeek * 7)
|
||||
Else
|
||||
If _ProductsGantRowsBar.ProductsGantRows.CalculatedRotation > 0 Then
|
||||
.ToDate = .FromDate.AddDays(.ProductsGantRows.CalculatedRotation)
|
||||
ElseIf _ProductsGantRowsBar.ProductsGantRows.ManualRotation > 0 Then
|
||||
.ToDate = .FromDate.AddDays(.ProductsGantRows.ManualRotation)
|
||||
Else
|
||||
.ToDate = .FromDate.AddDays(1) 'temp
|
||||
End If
|
||||
End If
|
||||
.Caption = _ProductsGantCustomersReport_New.QTT.ToString
|
||||
End With
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
|
||||
Dim _ProductsGantCustomersReport_DEL_Collection As New XPCollection(Of ProductsGantCustomersReport)(_ocur.Session, CriteriaOperator.Parse("QTT='0'"))
|
||||
If _ProductsGantCustomersReport_DEL_Collection.Count > 0 Then
|
||||
_ocur.Delete(_ProductsGantCustomersReport_DEL_Collection)
|
||||
_ocur.CommitChanges()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub aProductsGant_OpenProducts_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aProductsGant_OpenProducts.Execute
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
|
||||
Dim _ProductsGant As ProductsGant = TryCast(View.SelectedObjects(0), ProductsGant)
|
||||
|
||||
If _GanttControl.Items.get_SelectedItem(0) > 0 Then
|
||||
|
||||
Dim _ProductsGantRows_Oid As String = _GanttControl.Items.get_CellValue(_GanttControl.Items.get_SelectedItem(0), 0)
|
||||
Dim _ProductsGantRows As ProductsGantRows = _onew.FindObject(Of ProductsGantRows)(CriteriaOperator.Parse("Oid=?", _ProductsGantRows_Oid))
|
||||
If _ProductsGantRows IsNot Nothing Then
|
||||
e.ShowViewParameters.CreatedView = Application.CreateDetailView(_onew, "Products_DetailView", True, _ProductsGantRows.Products)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub GanttControl_Change(sender As Object, Item As Integer, ColIndex As Integer, ByRef NewValue As Object)
|
||||
If _GantChange Then
|
||||
Dim _onew As Xpo.XPObjectSpace = Application.CreateObjectSpace
|
||||
Dim _IModelListView As IModelListView = Application.Model.Views.GetNode("ProductsGant_ProductsGantRows_ListView")
|
||||
If _GanttControl IsNot Nothing And _IModelListView IsNot Nothing Then
|
||||
|
||||
Dim _ProductsGant As ProductsGant = TryCast(View.SelectedObjects(0), ProductsGant)
|
||||
Dim _ProductsGantRows_Oid As String = _GanttControl.Items.get_CellValue(Item, 0)
|
||||
Dim _ProductsGantRows As ProductsGantRows = _onew.FindObject(Of ProductsGantRows)(CriteriaOperator.Parse("Oid=?", _ProductsGantRows_Oid))
|
||||
Dim _ColumnID As String = ""
|
||||
If _ProductsGantRows IsNot Nothing Then
|
||||
|
||||
For Each _Column In _IModelListView.Columns
|
||||
If _Column.Caption = _GanttControl.Columns(ColIndex).Caption Then
|
||||
_ColumnID = _Column.Id
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not String.IsNullOrEmpty(_ColumnID) Then
|
||||
Select Case _ColumnID
|
||||
Case "CalculatedRotation"
|
||||
_ProductsGantRows.CalculatedRotation = CType(NewValue, Double)
|
||||
Case "ManualRotation"
|
||||
_ProductsGantRows.ManualRotation = CType(NewValue, Double)
|
||||
End Select
|
||||
|
||||
_onew.CommitChanges()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Private Sub RefreshAction_Executing(sender As Object, e As CancelEventArgs)
|
||||
If _GanttControl IsNot Nothing Then
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
With _GanttControl
|
||||
.BeginUpdate()
|
||||
.Chart.FirstVisibleDate = GetSQLTime(_ocur.Session).ToString("yyyy.MM.dd")
|
||||
.EndUpdate()
|
||||
End With
|
||||
End If
|
||||
End Sub
|
||||
Private Sub GanttControl_LayoutChanged(sender As Object)
|
||||
If _GantChange Then
|
||||
Dim _DetailView As DetailView = TryCast(View, DetailView)
|
||||
Dim _ProductsGantRowsViewItem As ListPropertyEditor = _DetailView.FindItem("ProductsGantRows")
|
||||
Dim _IModelListView As IModelListView = Application.Model.Views.GetNode("ProductsGant_ProductsGantRows_ListView")
|
||||
For Each _Column In _IModelListView.Columns
|
||||
For Each _G2Column As exontrol.EXG2ANTTLib.Column In _GanttControl.Columns
|
||||
If _Column.Id = _G2Column.Key Then
|
||||
_Column.Width = _G2Column.Width
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
Application.SaveModelChanges()
|
||||
End If
|
||||
End Sub
|
||||
Private Sub SetItemsAndItemData(_Item As Long, _ProductsGantRows As ProductsGantRows)
|
||||
For Each _G2Column As exontrol.EXG2ANTTLib.Column In _GanttControl.Columns
|
||||
Select Case _G2Column.Key
|
||||
Case "ProductGandRowsOid"
|
||||
_GanttControl.Items.set_CellValue(_Item, _G2Column.Index, _ProductsGantRows.Oid.ToString)
|
||||
Case "Customers"
|
||||
_GanttControl.Items.set_CellValue(_Item, _G2Column.Index, _ProductsGantRows.Customers.FullName)
|
||||
Case "Products"
|
||||
_GanttControl.Items.set_CellValue(_Item, _G2Column.Index, _ProductsGantRows.Products.ShortName)
|
||||
Case "CalculatedRotation"
|
||||
_GanttControl.Items.set_CellValue(_Item, _G2Column.Index, _ProductsGantRows.CalculatedRotation)
|
||||
Case "ManualRotation"
|
||||
_GanttControl.Items.set_CellValue(_Item, _G2Column.Index, _ProductsGantRows.ManualRotation)
|
||||
End Select
|
||||
|
||||
Next
|
||||
|
||||
For Each _ProductsGantRowsBar As ProductsGantRowsBar In _ProductsGantRows.ProductsGantRowsBar
|
||||
Dim _Key As String = Guid.NewGuid.ToString
|
||||
Select Case _ProductsGantRowsBar.BarType
|
||||
Case eBarType.eAccounted
|
||||
_GanttControl.Items.AddBar(CInt(_Item), "Accounted", _ProductsGantRowsBar.FromDate, _ProductsGantRowsBar.ToDate, _Key, _ProductsGantRowsBar.Caption)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMove, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanStartLink, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanBeLinked, False)
|
||||
Case eBarType.eOrdered
|
||||
_GanttControl.Items.AddBar(CInt(_Item), "Ordered", _ProductsGantRowsBar.FromDate, _ProductsGantRowsBar.ToDate, _Key, _ProductsGantRowsBar.Caption)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMove, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanStartLink, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanBeLinked, False)
|
||||
Case eBarType.eReported
|
||||
_GanttControl.Items.AddBar(CInt(_Item), "Reported", _ProductsGantRowsBar.FromDate, _ProductsGantRowsBar.ToDate, _Key, _ProductsGantRowsBar.Caption)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMove, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanStartLink, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanBeLinked, False)
|
||||
Case eBarType.eOrderArrive
|
||||
_GanttControl.Items.AddBar(CInt(_Item), "OrderArrive", _ProductsGantRowsBar.ToDate, _ProductsGantRowsBar.ToDate, _Key, _ProductsGantRowsBar.Caption)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanResize, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanMove, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanStartLink, False)
|
||||
_GanttControl.Items.set_ItemBar(CInt(_Item), _Key, exontrol.EXG2ANTTLib.ItemBarPropertyEnum.exBarCanBeLinked, False)
|
||||
End Select
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub _GanttControl_SelectionChanged(sender As Object)
|
||||
_FocusedItem = _GanttControl.Items.get_CellValue(_GanttControl.Items.FocusItem, 0).ToString
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,32 @@
|
||||
Partial Class Products_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()
|
||||
components = New System.ComponentModel.Container()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -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
|
||||
|
||||
Public Class Products_VC
|
||||
Inherits Nuvolar.Module.ProductsVC
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Overrides Sub OnActivated()
|
||||
MyBase.OnActivated()
|
||||
AddHandler DoWork, AddressOf _WaitFormClass.DoWork
|
||||
AddHandler InitWork, AddressOf _WaitFormClass.Initwork
|
||||
AddHandler FinalWork, AddressOf _WaitFormClass.Finalwork
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
RemoveHandler DoWork, AddressOf _WaitFormClass.DoWork
|
||||
RemoveHandler InitWork, AddressOf _WaitFormClass.Initwork
|
||||
RemoveHandler FinalWork, AddressOf _WaitFormClass.Finalwork
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user