﻿<?xml version="1.0" encoding="utf-16"?>
<JiwaDocument xmlns:jiwa="http://www.jiwa.com.au/xml/schemas" Type="JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin">
  <RecID>9297be1c-7a05-4acb-8ecd-ede2ee7275bf</RecID>
  <Name>Inventory Import Spreadsheet</Name>
  <IsEnabled>false</IsEnabled>
  <IsIsolatedToOwnAppDomain>false</IsIsolatedToOwnAppDomain>
  <ExecutionOrder>8001</ExecutionOrder>
  <Author>Eluminati</Author>
  <Version>19.06.14.1900</Version>
  <Code>Option Infer On
Option Explicit On
Option Strict On
Option Compare Binary
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.SqlTypes
Imports System.Diagnostics
Imports System.Globalization
Imports System.Linq
Imports System.Windows.Forms

Imports FarPoint.Excel
Imports FarPoint.Win.Spread
Imports FarPoint.Win.Spread.CellType
Imports FarPoint.Win.Spread.Model

Imports JiwaFinancials.Jiwa
Imports JiwaFinancials.Jiwa.JiwaApplication.Controls
Imports JiwaFinancials.Jiwa.JiwaApplication.JiwaManageGrid
Imports JiwaFinancials.Jiwa.JiwaInventory

Imports Microsoft.VisualBasic

