First create solution
This commit is contained in:
+50
@@ -0,0 +1,50 @@
|
||||
Partial Class GIROInfo_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.aGIROInfo_ImportXLS = New DevExpress.ExpressApp.Actions.SimpleAction(Me.components)
|
||||
'
|
||||
'aGIROInfo_ImportXLS
|
||||
'
|
||||
Me.aGIROInfo_ImportXLS.Caption = "aGIROInfo_ImportXLS"
|
||||
Me.aGIROInfo_ImportXLS.ConfirmationMessage = Nothing
|
||||
Me.aGIROInfo_ImportXLS.Id = "aGIROInfo_ImportXLS"
|
||||
Me.aGIROInfo_ImportXLS.ImageName = Nothing
|
||||
Me.aGIROInfo_ImportXLS.Shortcut = Nothing
|
||||
Me.aGIROInfo_ImportXLS.Tag = Nothing
|
||||
Me.aGIROInfo_ImportXLS.TargetObjectsCriteria = Nothing
|
||||
Me.aGIROInfo_ImportXLS.TargetObjectType = GetType(Nuvolar.[Module].GIROInfo)
|
||||
Me.aGIROInfo_ImportXLS.TargetViewId = Nothing
|
||||
Me.aGIROInfo_ImportXLS.TargetViewType = DevExpress.ExpressApp.ViewType.ListView
|
||||
Me.aGIROInfo_ImportXLS.ToolTip = Nothing
|
||||
Me.aGIROInfo_ImportXLS.TypeOfView = GetType(DevExpress.ExpressApp.ListView)
|
||||
|
||||
End Sub
|
||||
Friend WithEvents aGIROInfo_ImportXLS As DevExpress.ExpressApp.Actions.SimpleAction
|
||||
|
||||
End Class
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="aGIROInfo_ImportXLS.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>
|
||||
+98
@@ -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 System.Windows.Forms
|
||||
Imports System.Data.OleDb
|
||||
|
||||
Public Class GIROInfo_VC
|
||||
Inherits DevExpress.ExpressApp.ViewController
|
||||
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
|
||||
Public Sub New()
|
||||
MyBase.New()
|
||||
InitializeComponent()
|
||||
RegisterActions(components)
|
||||
End Sub
|
||||
|
||||
Private Sub aGIROInfo_ImportXLS_Execute(sender As Object, e As SimpleActionExecuteEventArgs) Handles aGIROInfo_ImportXLS.Execute
|
||||
Dim _ocur As Xpo.XPObjectSpace = TryCast(View.ObjectSpace, Xpo.XPObjectSpace)
|
||||
Dim _cs As String = ""
|
||||
Dim _GIROID_Array As New ArrayList
|
||||
Dim _ShortName_Array As New ArrayList
|
||||
Dim _ZIPCode_Array As New ArrayList
|
||||
Dim _Address_Array As New ArrayList
|
||||
|
||||
Dim _OpenFileDialog As New OpenFileDialog
|
||||
_OpenFileDialog.Filter = "xls Files (.xls)|*.xls|xlsx Files (.xlsx)|*.xlsx|All Files (*.*)|*.*"
|
||||
_OpenFileDialog.FilterIndex = 1
|
||||
If _OpenFileDialog.ShowDialog() = Windows.Forms.DialogResult.OK And (Not String.IsNullOrEmpty(_OpenFileDialog.FileName)) Then
|
||||
Dim _xlsFile As String = _OpenFileDialog.FileName
|
||||
_cs = "Provider=Microsoft.ACE.OLEDB.12.0;"
|
||||
_cs += "Data Source=" & _xlsFile.ToString & ";"
|
||||
_cs += "Extended Properties=""Excel 12.0 Xml;HDR=YES;"""
|
||||
Dim conn As New OleDbConnection(_cs)
|
||||
Dim cmd As New OleDbCommand
|
||||
Dim dr As OleDbDataReader
|
||||
Dim mSQL As String
|
||||
Dim _UpdatedCount As Long = 0
|
||||
|
||||
Try
|
||||
mSQL = "select * from [" + IO.Path.GetFileNameWithoutExtension(_xlsFile) + "$]" '[Munka1$]"
|
||||
cmd.CommandTimeout = 60
|
||||
cmd.Connection = conn
|
||||
cmd.CommandType = CommandType.Text
|
||||
cmd.CommandText = mSQL
|
||||
conn.Open()
|
||||
|
||||
If conn.State = ConnectionState.Open Then
|
||||
dr = cmd.ExecuteReader(CommandBehavior.SingleResult)
|
||||
|
||||
While dr.Read
|
||||
If Not String.IsNullOrEmpty(dr(0).ToString) Then
|
||||
|
||||
_GIROID_Array.Add(dr(0).ToString) 'ID
|
||||
_ShortName_Array.Add(dr(1).ToString) 'shortname
|
||||
_ZIPCode_Array.Add(dr(2).ToString) 'zipcode
|
||||
_Address_Array.Add(dr(3).ToString) 'adddress
|
||||
End If
|
||||
End While
|
||||
|
||||
dr.Close()
|
||||
End If
|
||||
conn.Close()
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message)
|
||||
conn.Close()
|
||||
End Try
|
||||
End If
|
||||
_WaitFormClass.InitWork(1, 1, _GIROID_Array.Count)
|
||||
Dim _ActIndex As Long = 0
|
||||
For Each _ID As String In _GIROID_Array
|
||||
_WaitFormClass.DoWork
|
||||
Dim _GIROInfo As GIROInfo = _ocur.FindObject(Of GIROInfo)(DevExpress.Data.Filtering.CriteriaOperator.Parse("GIROID=?", _GIROID_Array(_ActIndex)))
|
||||
If _GIROInfo Is Nothing Then
|
||||
_GIROInfo = New GIROInfo(_ocur.Session)
|
||||
With _GIROInfo
|
||||
_GIROInfo.GIROID = _GIROID_Array(_ActIndex)
|
||||
_GIROInfo.ShortName = _ShortName_Array(_ActIndex)
|
||||
_GIROInfo.Address = _ZIPCode_Array(_ActIndex) + " " + _Address_Array(_ActIndex)
|
||||
End With
|
||||
Else
|
||||
With _GIROInfo
|
||||
_GIROInfo.ShortName = _ShortName_Array(_ActIndex)
|
||||
_GIROInfo.Address = _ZIPCode_Array(_ActIndex) + " " + _Address_Array(_ActIndex)
|
||||
End With
|
||||
End If
|
||||
_ActIndex += 1
|
||||
Next
|
||||
_ocur.CommitChanges()
|
||||
_Waitformclass.FinalWork
|
||||
End Sub
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class LiquidAssetsBallanceVC
|
||||
|
||||
<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
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
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.SystemModule
|
||||
|
||||
Public Class LiquidAssetsBallanceVC
|
||||
Inherits Nuvolar.Module.LiquidAssetsBallanceVC
|
||||
Private worker As WinModificationsController
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
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 = "LiquidAssetsBallanceHeader_DetailView_Cassa" Then
|
||||
worker = Frame.GetController(Of WinModificationsController)()
|
||||
worker.ModificationsHandlingMode = SystemModule.ModificationsHandlingMode.Confirmation
|
||||
End If
|
||||
AddHandler DoWork, AddressOf _WaitFormClass.DoWork
|
||||
AddHandler InitWork, AddressOf _WaitFormClass.Initwork
|
||||
AddHandler FinalWork, AddressOf _WaitFormClass.Finalwork
|
||||
End Sub
|
||||
Protected Overrides Sub OnDeactivated()
|
||||
MyBase.OnDeactivated()
|
||||
If View.Id = "LiquidAssetsBallanceHeader_DetailView_Cassa" Then
|
||||
worker = Frame.GetController(Of WinModificationsController)()
|
||||
worker.ModificationsHandlingMode = SystemModule.ModificationsHandlingMode.AutoCommit
|
||||
End If
|
||||
RemoveHandler DoWork, AddressOf _WaitFormClass.DoWork
|
||||
RemoveHandler InitWork, AddressOf _WaitFormClass.Initwork
|
||||
RemoveHandler FinalWork, AddressOf _WaitFormClass.Finalwork
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
Partial Class LiquidAssetsReturnVC
|
||||
|
||||
<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
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
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
|
||||
|
||||
Public Class LiquidAssetsReturnVC
|
||||
Inherits Nuvolar.Module.LiquidAssetsReturnVC
|
||||
Dim _WaitFormClass As New WaitFormClass
|
||||
Private _GridListEditor As GridListEditor
|
||||
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
|
||||
|
||||
Protected Overrides Sub OnViewControlsCreated()
|
||||
MyBase.OnViewControlsCreated()
|
||||
'If View.Id = "LiquidAssetsReturnHeader_LiquidAssetsReturnDenomination_ListView" Then
|
||||
' Dim _ListView As ListView = CType(View, ListView)
|
||||
' Dim _PropertyCollectionSource As PropertyCollectionSource = CType(_ListView.CollectionSource, PropertyCollectionSource)
|
||||
|
||||
' _GridListEditor = TryCast(_ListView.Editor, GridListEditor)
|
||||
' If _GridListEditor IsNot Nothing Then
|
||||
' _GridListEditor.AllowEdit = True
|
||||
' For i As Integer = 0 To _GridListEditor.Columns.Count - 1
|
||||
' If _GridListEditor.GridView.Columns(i).FieldName <> "DenominationValue" Then
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.ReadOnly = True
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.AllowEdit = False
|
||||
' _GridListEditor.GridView.Columns(i).OptionsColumn.TabStop = False
|
||||
' End If
|
||||
' Next i
|
||||
' End If
|
||||
' End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user