Namespace Eluminati.UI.Inventory.Import

    Public Class InventoryImport

        Private Enum ColumnType
            Text
            Lookup
            DropDown
            List
            [Date]
            Currency
            Whole
            Float
            LargeText
        End Enum

        Private Property ImportColumnList As List(Of ImportColumn) = New List(Of ImportColumn) From {
                     New ImportColumn(ColumnType.Text, "PARTNO", "PartNo", "Part no", ""),
                     New ImportColumn(ColumnType.Text, "DESCRIPTION", "Description", "Description", ""),
                     New ImportColumn(ColumnType.Currency, "RRP", "RRP", "Retail price", ""),
                     New ImportColumn(ColumnType.Currency, "DEFAULTPRICE", "DefaultPrice", "Default price", ""),
                     New ImportColumn(ColumnType.Lookup, "SUPPLIER", "Supplier", "Default Supplier", ""),
                     New ImportColumn(ColumnType.Text, "SUPPLIERPARTNO", "SupplierPartNo", "Supplier part no", ""),
                     New ImportColumn(ColumnType.Currency, "SUPPLIERCOST", "SupplierCost", "Supplier currency cost", ""),
                     New ImportColumn(ColumnType.Currency, "HOMECOST", "HomeCost", "Local currency cost", ""),
                     New ImportColumn(ColumnType.DropDown, "CLASSIFICATION", "Classification", "Classification", "SELECT DISTINCT InventoryClassificationID, Description FROM IN_Classification ORDER BY Description;"),
                     New ImportColumn(ColumnType.DropDown, "CATEGORY1", "Category1", "Maintenance", "SELECT DISTINCT Category1ID, Description FROM IN_Category1 ORDER BY Description;"),
                     New ImportColumn(ColumnType.DropDown, "CATEGORY2", "Category2", "CPU", "SELECT DISTINCT Category2ID, Description FROM IN_Category2 ORDER BY Description;"),
                     New ImportColumn(ColumnType.Lookup, "CATEGORY3", "Category3", "Publisher", "SELECT DISTINCT Category3ID, Description FROM IN_Category3 ORDER BY Description;"),
                     New ImportColumn(ColumnType.DropDown, "CATEGORY4", "Category4", "Product type", "SELECT DISTINCT Category4ID, Description FROM IN_Category4 ORDER BY Description;"),
                     New ImportColumn(ColumnType.DropDown, "CATEGORY5", "Category5", "Media", "SELECT DISTINCT Category5ID, Description FROM IN_Category5 ORDER BY Description;"),
                     New ImportColumn(ColumnType.Text, "AUX1", "Aux1", "Vendor Part No", ""),
                     New ImportColumn(ColumnType.Text, "AUX2", "Aux2", "Renewal Part No", ""),
                     New ImportColumn(ColumnType.Text, "AUX3", "Aux3", "Details", ""),
                     New ImportColumn(ColumnType.Text, "PREREQUISITES", "Prerequisite", "Prerequisites", ""),
                     New ImportColumn(ColumnType.List, "STATUS", "Status", "Status", "Active,Discontinued,Deleted,Slow,Obsolete"),
                     New ImportColumn(ColumnType.Whole, "DELIVERYDAYS", "DeliveryDays", "Delivery Days", ""),
                     New ImportColumn(ColumnType.Text, "RESULT", "Result", "Import Result", ""),
                     New ImportColumn(ColumnType.LargeText, "XML", "XmlInput", "XML Input", "")
               }


        Private Function GetInventoryXml(item As NewInventoryItem) As System.Xml.Linq.XElement
            Return &lt;JiwaDocument
                       xmlns:inv="JiwaFinancials.Jiwa.JiwaInventory.XML"
                       xmlns:inv2="JiwaFinancials.Jiwa.JiwaApplication.Entities.Inventory"
                       xmlns:crd="JiwaFinancials.Jiwa.JiwaApplication.Entities.Creditor"
                       xmlns:jiwa="http://www.jiwa.com.au/xml/schemas"
                       Type="JiwaFinancials.Jiwa.JiwaInventory.Inventory"&gt;
                       &lt;inv:PartNo&gt;&lt;%= item.PartNo %&gt;&lt;/inv:PartNo&gt;
                       &lt;inv:Description&gt;&lt;%= item.Description %&gt;&lt;/inv:Description&gt;
                       &lt;inv:UnitMeasure&gt;Each&lt;/inv:UnitMeasure&gt;
                       &lt;inv:PhysicalItem&gt;true&lt;/inv:PhysicalItem&gt;
                       &lt;inv:Category1&gt;
                           &lt;inv2:RecID&gt;&lt;%= GetDropDownValue("CATEGORY1", item.Category1) %&gt;&lt;/inv2:RecID&gt;
                       &lt;/inv:Category1&gt;
                       &lt;inv:Category2&gt;
                           &lt;inv2:RecID&gt;&lt;%= GetDropDownValue("CATEGORY2", item.Category2) %&gt;&lt;/inv2:RecID&gt;
                       &lt;/inv:Category2&gt;
                       &lt;inv:Category3&gt;
                           &lt;inv2:RecID&gt;&lt;%= GetDropDownValue("CATEGORY3", item.Category3) %&gt;&lt;/inv2:RecID&gt;
                       &lt;/inv:Category3&gt;
                       &lt;inv:Category4&gt;
                           &lt;inv2:RecID&gt;&lt;%= GetDropDownValue("CATEGORY4", item.Category4) %&gt;&lt;/inv2:RecID&gt;
                       &lt;/inv:Category4&gt;
                       &lt;inv:Category5&gt;
                           &lt;inv2:RecID&gt;&lt;%= GetDropDownValue("CATEGORY5", item.Category5) %&gt;&lt;/inv2:RecID&gt;
                       &lt;/inv:Category5&gt;
                       &lt;inv:Classification&gt;
                           &lt;inv2:RecID&gt;&lt;%= GetDropDownValue("CLASSIFICATION", item.Classification) %&gt;&lt;/inv2:RecID&gt;
                       &lt;/inv:Classification&gt;
                       &lt;inv:Status&gt;e_InventoryStatus&lt;%= item.Status %&gt;&lt;/inv:Status&gt;
                       &lt;inv:DefaultPrice&gt;&lt;%= item.DefaultPrice %&gt;&lt;/inv:DefaultPrice&gt;
                       &lt;inv:RRPPrice&gt;&lt;%= item.RRP %&gt;&lt;/inv:RRPPrice&gt;
                       &lt;inv:Aux1&gt;&lt;%= item.Aux1 %&gt;&lt;/inv:Aux1&gt;
                       &lt;inv:Aux2&gt;&lt;%= item.Aux2 %&gt;&lt;/inv:Aux2&gt;
                       &lt;inv:Aux3&gt;&lt;%= item.Aux3 %&gt;&lt;/inv:Aux3&gt;
                       &lt;inv:SellPriceIncTax&gt;false&lt;/inv:SellPriceIncTax&gt;
                       &lt;inv:Regions&gt;
                           &lt;inv:Region&gt;
                               &lt;inv:RegionName&gt;Default Region&lt;/inv:RegionName&gt;
                               &lt;inv:Suppliers&gt;
                                   &lt;inv:Supplier&gt;
                                       &lt;inv:Creditor&gt;
                                           &lt;crd:AccountNo&gt;&lt;%= item.Supplier %&gt;&lt;/crd:AccountNo&gt;
                                       &lt;/inv:Creditor&gt;
                                       &lt;inv:SupplierPartNo&gt;&lt;%= item.SupplierPartNo %&gt;&lt;/inv:SupplierPartNo&gt;
                                       &lt;inv:DefaultSupplier&gt;true&lt;/inv:DefaultSupplier&gt;
                                       &lt;inv:SupplierWarehouses&gt;
                                           &lt;inv:SupplierWarehouse&gt;
                                               &lt;inv:Warehouse&gt;
                                                   &lt;crd:Description&gt;Default&lt;/crd:Description&gt;
                                                   &lt;crd:DefaultDelDays&gt;3&lt;/crd:DefaultDelDays&gt;
                                               &lt;/inv:Warehouse&gt;
                                               &lt;inv:DefaultWarehouse&gt;true&lt;/inv:DefaultWarehouse&gt;
                                               &lt;inv:HomeSuppliersCost&gt;&lt;%= item.HomeCost %&gt;&lt;/inv:HomeSuppliersCost&gt;
                                               &lt;inv:SuppliersCost&gt;&lt;%= item.SupplierCost %&gt;&lt;/inv:SuppliersCost&gt;
                                               &lt;inv:DeliveryDays&gt;2&lt;/inv:DeliveryDays&gt;
                                           &lt;/inv:SupplierWarehouse&gt;
                                       &lt;/inv:SupplierWarehouses&gt;
                                   &lt;/inv:Supplier&gt;
                               &lt;/inv:Suppliers&gt;
                           &lt;/inv:Region&gt;
                       &lt;/inv:Regions&gt;
                       &lt;inv:OtherDescriptions&gt;
                           &lt;inv:OtherDescription&gt;
                               &lt;inv:Description&gt;&lt;%= item.Prerequisite %&gt;&lt;/inv:Description&gt;
                           &lt;/inv:OtherDescription&gt;
                       &lt;/inv:OtherDescriptions&gt;
                   &lt;/JiwaDocument&gt;
        End Function

        Private Class NewInventoryItem
            Public Property PartNo As String
            Public Property Description As String
            Public Property RRP As Decimal
            Public Property DefaultPrice As Decimal
            Public Property Supplier As String
            Public Property SupplierPartNo As String
            Public Property SupplierCost As Decimal
            Public Property HomeCost As Decimal
            Public Property Classification As String = "Unknown"
            Public Property Category1 As String = "Unknown"
            Public Property Category2 As String = "Unknown"
            Public Property Category3 As String = "Unknown"
            Public Property Category4 As String = "Unknown"
            Public Property Category5 As String = "Unknown"
            Public Property Aux1 As String
            Public Property Aux2 As String
            Public Property Aux3 As String
            Public Property Prerequisite As String
            Public Property Status As String = "Active"
            Public Property Result As String
            Public Property XmlInput As String

            Public Sub New()

            End Sub
        End Class

        Private Class ImportColumn
            Public Key As String ' all-uppercase field name
            Public Index As Integer ' index in list
            Public MapIndex As Integer ' column-map index
            Public ColumnType As ColumnType
            Public DataField As String ' map to NewInventoryItem class
            Public Header As String ' text for column header
            Public LookupQuery As String ' query for populating lookups, or comma-separated list for drop-down
            Public CellType As ICellType ' special cell type
            Public Items() As String ' display items for combobox
            Public ItemData() As String ' data items for combobox

            Public Sub New(columnType As ColumnType, key As String, dataField As String, header As String, lookupquery As String)
                Me.Key = key
                Me.ColumnType = columnType
                Me.Header = header
                Me.LookupQuery = lookupquery
                Me.DataField = dataField
            End Sub

            Public Sub New()

            End Sub
        End Class

		Private ReadOnly Property JiwaInstance As JiwaApplication.Manager
			Get
				Return JiwaFinancials.Jiwa.JiwaApplication.Manager.Instance
			End Get
		End Property

        Public Overrides Sub SetupBeforeHandlers()
            MyBase.SetupBeforeHandlers()
            Me.MdiParent = JiwaInstance.MDIParentForm
        End Sub

        Public Overrides Sub Setup()
            MyBase.Setup()
            MyBase.SetupWindow()

            InitialiseColumnList()
            BuildSheet()

            MyBase.AddHandlers()
        End Sub

        Public Overrides Sub SetPermissions()
            ' do nothing  but override the default SetPermissions. This form is really an all-or-nothing form.
        End Sub

        Dim newInventoryData As New List(Of NewInventoryItem)

        Dim maxrows As Integer

        Public Sub BuildSheet()
            Try
                ImportSpread.SuspendLayout()

                Dim importSheet As SheetView = ImportSpread.ActiveSheet
                importSheet.ShowRowSelector = True
                importSheet.SelectionStyle = SelectionStyles.Both
                importSheet.SelectionPolicy = Model.SelectionPolicy.Range
                importSheet.RestrictRows = True
                importSheet.RestrictColumns = True

                importSheet.DataAllowAddNew = True
                importSheet.DataAutoSizeColumns = True
                importSheet.DataAutoHeadings = False
                importSheet.DataSource = newInventoryData

                Dim c As Integer = 0

                Do While c &lt; importSheet.Columns.Count ' because Count can change when we add lookup columns.
                    If c &lt; importSheet.Columns.Count Then
                        Dim col As Column = importSheet.Columns(c)
                        Dim item As ImportColumn = columnsByField(col.DataField)
                        ' because a Lookup type *adds* an extra column with the lookup button.
                        If item.CellType IsNot Nothing AndAlso item.ColumnType &lt;&gt; ColumnType.Lookup Then
                            col.CellType = item.CellType
                        End If

                        col.Label = item.Header
                        col.Tag = item.Key
                        item.MapIndex = c

                        If item.ColumnType = ColumnType.Lookup Then 'Add a Jiwa Lookup
                            c = c + 1
                            importSheet.Columns.Add(c, 1)
                            col = importSheet.Columns(c)
                            col.CellType = item.CellType
                            col.Tag = item.Key &amp; "_LOOKUP"
                            col.Width = 20.0!
                        End If
                    End If
                    c = c + 1
                Loop

                ' add trash can to end
                importSheet.Columns.Add(c, 1)
                With importSheet.Columns(c)
                    .Tag = "BIN"
                    .CellType = New JiwaBinButtonCellType(JiwaInstance)
                    .Label = ""
                    .Width = 20.0!
                End With

                importSheet.RowHeader.ColumnCount = 1
                importSheet.RowHeaderVisible = True
                importSheet.AddUnboundRows(0, 1)
                importSheet.Expandable = True

                ImportSpread.SetupComplete()

                AddHandler importSheet.CellChanged, AddressOf ImportSpread_Changed
                AddHandler ImportSpread.ButtonClicked, AddressOf ImportSpread_ButtonClicked
                AddHandler ImportSpread.CellClick, AddressOf ImportSpread_CellClick
                AddHandler ImportSpread.ClipboardPasting, AddressOf ImportSpread_ClipboardPasting

            Finally
                ImportSpread.ResumeLayout()

            End Try
        End Sub

        Shared rowSplitter As String() = {vbCrLf, vbCr, vbLf}
        Shared colSplitter As String() = {vbTab}
        Shared skipColTypes As Type() = {GetType(JiwaLookupButtonCellType), GetType(ImageCellType)}

        Shared debuggingKey As Integer = 1

        Private Sub ImportSpread_ClipboardPasting(sender As Object, e As ClipboardPastingEventArgs)
            If e.Behavior &lt;&gt; ClipboardBehavior.Unknown Then Return

            If sender IsNot ImportSpread Then Return

            Dim rowData As String()
            Dim clipboardData = Clipboard.GetText()
            Dim importSheet As SheetView = ImportSpread.ActiveSheet

            If clipboardData IsNot Nothing Then
                rowData = clipboardData.Split({vbCrLf, vbCr, vbLf}, StringSplitOptions.None)
                If rowData.Length = 0 Then Return

                If rowData(0).Contains(vbTab) Then 'assume tab-delimited data for multi-cell pasting; we have work to do
                    Dim selectedRange As CellRange = importSheet.GetSelection(0)

                    Dim startRow = selectedRange.Row
                    Dim startCol = selectedRange.Column
                    Dim wholeRowPaste = selectedRange.ColumnCount = importSheet.ColumnCount

                    Dim colIndexes As New Dictionary(Of Integer, Integer)
                    Dim colStyles As New Dictionary(Of Integer, ICellType)

                    Dim pasteColIndex As Integer = startCol
                    Dim sourceColIndex As Integer = 0
                    For Each gridCol As Column In importSheet.Columns
                        If gridCol.Index &gt;= pasteColIndex Then
                            If gridCol.Locked OrElse skipColTypes.Contains(gridCol.CellType.GetType()) Then
                                pasteColIndex += 1 ' skip non-writable columns
                                Continue For
                            End If
                            colIndexes.Add(sourceColIndex, pasteColIndex)
                            colStyles.Add(sourceColIndex, gridCol.CellType)
                            sourceColIndex += 1
                            pasteColIndex += 1
                        End If
                    Next

                    Dim gridRow As Integer = startRow
                    For Each row As String In rowData
                        Dim colData = row.Split({vbTab}, StringSplitOptions.None)
                        If colData Is Nothing OrElse colData.Length = 0 Then Continue For

                        ' filter out blanks
                        Dim haveData As Boolean = False
                        For Each item In colData
                            If Not String.IsNullOrWhiteSpace(item) Then
                                haveData = True
                                Exit For
                            End If
                        Next

                        ' don't add empty rows.
                        If Not haveData Then Continue For

                        If debuggingKey &gt; 1 Then
                            If gridRow &gt; importSheet.RowCount Then
                                importSheet.AddRowToDataSource(gridRow, True) ' add it to the dataset
                            End If
                        End If

                        For c As Integer = LBound(colData) To UBound(colData)
                            If c &gt;= colIndexes.Count Then Continue For ' ignore extra columns

                            Dim editCell = importSheet.Cells(gridRow, colIndexes(c))

                            If TypeOf colStyles(c) Is CellType.NumberCellType Then
                                Dim newValue As Decimal
                                Const numberStyle As NumberStyles = NumberStyles.AllowCurrencySymbol Or NumberStyles.AllowDecimalPoint Or NumberStyles.AllowLeadingSign Or NumberStyles.AllowLeadingWhite Or NumberStyles.AllowThousands Or NumberStyles.AllowTrailingSign Or NumberStyles.AllowTrailingWhite Or NumberStyles.AllowParentheses

                                If Decimal.TryParse(colData(c), numberStyle, CultureInfo.CurrentUICulture, newValue) Then
                                    editCell.Value = newValue
                                Else
                                    editCell.Value = Nothing
                                End If

                            ElseIf TypeOf colStyles(c) Is DateTimeCellType Then
                                Dim newValue As Date
                                Const dateStyles As DateTimeStyles = DateTimeStyles.AssumeLocal Or DateTimeStyles.AllowWhiteSpaces

                                If Date.TryParse(colData(c), CultureInfo.CurrentUICulture, dateStyles, newValue) Then
                                    editCell.Value = newValue
                                Else
                                    editCell.Value = Nothing
                                End If

                            ElseIf TypeOf colStyles(c) Is ComboBoxCellType Then
                                editCell.Value = colData(c)

                            Else
                                editCell.Value = colData(c)
                            End If
                        Next
                        gridRow += 1
                    Next
                    'ElseIf rowData(0).Contains(","c) Then ' assume comma-delimited
                    '    For Each row As String In rowData
                    '        Dim colData = row.Split({","c}, StringSplitOptions.None)

                    '    Next

                    e.Handled = True
                End If
            End If

        End Sub

        Private Sub ImportSpread_CellClick(ByVal sender As Object, ByVal e As CellClickEventArgs)
            If e.RowHeader Then
                ImportSpread.ActiveSheet.Models.Selection.SetSelection(e.Row, 0, 1, ImportSpread.ActiveSheet.Columns.Count)
            End If
        End Sub

        Private Sub ImportSpread_Changed(sender As Object, e As SheetViewEventArgs)
            Dim importSheet As SheetView = ImportSpread.ActiveSheet
            If e.Row = newInventoryData.Count Then ' this is a new row
                importSheet.AddRowToDataSource(e.Row, True) ' add it to the dataset
                importSheet.AddUnboundRows(importSheet.RowCount + 1, 1) ' and add a new empty row
            ElseIf importSheet.RowCount = Me.newInventoryData.Count Then
                importSheet.AddUnboundRows(importSheet.RowCount + 1, 1)
            End If
        End Sub

        Private Sub ImportSpread_ButtonClicked(sender As Object, e As EditorNotifyEventArgs)
            Dim importSheet As SheetView = ImportSpread.ActiveSheet
            Dim Key = CStr(importSheet.Columns(e.Column).Tag)
            If Key = "BIN" Then
                ' delete current row
                importSheet.RemoveRows(e.Row, 1)
                If importSheet.RowCount = Me.newInventoryData.Count Then
                    importSheet.AddUnboundRows(importSheet.RowCount + 1, 1)
                End If
                Return
            End If

            If Key.EndsWith("_LOOKUP") Then
                Key = Key.Substring(0, Key.LastIndexOf("_"))
            End If

            If Key = "" Then Return

            Dim eventColumn As ImportColumn = columnsByKey(Key)

            If eventColumn.Key = "SUPPLIER" Then
                Dim supplier As Supplier = Me.Manager.CollectionItemFactory.CreateCollectionItem(Of Supplier)()
                supplier.Creditor.Search(Me)
                If (supplier.Creditor.CreditorID IsNot Nothing AndAlso supplier.Creditor.CreditorID.Trim().Length &gt; 0) Then
                    Dim supplierCell = importSheet.Cells(e.Row, eventColumn.MapIndex)
                    supplierCell.Text = supplier.Creditor.AccountNo
                End If
                Return
            ElseIf eventColumn.Key = "CATEGORY3" Then
                Dim inventory = Me.Manager.BusinessLogicFactory.CreateBusinessLogic(Of JiwaInventory.Inventory)(Me)
                inventory.Category3.Search(Me)
                If (inventory.Category3.RecID &lt;&gt; "") Then
                    Dim creditorCell = importSheet.Cells(e.Row, eventColumn.MapIndex)
                    creditorCell.Text = inventory.Category3.Description
                End If
                Return

            End If
        End Sub

        Public Sub Import()
            'If Diagnostics.Debugger.IsAttached Then Diagnostics.Debugger.Break()

            Try
                UltraToolbarsManager1.Tools("ID_RecordProcess").SharedProps.Enabled = False
                UltraToolbarsManager1.Tools("ID_RecordRefresh").SharedProps.Enabled = False

                maxrows = newInventoryData.Count

                If maxrows &lt; 1 Then
                    System.Windows.Forms.MessageBox.Show("Nothing to import ?!?!")
                    Return
                End If

                Dim inventory As JiwaInventory.Inventory = JiwaInstance.BusinessLogicFactory.CreateBusinessLogic(Of JiwaInventory.Inventory)(Me)

                Dim added As Integer = 0
                Dim updated As Integer = 0
                Dim failed As Integer = 0
                Dim processed As Integer = 0
                Dim clearAdded As Boolean = Me.ClearAddedSelector.Checked
                Dim clearUpdated As Boolean = Me.ClearUpdatedSelector.Checked

                Me.ProgressBar.Maximum = maxrows
                For row As Integer = newInventoryData.Count - 1 To 0 Step -1 ' go from bottom to top so that we can clear successful imports
                    Me.ProgressBar.Value = processed
                    If row &gt; Me.ProgressBar.Maximum Then
                        Me.ProgressBar.Maximum = row
                    End If
                    Me.ProcessedLabel.Text = String.Format("Processed : {0}", maxrows - row)

                    Dim item As NewInventoryItem = newInventoryData(row)

                    If String.IsNullOrWhiteSpace(item.PartNo) Then
                        Continue For
                    End If

                    Dim InventoryID As String = GetInventoryIdFromPartNo(item.PartNo)
                    Dim newPart As Boolean = InventoryID = ""

                    If String.IsNullOrWhiteSpace(item.Status) Then item.Status = "Active"

                    Dim InventoryXml = GetInventoryXml(item)

                    Try
                        item.XmlInput = InventoryXml.ToString()
                        inventory.Deserialise(item.XmlInput)
                        inventory.Save()

                        If newPart Then
                            item.Result = "Part Added"
                            added += 1
                            Me.AddedLabel.Text = String.Format("Added: {0}", added)
                            If clearAdded Then
                                ImportSpread.ActiveSheet.RemoveRows(row, 1)
                                newInventoryData.RemoveAt(row)
                            End If
                        Else
                            item.Result = "Part Updated"
                            updated += 1
                            Me.UpdatedLabel.Text = String.Format("Updated: {0}", updated)
                            If clearUpdated Then ImportSpread.ActiveSheet.RemoveRows(row, 1)
                        End If

                    Catch ex As Exception
                        item.Result = String.Format("Failure: {0}", ex.Message)
                        failed += 1
                        Me.FailedLabel.Text = String.Format("Failures: {0}", failed)
                    End Try

                    processed += 1
                    Me.ProcessedLabel.Text = String.Format("Processed: {0}", processed)
                    Me.Refresh()
                Next


                Dim results As String = String.Format("Import complete." &amp; vbCrLf &amp;
                        "{0} added." &amp; vbCrLf &amp;
                        "{1} updated." &amp; vbCrLf &amp;
                        "{2} failed." &amp; vbCrLf &amp;
                        "{3} total", added, updated, failed, processed
                    )
                Dim msgIcon As MessageBoxIcon
                If failed &gt; 0 Then
                    msgIcon = MessageBoxIcon.Error
                ElseIf updated &gt; 0 Then
                    msgIcon = MessageBoxIcon.Asterisk
                Else
                    msgIcon = MessageBoxIcon.Asterisk
                End If

                Me.ProgressBar.Value = processed

                System.Windows.Forms.MessageBox.Show(results, "Completed.", MessageBoxButtons.OK, msgIcon)

            Finally
                UltraToolbarsManager1.Tools("ID_RecordProcess").SharedProps.Enabled = True
                UltraToolbarsManager1.Tools("ID_RecordRefresh").SharedProps.Enabled = True
            End Try

        End Sub

        Private columnsByKey As Dictionary(Of String, ImportColumn)
        Private columnsByField As Dictionary(Of String, ImportColumn)

        Private Sub InitialiseColumnList()
            For i = 0 To ImportColumnList.Count - 1
                Dim ic As ImportColumn = ImportColumnList(i)
                ic.Index = i

                Select Case ic.ColumnType
                    Case ColumnType.Text
                        Continue For
                    Case ColumnType.LargeText
                        ic.CellType = New TextCellType With {.MaxLength = 10000}
                    Case ColumnType.Currency
                        ' money
                        ic.CellType = New JiwaCurrencyCellType With {.FixedPoint = True, .DecimalPlaces = 2, .LeadingZero = LeadingZero.Yes, .ShowCurrencySymbol = False}
                    Case ColumnType.Whole
                        ' other number
                        ic.CellType = New NumberCellType With {.FixedPoint = True, .DecimalPlaces = 0, .LeadingZero = LeadingZero.Yes}
                    Case ColumnType.Float
                        ' other number
                        ic.CellType = New NumberCellType With {.FixedPoint = False, .LeadingZero = LeadingZero.Yes}
                    Case ColumnType.Date
                        ic.CellType = New DateTimeCellType() With {.DateDefault = DateTime.Today, .DateTimeFormat = DateTimeFormat.ShortDate}
                    Case ColumnType.Lookup
                        ic.CellType = New JiwaLookupButtonCellType(JiwaInstance)

                        If ic.LookupQuery &lt;&gt; "" Then
                            Dim comboBoxItems As Dictionary(Of String, String) = GetLookupItems(ic.LookupQuery)
                            If comboBoxItems IsNot Nothing Then
                                ic.Items = comboBoxItems.Values.ToArray()
                                ic.ItemData = comboBoxItems.Keys.ToArray()
                            End If
                        End If

                        Continue For ' JiwaLookup
                    Case ColumnType.DropDown
                        Dim comboBoxItems As Dictionary(Of String, String) = GetLookupItems(ic.LookupQuery)
                        If comboBoxItems Is Nothing Then Continue For

                        ic.Items = comboBoxItems.Values.ToArray()
                        ic.ItemData = comboBoxItems.Keys.ToArray()

                        ic.CellType = New ComboBoxCellType() With {.Items = ic.Items, .ItemData = ic.ItemData}
                        Continue For
                    Case ColumnType.List
                        ic.Items = ic.LookupQuery.Split(","c)
                        ic.ItemData = ic.Items

                        ic.CellType = New ComboBoxCellType() With {.Items = ic.Items, .ItemData = ic.ItemData}
                End Select

            Next i

            columnsByKey = ImportColumnList.ToDictionary(Function(a) a.Key)
            columnsByField = ImportColumnList.ToDictionary(Function(a) a.DataField)
        End Sub

        Private Function GetDropDownValue(columnKey As String, value As String) As String
            Dim ic As ImportColumn = columnsByKey(columnKey)

            If ic.Items Is Nothing Then Return Nothing
            If ic.Items.Length = 0 Then Return Nothing

            Dim itemIndex = Array.IndexOf(ic.Items, value)
            If itemIndex &lt;&gt; -1 Then
                Return ic.ItemData(itemIndex)
            End If

            Return Nothing
        End Function

        Private Function GetLookupItems(lookupQuery As String) As Dictionary(Of String, String)
            Dim result As New Dictionary(Of String, String)
            Try
                Using SQLCmd As SqlCommand = New SqlCommand(lookupQuery, JiwaInstance.Database.SQLConnection, JiwaInstance.Database.SQLTransaction) 
                    Using SQLReader = SQLCmd.ExecuteReader()
                        While SQLReader.Read()
                            result.Add(SQLReader.GetString(0), SQLReader.GetString(1))
                        End While
                    End Using
                End Using
            Catch ex As Exception
                Return Nothing
            End Try

            Return result
        End Function

		Private Function GetInventoryIdFromPartNo(PartNo As String) As String
            Try
                Dim SQL = "SELECT @InventoryID=InventoryID FROM IN_Main WHERE PartNo=@PartNo"

                Using SQLCmd As SqlCommand = New SqlCommand(SQL, JiwaInstance.Database.SQLConnection, JiwaInstance.Database.SQLTransaction) 
                    SQLCmd.Parameters.Add(New SqlParameter("@PartNo", SqlDbType.[Char]) With {.Value = PartNo})
                    Dim result = SQLCmd.Parameters.Add(New SqlParameter("@InventoryID", SqlDbType.VarChar) With {.Direction = ParameterDirection.Output, .Size = 20})

                    SQLCmd.ExecuteNonQuery()

                    If TypeOf result.Value Is String Then
                        Return DirectCast(result.Value, String)

                    ElseIf TypeOf result.Value Is SqlString Then ' anything else is an error.
                        Dim resultString = DirectCast(result.SqlValue, SqlString)
                        If resultString.IsNull Then Return Nothing

                        Return resultString.ToString()
                    End If

                    Return Nothing
                End Using
            Catch ex As Exception
                Return Nothing
            End Try
        End Function
		
#Region "Toolbar event handler"

        Public Overrides Sub Process(Optional cancelButton As Control = Nothing)
            ' respond to "Process" button being pressed
            Import()
        End Sub

        Public Overrides Sub RecordRefresh()
            ' respond to "Refresh" button being pressed
            newInventoryData.Clear()
            Dim importSheet As SheetView = ImportSpread.ActiveSheet
            If importSheet.RowCount = Me.newInventoryData.Count Then
                importSheet.AddUnboundRows(importSheet.RowCount + 1, 1)
            End If
        End Sub


#End Region

#Region "Constructor"

        Public Sub New()

            ' This call is required by the designer.
            InitializeComponent()

            CultureInfo.CurrentUICulture = CultureInfo.InstalledUICulture
            CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.InstalledUICulture

            ' Add any initialization after the InitializeComponent() call.
            ' enable the refresh button, which we will use to 'clear' the screen.
            UltraToolbarsManager1.Tools("ID_RecordRefresh").SharedProps.Enabled = True
        End Sub
#End Region

    End Class

#Region "Form Design"


    &lt;Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()&gt;
    Partial Class InventoryImport
        Inherits JiwaFinancials.Jiwa.JiwaApplication.ProcessAction.UserInterface


        'Form overrides dispose to clean up the component list.
        &lt;System.Diagnostics.DebuggerNonUserCode()&gt;
        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 Windows Form Designer
        Private components As System.ComponentModel.IContainer

        'NOTE: The following procedure is required by the Windows Form Designer
        'It can be modified using the Windows Form Designer.  
        'Do not modify it using the code editor.
        &lt;System.Diagnostics.DebuggerStepThrough()&gt;
        Private Sub InitializeComponent()
            Me.ImportSpread = New JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid()
            CType(Me.UltraToolbarsManager1, System.ComponentModel.ISupportInitialize).BeginInit()
            CType(Me.InboxControlStyler1, System.ComponentModel.ISupportInitialize).BeginInit()
            CType(Me.ImportSpread, System.ComponentModel.ISupportInitialize).BeginInit()
            Me.UserInterface_Fill_Panel.ClientArea.SuspendLayout()
            Me.UserInterface_Fill_Panel.SuspendLayout()

            Me.UltraPanel1 = New System.Windows.Forms.Panel()
            Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
            Me.ProgressLabel = New System.Windows.Forms.ToolStripStatusLabel()
            Me.ProgressBar = New System.Windows.Forms.ToolStripProgressBar()
            Me.ProcessedLabel = New System.Windows.Forms.ToolStripStatusLabel()
            Me.AddedLabel = New System.Windows.Forms.ToolStripStatusLabel()
            Me.FailedLabel = New System.Windows.Forms.ToolStripStatusLabel()
            Me.UpdatedLabel = New System.Windows.Forms.ToolStripStatusLabel
            Me.HeaderPanel = New System.Windows.Forms.Panel()
            'Me.FileSelectorGroup = New System.Windows.Forms.GroupBox()
            Me.ClearAddedSelector = New System.Windows.Forms.CheckBox()
            Me.ClearUpdatedSelector = New System.Windows.Forms.CheckBox()
            'Me.FileLookup = New System.Windows.Forms.Button()
            'Me.FileNameEditor = New System.Windows.Forms.TextBox()
            Me.UltraPanel1.SuspendLayout()
            Me.StatusStrip1.SuspendLayout()
            Me.HeaderPanel.SuspendLayout()
            'Me.FileSelectorGroup.SuspendLayout()
            Me.SuspendLayout()
            '
            Me._UserInterface_Toolbars_Dock_Area_Left.InitialResizeAreaExtent = 4
            Me._UserInterface_Toolbars_Dock_Area_Left.Size = New System.Drawing.Size(4, 328)
            Me._UserInterface_Toolbars_Dock_Area_Right.Size = New System.Drawing.Size(4, 328)
            Me._UserInterface_Toolbars_Dock_Area_Bottom.InitialResizeAreaExtent = 0
            Me._UserInterface_Toolbars_Dock_Area_Bottom.Location = New System.Drawing.Point(0, 475)
            Me._UserInterface_Toolbars_Dock_Area_Bottom.Size = New System.Drawing.Size(1240, 0)
            '
            Me.UltraToolbarsManager1.MenuSettings.ForceSerialization = True
            Me.UltraToolbarsManager1.Ribbon.FileMenuStyle = Infragistics.Win.UltraWinToolbars.FileMenuStyle.None
            Me.UltraToolbarsManager1.Ribbon.QuickAccessToolbar.Visible = False
            Me.UltraToolbarsManager1.Ribbon.Visible = True
            Me.UltraToolbarsManager1.ToolbarSettings.ForceSerialization = True


            '
            'UltraPanel1
            '
            Me.UltraPanel1.Controls.Add(Me.ImportSpread)
            Me.UltraPanel1.Controls.Add(Me.HeaderPanel)
            Me.UltraPanel1.Controls.Add(Me.StatusStrip1)
            Me.UltraPanel1.Dock = System.Windows.Forms.DockStyle.Fill
            Me.UltraPanel1.Location = New System.Drawing.Point(0, 0)
            Me.UltraPanel1.Name = "UltraPanel1"
            Me.UltraPanel1.Size = New System.Drawing.Size(947, 512)
            Me.UltraPanel1.TabIndex = 3
            '
            'StatusStrip1
            '
            Me.StatusStrip1.Font = New System.Drawing.Font("Segoe UI", 14.0!)
            Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ProgressLabel, Me.ProgressBar, Me.ProcessedLabel, Me.AddedLabel, Me.UpdatedLabel, Me.FailedLabel})
            Me.StatusStrip1.Location = New System.Drawing.Point(0, 482)
            Me.StatusStrip1.Name = "StatusStrip1"
            Me.StatusStrip1.Size = New System.Drawing.Size(947, 30)
            Me.StatusStrip1.TabIndex = 3
            Me.StatusStrip1.Text = "StatusStrip1"
            '
            'ProgressLabel
            '
            Me.ProgressLabel.Name = "ProgressLabel"
            Me.ProgressLabel.Size = New System.Drawing.Size(89, 25)
            Me.ProgressLabel.Text = "Progress:"
            '
            'ProgressBar
            '
            Me.ProgressBar.Name = "ProgressBar"
            Me.ProgressBar.Size = New System.Drawing.Size(250, 24)
            '
            'AddedLabel
            '
            Me.AddedLabel.ForeColor = System.Drawing.Color.DarkGreen
            Me.AddedLabel.Name = "AddedLabel"
            Me.AddedLabel.Size = New System.Drawing.Size(86, 25)
            Me.AddedLabel.Text = "Added: 0"
            '
            'UpdatedLabel
            '
            Me.UpdatedLabel.ForeColor = System.Drawing.Color.MediumBlue
            Me.UpdatedLabel.Name = "UpdatedLabel"
            Me.UpdatedLabel.Size = New System.Drawing.Size(103, 25)
            Me.UpdatedLabel.Text = "Updated: 0"
            '
            'DuplicateFailuresLabel
            '
            'Me.DuplicateFailuresLabel.ForeColor = System.Drawing.Color.OrangeRed
            'Me.DuplicateFailuresLabel.Name = "DuplicateFailuresLabel"
            'Me.DuplicateFailuresLabel.Size = New System.Drawing.Size(119, 25)
            'Me.DuplicateFailuresLabel.Text = "Duplicates: 0"
            '
            'OtherFailuresLabel
            '
            Me.FailedLabel.ForeColor = System.Drawing.Color.Red
            Me.FailedLabel.Name = "OtherFailuresLabel"
            Me.FailedLabel.Size = New System.Drawing.Size(95, 25)
            Me.FailedLabel.Text = "Failures: 0"
            '
            'ProcessedLabel
            '
            Me.ProcessedLabel.Name = "ProcessedLabel"
            Me.ProcessedLabel.Size = New System.Drawing.Size(116, 25)
            Me.ProcessedLabel.Text = "Processed: 0"
            '
            'HeaderPanel
            '
            'Me.HeaderPanel.Controls.Add(Me.FileSelectorGroup)
            Me.HeaderPanel.Controls.Add(Me.ClearAddedSelector)
            Me.HeaderPanel.Controls.Add(Me.ClearUpdatedSelector)
            Me.HeaderPanel.Dock = System.Windows.Forms.DockStyle.Top
            Me.HeaderPanel.Location = New System.Drawing.Point(0, 0)
            Me.HeaderPanel.Name = "HeaderPanel"
            Me.HeaderPanel.Size = New System.Drawing.Size(947, 40)
            Me.HeaderPanel.TabIndex = 4
            '
            'ClearAddedSelector
            '
            Me.ClearAddedSelector.AutoSize = True
            Me.ClearAddedSelector.Location = New System.Drawing.Point(40, 12)
            Me.ClearAddedSelector.Name = "ClearAddedSelector"
            Me.ClearAddedSelector.Size = New System.Drawing.Size(105, 17)
            Me.ClearAddedSelector.TabIndex = 2
            Me.ClearAddedSelector.Text = "Clear Added"
            Me.ClearAddedSelector.UseVisualStyleBackColor = True
            '
            'ClearUpdatedSelector
            '
            Me.ClearUpdatedSelector.AutoSize = True
            Me.ClearUpdatedSelector.Location = New System.Drawing.Point(160, 12)
            Me.ClearUpdatedSelector.Name = "ClearUpdatedSelector"
            Me.ClearUpdatedSelector.Size = New System.Drawing.Size(105, 17)
            Me.ClearUpdatedSelector.TabIndex = 2
            Me.ClearUpdatedSelector.Text = "Clear Updated"
            Me.ClearUpdatedSelector.UseVisualStyleBackColor = True
            '
            'CandidateItemsJiwaGrid
            '
            Me.ImportSpread.Name = "ImportSpread"
            Me.ImportSpread.AllowColumnMove = True
            Me.ImportSpread.AllowColumnMoveMultiple = True
            Me.ImportSpread.Dock = DockStyle.Fill
            Me.ImportSpread.ButtonDrawMode = ButtonDrawModes.CurrentRow
            Me.ImportSpread.ClipboardOptions = ClipboardOptions.ColumnHeaders
            Me.ImportSpread.EditModeReplace = True
            Me.ImportSpread.EditModePermanent = False
            Me.ImportSpread.SelectionBlockOptions = SelectionBlockOptions.Cells Or SelectionBlockOptions.Rows Or SelectionBlockOptions.Sheet
            Me.ImportSpread.AutoClipboard = True
            Me.ImportSpread.HorizontalScrollBarPolicy = ScrollBarPolicy.AsNeeded
            Me.ImportSpread.VerticalScrollBarPolicy = ScrollBarPolicy.AsNeeded
            Me.ImportSpread.ScrollBarTrackPolicy = ScrollBarTrackPolicy.Both
            Me.ImportSpread.ShowCellErrors = True
            Me.ImportSpread.TabIndex = 0
            Me.InboxControlStyler1.SetStyleSettings(Me.ImportSpread, New Infragistics.Win.AppStyling.Runtime.InboxControlStyleSettings(Infragistics.Win.DefaultableBoolean.[Default]))

            Me.ImportSpread.SetInputMap(InputMapMode.WhenAncestorOfFocused, OperationMode.Normal, GetFarPointKeyboardMap())
            '
            '
            'UserInterface_Fill_Panel.ClientArea
            '
            Me.UserInterface_Fill_Panel.ClientArea.Controls.Add(Me.UltraPanel1)
            Me.UserInterface_Fill_Panel.Location = New System.Drawing.Point(4, 147)
            Me.UserInterface_Fill_Panel.Size = New System.Drawing.Size(1232, 328)

            Me.Text = "Inventory Import"
            Me.Name = "InventoryImport"
            Me.InboxControlStyler1.SetStyleSettings(Me, New Infragistics.Win.AppStyling.Runtime.InboxControlStyleSettings(Infragistics.Win.DefaultableBoolean.[Default]))
            CType(Me.UltraToolbarsManager1, System.ComponentModel.ISupportInitialize).EndInit()
            CType(Me.InboxControlStyler1, System.ComponentModel.ISupportInitialize).EndInit()
            CType(Me.ImportSpread, System.ComponentModel.ISupportInitialize).EndInit()

            Me.UltraPanel1.ResumeLayout(False)
            Me.UltraPanel1.PerformLayout()
            Me.StatusStrip1.ResumeLayout(False)
            Me.StatusStrip1.PerformLayout()
            Me.HeaderPanel.ResumeLayout(False)

            Me.UserInterface_Fill_Panel.ClientArea.ResumeLayout(False)
            Me.UserInterface_Fill_Panel.ResumeLayout(False)
            Me.ResumeLayout(False)
        End Sub



        Friend WithEvents UltraPanel1 As System.Windows.Forms.Panel
        Friend WithEvents ImportSpread As JiwaGrid
        Friend WithEvents HeaderPanel As System.Windows.Forms.Panel
        Friend WithEvents ClearAddedSelector As System.Windows.Forms.CheckBox
        Friend WithEvents ClearUpdatedSelector As System.Windows.Forms.CheckBox
        Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip
        Friend WithEvents ProgressLabel As System.Windows.Forms.ToolStripStatusLabel
        Friend WithEvents ProgressBar As System.Windows.Forms.ToolStripProgressBar
        Friend WithEvents ProcessedLabel As System.Windows.Forms.ToolStripStatusLabel
        Friend WithEvents AddedLabel As System.Windows.Forms.ToolStripStatusLabel
        Friend WithEvents UpdatedLabel As System.Windows.Forms.ToolStripStatusLabel
        Friend WithEvents FailedLabel As System.Windows.Forms.ToolStripStatusLabel
		
		
		
    End Class

	Module Extras
		   ''' &lt;summary&gt;
        ''' Fixes key mappings in FarPoint spreadsheet control.
        ''' &lt;/summary&gt;
        ''' &lt;returns&gt;&lt;/returns&gt;
        Public Function GetFarPointKeyboardMap() As InputMap
            Dim keyboardMap As InputMap = New InputMap() With {.Parent = New InputMap()}

            keyboardMap.Put(New Keystroke(Keys.Delete, Keys.None), "DeleteKey")
            keyboardMap.Parent.Put(New Keystroke(Keys.Up, Keys.None), SpreadActions.MoveToPreviousRow)
            keyboardMap.Parent.Put(New Keystroke(Keys.Down, Keys.None), SpreadActions.MoveToNextRow)
            keyboardMap.Parent.Put(New Keystroke(Keys.Left, Keys.None), SpreadActions.MoveToPreviousColumnVisual)
            keyboardMap.Parent.Put(New Keystroke(Keys.Right, Keys.None), SpreadActions.MoveToNextColumnVisual)
            keyboardMap.Parent.Put(New Keystroke(Keys.Up, CType((Keys.Shift Or Keys.None), Keys)), SpreadActions.ExtendToPreviousRow)
            keyboardMap.Parent.Put(New Keystroke(Keys.Down, CType((Keys.Shift Or Keys.None), Keys)), SpreadActions.ExtendToNextRow)
            keyboardMap.Parent.Put(New Keystroke(Keys.Left, CType((Keys.Shift Or Keys.None), Keys)), SpreadActions.ExtendToPreviousColumnVisual)
            keyboardMap.Parent.Put(New Keystroke(Keys.Right, CType((Keys.Shift Or Keys.None), Keys)), SpreadActions.ExtendToNextColumnVisual)
            keyboardMap.Parent.Put(New Keystroke(Keys.Up, CType((Keys.Control Or Keys.None), Keys)), SpreadActions.MoveToPreviousRow)
            keyboardMap.Parent.Put(New Keystroke(Keys.Down, CType((Keys.Control Or Keys.None), Keys)), SpreadActions.MoveToNextRow)
            keyboardMap.Parent.Put(New Keystroke(Keys.Left, CType((Keys.Control Or Keys.None), Keys)), SpreadActions.MoveToPreviousColumnVisual)
            keyboardMap.Parent.Put(New Keystroke(Keys.Right, CType((Keys.Control Or Keys.None), Keys)), SpreadActions.MoveToNextColumnVisual)
            keyboardMap.Parent.Put(New Keystroke(Keys.Up, CType(((Keys.Control Or Keys.Shift) _
                            Or Keys.None), Keys)), SpreadActions.ExtendToPreviousRow)
            keyboardMap.Parent.Put(New Keystroke(Keys.Down, CType(((Keys.Control Or Keys.Shift) _
                            Or Keys.None), Keys)), SpreadActions.ExtendToNextRow)
            keyboardMap.Parent.Put(New Keystroke(Keys.Left, CType(((Keys.Control Or Keys.Shift) _
                            Or Keys.None), Keys)), SpreadActions.ExtendToPreviousColumnVisual)
            keyboardMap.Parent.Put(New Keystroke(Keys.Right, CType(((Keys.Control Or Keys.Shift) _
                            Or Keys.None), Keys)), SpreadActions.ExtendToNextColumnVisual)
            keyboardMap.Parent.Put(New Keystroke(Keys.PageUp, Keys.None), SpreadActions.MoveToPreviousPageOfRows)
            keyboardMap.Parent.Put(New Keystroke(Keys.[Next], Keys.None), SpreadActions.MoveToNextPageOfRows)
            keyboardMap.Parent.Put(New Keystroke(Keys.PageUp, CType((Keys.Control Or Keys.None), Keys)), SpreadActions.MoveToPreviousPageOfColumns)
            keyboardMap.Parent.Put(New Keystroke(Keys.[Next], CType((Keys.Control Or Keys.None), Keys)), SpreadActions.MoveToNextPageOfColumns)
            keyboardMap.Parent.Put(New Keystroke(Keys.PageUp, CType((Keys.Shift Or Keys.None), Keys)), SpreadActions.ExtendToPreviousPageOfRows)
            keyboardMap.Parent.Put(New Keystroke(Keys.[Next], CType((Keys.Shift Or Keys.None), Keys)), SpreadActions.ExtendToNextPageOfRows)
            keyboardMap.Parent.Put(New Keystroke(Keys.PageUp, CType(((Keys.Control Or Keys.Shift) _
                            Or Keys.None), Keys)), SpreadActions.ExtendToPreviousPageOfColumns)
            keyboardMap.Parent.Put(New Keystroke(Keys.[Next], CType(((Keys.Control Or Keys.Shift) _
                            Or Keys.None), Keys)), SpreadActions.ExtendToNextPageOfColumns)
            keyboardMap.Parent.Put(New Keystroke(Keys.Home, Keys.None), SpreadActions.MoveToFirstColumn)
            keyboardMap.Parent.Put(New Keystroke(Keys.[End], Keys.None), SpreadActions.MoveToLastColumn)
            keyboardMap.Parent.Put(New Keystroke(Keys.Home, CType((Keys.Control Or Keys.None), Keys)), SpreadActions.MoveToFirstCell)
            keyboardMap.Parent.Put(New Keystroke(Keys.[End], CType((Keys.Control Or Keys.None), Keys)), SpreadActions.MoveToLastCell)
            keyboardMap.Parent.Put(New Keystroke(Keys.Home, CType((Keys.Shift Or Keys.None), Keys)), SpreadActions.ExtendToFirstColumn)
            keyboardMap.Parent.Put(New Keystroke(Keys.[End], CType((Keys.Shift Or Keys.None), Keys)), SpreadActions.ExtendToLastColumn)
            keyboardMap.Parent.Put(New Keystroke(Keys.Home, CType(((Keys.Control Or Keys.Shift) _
                            Or Keys.None), Keys)), SpreadActions.ExtendToFirstCell)
            keyboardMap.Parent.Put(New Keystroke(Keys.[End], CType(((Keys.Control Or Keys.Shift) _
                            Or Keys.None), Keys)), SpreadActions.ExtendToLastCell)
            keyboardMap.Parent.Put(New Keystroke(Keys.Space, CType((Keys.Control Or Keys.None), Keys)), SpreadActions.SelectColumn)
            keyboardMap.Parent.Put(New Keystroke(Keys.Space, CType(((Keys.Control Or Keys.Shift) _
                            Or Keys.None), Keys)), SpreadActions.SelectSheet)
            keyboardMap.Parent.Put(New Keystroke(Keys.Escape, Keys.None), SpreadActions.CancelEditing)
            keyboardMap.Parent.Put(New Keystroke(Keys.[Return], Keys.None), SpreadActions.StopEditing)
            keyboardMap.Parent.Put(New Keystroke(Keys.Tab, Keys.None), SpreadActions.MoveToNextColumnWrap)
            keyboardMap.Parent.Put(New Keystroke(Keys.Tab, CType((Keys.Shift Or Keys.None), Keys)), SpreadActions.MoveToPreviousColumnWrap)
            keyboardMap.Parent.Put(New Keystroke(Keys.F2, Keys.None), SpreadActions.ClearCell)
            keyboardMap.Parent.Put(New Keystroke(Keys.F3, Keys.None), SpreadActions.DateTimeNow)
            keyboardMap.Parent.Put(New Keystroke(Keys.F4, Keys.None), SpreadActions.ShowSubEditor)
            keyboardMap.Parent.Put(New Keystroke(Keys.Down, CType((Keys.Alt Or Keys.None), Keys)), SpreadActions.ComboShowList)
            keyboardMap.Parent.Put(New Keystroke(Keys.Up, CType((Keys.Alt Or Keys.None), Keys)), SpreadActions.ComboShowList)
            Return keyboardMap
        End Function
	End Module
#End Region

End Namespace</Code>
  <ExceptionPolicy>Report</ExceptionPolicy>
  <Language>VisualBasic</Language>
  <ReferenceCollection>
    <Reference>
      <RecID>36a9ab19-fef5-4458-992d-f143342cdbd9</RecID>
      <AssemblyFullName>JiwaApplication, Version=7.2.0.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaApplication.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\JiwaApplication.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>52256bec-588b-4317-931b-5d66b2eea389</RecID>
      <AssemblyFullName>mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>mscorlib.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>969c2331-6e52-499c-8ff2-b1db97f099c7</RecID>
      <AssemblyFullName>System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>System.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>ec5b96d4-c668-41b7-bbd8-2e53557f9bff</RecID>
      <AssemblyFullName>Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</AssemblyFullName>
      <AssemblyName>Microsoft.VisualBasic.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.VisualBasic\v4.0_10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>ceb045dd-73f4-47ca-825a-ddd4ad883553</RecID>
      <AssemblyFullName>System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</AssemblyFullName>
      <AssemblyName>System.Drawing.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>11c07ee6-7312-41df-b7b6-9ef01caf19d4</RecID>
      <AssemblyFullName>JiwaODBC, Version=7.2.0.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaODBC.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\JiwaODBC.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>d626ff0d-31e3-455b-ad55-edbcdd167d85</RecID>
      <AssemblyFullName>System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>System.Data.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>746e205e-5014-4154-a3ab-2def01d2fd4d</RecID>
      <AssemblyFullName>System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>System.Xml.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>21a5b347-44ab-4e9b-b332-2aef771e4066</RecID>
      <AssemblyFullName>System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>System.Runtime.Serialization.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>e7a692fd-ea92-4885-9cbd-58ee3c9f1453</RecID>
      <AssemblyFullName>System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>System.Windows.Forms.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>3ba846f2-fe6d-4c5c-896d-de8ebb486bf0</RecID>
      <AssemblyFullName>JiwaServiceModel, Version=7.2.0.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaServiceModel.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\JiwaServiceModel.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>a9f66ae1-620a-4229-bee8-384af9ff595a</RecID>
      <AssemblyFullName>Infragistics4.Win.Misc.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.Misc.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\Infragistics4.Win.Misc.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>c71e8394-8a1c-40a9-8732-2dbc82addcae</RecID>
      <AssemblyFullName>Infragistics4.Win.UltraWinEditors.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.UltraWinEditors.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\Infragistics4.Win.UltraWinEditors.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>c5dabd1c-7640-48ff-a3e3-79bf10c984bb</RecID>
      <AssemblyFullName>Infragistics4.Win.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\Infragistics4.Win.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>f598ec6c-a909-400c-89f6-cede9ec3979f</RecID>
      <AssemblyFullName>Microsoft.SqlServer.Smo, Version=14.100.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91</AssemblyFullName>
      <AssemblyName>Microsoft.SqlServer.Smo.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\Microsoft.SqlServer.Smo.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>de1a0b26-e6ae-4769-907d-64c7d252929c</RecID>
      <AssemblyFullName>Microsoft.SqlServer.ConnectionInfo, Version=14.100.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91</AssemblyFullName>
      <AssemblyName>Microsoft.SqlServer.ConnectionInfo.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\Microsoft.SqlServer.ConnectionInfo.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>08b7abfc-ea60-4401-9ea3-a81f43ea0945</RecID>
      <AssemblyFullName>Infragistics4.Win.UltraWinExplorerBar.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.UltraWinExplorerBar.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\Infragistics4.Win.UltraWinExplorerBar.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>2d062118-ee34-4e4c-91a8-105b1be45612</RecID>
      <AssemblyFullName>Infragistics4.Win.UltraWinTree.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.UltraWinTree.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\Infragistics4.Win.UltraWinTree.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>344acd14-06b2-4fdd-a08d-f13768ecdd8e</RecID>
      <AssemblyFullName>FarPoint.Win.Spread, Version=8.35.20151.0, Culture=neutral, PublicKeyToken=327c3516b1b18457</AssemblyFullName>
      <AssemblyName>FarPoint.Win.Spread.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\FarPoint.Win.Spread.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>b9efebd3-e2dc-4d72-aef9-712518ab092e</RecID>
      <AssemblyFullName>Infragistics4.Win.UltraWinTabControl.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.UltraWinTabControl.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\Infragistics4.Win.UltraWinTabControl.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>8998122c-1017-4781-b968-b4c14b54d61c</RecID>
      <AssemblyFullName>Infragistics4.Shared.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Shared.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\Infragistics4.Shared.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>83d3b89b-c808-4919-904c-092221da5dd7</RecID>
      <AssemblyFullName>Infragistics4.Win.UltraWinToolbars.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.UltraWinToolbars.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\Infragistics4.Win.UltraWinToolbars.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>1f655817-901e-413f-b421-563568e89a92</RecID>
      <AssemblyFullName>Infragistics4.Win.UltraWinStatusBar.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.UltraWinStatusBar.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\Infragistics4.Win.UltraWinStatusBar.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>2871374f-1ce1-4619-8121-7bd38f85bf31</RecID>
      <AssemblyFullName>Infragistics4.Win.UltraWinSchedule.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.UltraWinSchedule.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\Infragistics4.Win.UltraWinSchedule.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>d83e41a5-58ea-43d7-b6f9-53ff762e4291</RecID>
      <AssemblyFullName>Infragistics4.Win.UltraWinListView.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.UltraWinListView.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\Infragistics4.Win.UltraWinListView.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>951cd4f8-b714-424d-8f34-8c05936deb7b</RecID>
      <AssemblyFullName>ServiceStack, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587</AssemblyFullName>
      <AssemblyName>ServiceStack.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\ServiceStack.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>0ae782b5-92f2-41ab-b1d1-ad2078faf0fa</RecID>
      <AssemblyFullName>EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>EntityFramework.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\EntityFramework.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>ddd2600c-cb57-4d21-a813-61abc01fc2ed</RecID>
      <AssemblyFullName>System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>System.Core.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>1f0559ce-000e-4a2f-9d36-ee6355801854</RecID>
      <AssemblyFullName>ActiproSoftware.SyntaxEditor.WinForms, Version=16.1.330.0, Culture=neutral, PublicKeyToken=c27e062d3c1a4763</AssemblyFullName>
      <AssemblyName>ActiproSoftware.SyntaxEditor.WinForms.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\ActiproSoftware.SyntaxEditor.WinForms.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>a2ae0cea-ef6e-4f4a-b9a8-e7b2fad313cb</RecID>
      <AssemblyFullName>ZetaHtmlEditControl, Version=1.1.0.3, Culture=neutral, PublicKeyToken=2e2e5ba5da72b6c0</AssemblyFullName>
      <AssemblyName>ZetaHtmlEditControl.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\ZetaHtmlEditControl.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>27683feb-394b-499e-8edc-aaee84802452</RecID>
      <AssemblyFullName>ActiproSoftware.SyntaxEditor.Addons.DotNet.WinForms, Version=16.1.330.0, Culture=neutral, PublicKeyToken=c27e062d3c1a4763</AssemblyFullName>
      <AssemblyName>ActiproSoftware.SyntaxEditor.Addons.DotNet.WinForms.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\ActiproSoftware.SyntaxEditor.Addons.DotNet.WinForms.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>d5fcc6b7-44e7-4126-94b7-270d96cafc8b</RecID>
      <AssemblyFullName>JiwaEncryption, Version=7.2.0.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaEncryption.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\JiwaEncryption.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>bdb3ab85-6d59-4e69-add5-7fb4597056d9</RecID>
      <AssemblyFullName>Infragistics4.Win.UltraWinGrid.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.UltraWinGrid.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\Infragistics4.Win.UltraWinGrid.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>efe48a4f-bac0-4e2f-a1dd-1590affa0209</RecID>
      <AssemblyFullName>Microsoft.SqlServer.Dac, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</AssemblyFullName>
      <AssemblyName>Microsoft.SqlServer.Dac.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\Microsoft.SqlServer.Dac.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>4a578f4f-3b9c-4307-909b-f098746457e7</RecID>
      <AssemblyFullName>CrystalDecisions.CrystalReports.Engine, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304</AssemblyFullName>
      <AssemblyName>CrystalDecisions.CrystalReports.Engine.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\CrystalDecisions.CrystalReports.Engine\13.0.3500.0__692fbea5521e1304\CrystalDecisions.CrystalReports.Engine.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>006ac1d7-2d21-482f-b416-c0a3ab61bb61</RecID>
      <AssemblyFullName>CrystalDecisions.Shared, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304</AssemblyFullName>
      <AssemblyName>CrystalDecisions.Shared.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\CrystalDecisions.Shared\13.0.3500.0__692fbea5521e1304\CrystalDecisions.Shared.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>d237c55e-2a17-42ff-af80-f1cf1259387b</RecID>
      <AssemblyFullName>CrystalDecisions.ReportAppServer.Controllers, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304</AssemblyFullName>
      <AssemblyName>CrystalDecisions.ReportAppServer.Controllers.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.Controllers\13.0.3500.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.Controllers.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>344996fd-de99-4a2c-9b4a-789914ff646c</RecID>
      <AssemblyFullName>Infragistics4.Win.AppStylistSupport.v13.1, Version=13.1.20131.2060, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb</AssemblyFullName>
      <AssemblyName>Infragistics4.Win.AppStylistSupport.v13.1.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\Infragistics4.Win.AppStylistSupport.v13.1.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>10edf3dc-32b9-4244-bac7-09a615f2b5b1</RecID>
      <AssemblyFullName>JiwaLib, Version=7.2.0.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaLib.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\JiwaLib.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>c97fd342-fa51-401d-9117-dc3f2644d448</RecID>
      <AssemblyFullName>Microsoft.ApplicationInsights, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</AssemblyFullName>
      <AssemblyName>Microsoft.ApplicationInsights.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\Microsoft.ApplicationInsights.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>c9cfb029-facf-434c-bca1-19d9b62ed385</RecID>
      <AssemblyFullName>CrystalDecisions.Windows.Forms, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304</AssemblyFullName>
      <AssemblyName>CrystalDecisions.Windows.Forms.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\CrystalDecisions.Windows.Forms\13.0.3500.0__692fbea5521e1304\CrystalDecisions.Windows.Forms.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>f2d7de9b-bb71-4764-8bca-0c9b70825afa</RecID>
      <AssemblyFullName>EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>EntityFramework.SqlServer.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\EntityFramework.SqlServer.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>2b9b993e-fd31-4f27-a75b-50d7a1117593</RecID>
      <AssemblyFullName>ServiceStack.Text, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587</AssemblyFullName>
      <AssemblyName>ServiceStack.Text.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\ServiceStack.Text.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>abf739cf-c2fb-411c-9057-17fae240d098</RecID>
      <AssemblyFullName>ActiproSoftware.Shared.WinForms, Version=16.1.330.0, Culture=neutral, PublicKeyToken=c27e062d3c1a4763</AssemblyFullName>
      <AssemblyName>ActiproSoftware.Shared.WinForms.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\ActiproSoftware.Shared.WinForms.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>5623a815-683e-4b4c-89a8-c718d4a8cd47</RecID>
      <AssemblyFullName>System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</AssemblyFullName>
      <AssemblyName>System.Security.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Security\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Security.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>e41c603b-dbaa-4f9f-af73-9d17988c5433</RecID>
      <AssemblyFullName>FarPoint.Win, Version=8.35.20151.0, Culture=neutral, PublicKeyToken=327c3516b1b18457</AssemblyFullName>
      <AssemblyName>FarPoint.Win.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\FarPoint.Win.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>65b43c47-ffa9-4401-a062-eb7c5f5e3f87</RecID>
      <AssemblyFullName>CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304</AssemblyFullName>
      <AssemblyName>CrystalDecisions.ReportAppServer.ClientDoc.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.ClientDoc\13.0.3500.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.ClientDoc.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>fb1338eb-b905-4d71-b589-d83764d5a82c</RecID>
      <AssemblyFullName>CrystalDecisions.ReportAppServer.ReportDefModel, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304</AssemblyFullName>
      <AssemblyName>CrystalDecisions.ReportAppServer.ReportDefModel.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.ReportDefModel\13.0.3500.0__692fbea5521e1304\CrystalDecisions.ReportAppServer.ReportDefModel.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>febd4bab-b6ee-4eef-8341-0affda6230db</RecID>
      <AssemblyFullName>ServiceStack.Interfaces, Version=5.0.0.0, Culture=neutral, PublicKeyToken=02c12cbda47e6587</AssemblyFullName>
      <AssemblyName>ServiceStack.Interfaces.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\ServiceStack.Interfaces.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>89295203-c9e0-4821-9d72-d50ca3d87335</RecID>
      <AssemblyFullName>ServiceStack.Server, Version = 5.0.0.0, Culture = neutral, PublicKeyToken = 02c12cbda47e6587</AssemblyFullName>
      <AssemblyName>ServiceStack.Server.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\ServiceStack.Server.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>a96cc3f8-9e39-40f6-b60a-7f81b9346115</RecID>
      <AssemblyFullName>ServiceStack.OrmLite, Version = 5.0.0.0, Culture = neutral, PublicKeyToken = 02c12cbda47e6587</AssemblyFullName>
      <AssemblyName>ServiceStack.OrmLite.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\ServiceStack.OrmLite.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>9f6f8ffb-0c9f-472c-b593-b17b52323f2b</RecID>
      <AssemblyFullName>JiwaInventory, Version=7.2.0.0, Culture=neutral, PublicKeyToken=e30ce81e37f29c8c</AssemblyFullName>
      <AssemblyName>JiwaInventory.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\JiwaInventory.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>4c4dd909-e3bf-4ad1-aab9-500e5349d467</RecID>
      <AssemblyFullName>FarPoint.Excel, Version=8.35.20151.0, Culture=neutral, PublicKeyToken=327c3516b1b18457</AssemblyFullName>
      <AssemblyName>FarPoint.Excel.dll</AssemblyName>
      <AssemblyLocation>C:\Jiwa\Jiwa 7\FarPoint.Excel.dll</AssemblyLocation>
    </Reference>
    <Reference>
      <RecID>cb597a7e-f701-4b00-9c20-c97351931e5a</RecID>
      <AssemblyFullName>System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</AssemblyFullName>
      <AssemblyName>System.Xml.Linq.dll</AssemblyName>
      <AssemblyLocation>C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll</AssemblyLocation>
    </Reference>
  </ReferenceCollection>
</JiwaDocument>